Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
a12e1e71
Commit
a12e1e71
authored
Mar 12, 2015
by
Jack Culpepper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repair old interface
parent
f2f4e9d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
object_detection.cpp
tools/python/src/object_detection.cpp
+1
-1
simple_object_detector_py.h
tools/python/src/simple_object_detector_py.h
+23
-8
No files found.
tools/python/src/object_detection.cpp
View file @
a12e1e71
...
@@ -342,7 +342,7 @@ ensures \n\
...
@@ -342,7 +342,7 @@ ensures \n\
"Loads an object detector from a file that contains the output of the
\n
\
"Loads an object detector from a file that contains the output of the
\n
\
train_simple_object_detector() routine or a serialized C++ object of type
\n
\
train_simple_object_detector() routine or a serialized C++ object of type
\n
\
object_detector<scan_fhog_pyramid<pyramid_down<6>>>."
)
object_detector<scan_fhog_pyramid<pyramid_down<6>>>."
)
.
def
(
"__call__"
,
run_detector_with_upscale
,
(
arg
(
"image"
),
arg
(
"upsample_num_times"
)
=
0
),
.
def
(
"__call__"
,
run_detector_with_upscale
2
,
(
arg
(
"image"
),
arg
(
"upsample_num_times"
)
=
0
),
"requires
\n
\
"requires
\n
\
- image is a numpy ndarray containing either an 8bit grayscale or RGB
\n
\
- image is a numpy ndarray containing either an 8bit grayscale or RGB
\n
\
image.
\n
\
image.
\n
\
...
...
tools/python/src/simple_object_detector_py.h
View file @
a12e1e71
...
@@ -32,7 +32,8 @@ namespace dlib
...
@@ -32,7 +32,8 @@ namespace dlib
}
}
}
}
inline
std
::
vector
<
dlib
::
rectangle
>
run_detector_with_upscale
(
inline
std
::
vector
<
dlib
::
rectangle
>
run_detector_with_upscale1
(
dlib
::
simple_object_detector
&
detector
,
dlib
::
simple_object_detector
&
detector
,
boost
::
python
::
object
img
,
boost
::
python
::
object
img
,
const
unsigned
int
upsampling_amount
,
const
unsigned
int
upsampling_amount
,
...
@@ -111,10 +112,23 @@ namespace dlib
...
@@ -111,10 +112,23 @@ namespace dlib
}
}
}
}
inline
std
::
vector
<
dlib
::
rectangle
>
run_detector_with_upscale2
(
dlib
::
simple_object_detector
&
detector
,
boost
::
python
::
object
img
,
const
unsigned
int
upsampling_amount
)
{
std
::
vector
<
double
>
detection_confidences
;
std
::
vector
<
double
>
weight_indices
;
return
run_detector_with_upscale1
(
detector
,
img
,
upsampling_amount
,
detection_confidences
,
weight_indices
);
}
inline
boost
::
python
::
tuple
run_rect_detector
(
inline
boost
::
python
::
tuple
run_rect_detector
(
dlib
::
simple_object_detector
&
detector
,
dlib
::
simple_object_detector
&
detector
,
boost
::
python
::
object
img
,
boost
::
python
::
object
img
,
const
unsigned
int
upsampling_amount
)
const
unsigned
int
upsampling_amount
)
{
{
boost
::
python
::
tuple
t
;
boost
::
python
::
tuple
t
;
...
@@ -122,8 +136,8 @@ namespace dlib
...
@@ -122,8 +136,8 @@ namespace dlib
std
::
vector
<
double
>
weight_indices
;
std
::
vector
<
double
>
weight_indices
;
std
::
vector
<
rectangle
>
rectangles
;
std
::
vector
<
rectangle
>
rectangles
;
rectangles
=
run_detector_with_upscale
(
detector
,
img
,
upsampling_amount
,
rectangles
=
run_detector_with_upscale
1
(
detector
,
img
,
upsampling_amount
,
detection_confidences
,
weight_indices
);
detection_confidences
,
weight_indices
);
return
boost
::
python
::
make_tuple
(
rectangles
,
return
boost
::
python
::
make_tuple
(
rectangles
,
detection_confidences
,
weight_indices
);
detection_confidences
,
weight_indices
);
...
@@ -144,7 +158,7 @@ namespace dlib
...
@@ -144,7 +158,7 @@ namespace dlib
std
::
vector
<
double
>
detection_confidences
;
std
::
vector
<
double
>
detection_confidences
;
std
::
vector
<
double
>
weight_indices
;
std
::
vector
<
double
>
weight_indices
;
return
run_detector_with_upscale
(
detector
,
img
,
upsampling_amount_
,
return
run_detector_with_upscale
1
(
detector
,
img
,
upsampling_amount_
,
detection_confidences
,
weight_indices
);
detection_confidences
,
weight_indices
);
}
}
...
@@ -152,7 +166,8 @@ namespace dlib
...
@@ -152,7 +166,8 @@ namespace dlib
{
{
std
::
vector
<
double
>
detection_confidences
;
std
::
vector
<
double
>
detection_confidences
;
std
::
vector
<
double
>
weight_indices
;
std
::
vector
<
double
>
weight_indices
;
return
run_detector_with_upscale
(
detector
,
img
,
upsampling_amount
,
return
run_detector_with_upscale1
(
detector
,
img
,
upsampling_amount
,
detection_confidences
,
weight_indices
);
detection_confidences
,
weight_indices
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment