Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
c9b050e2
Commit
c9b050e2
authored
May 26, 2014
by
Davis King
Browse files
Fixed bug in evaluate_detectors() and added unit tests.
parent
e3af40d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
dlib/image_processing/scan_fhog_pyramid.h
dlib/image_processing/scan_fhog_pyramid.h
+1
-1
dlib/test/object_detector.cpp
dlib/test/object_detector.cpp
+16
-0
No files found.
dlib/image_processing/scan_fhog_pyramid.h
View file @
c9b050e2
...
@@ -1285,7 +1285,7 @@ namespace dlib
...
@@ -1285,7 +1285,7 @@ namespace dlib
const
double
thresh
=
detectors
[
i
].
get_processed_w
(
d
).
w
(
scanner
.
get_num_dimensions
());
const
double
thresh
=
detectors
[
i
].
get_processed_w
(
d
).
w
(
scanner
.
get_num_dimensions
());
impl
::
detect_from_fhog_pyramid
<
pyramid_type
>
(
feats
,
scanner
.
get_feature_extractor
(),
impl
::
detect_from_fhog_pyramid
<
pyramid_type
>
(
feats
,
scanner
.
get_feature_extractor
(),
detectors
[
i
].
get_processed_w
(
d
).
get_detect_argument
(),
thresh
,
detectors
[
i
].
get_processed_w
(
d
).
get_detect_argument
(),
thresh
+
adjust_threshold
,
det_box_height
,
det_box_width
,
cell_size
,
max_filter_height
,
det_box_height
,
det_box_width
,
cell_size
,
max_filter_height
,
max_filter_width
,
temp_dets
);
max_filter_width
,
temp_dets
);
...
...
dlib/test/object_detector.cpp
View file @
c9b050e2
...
@@ -404,6 +404,22 @@ namespace
...
@@ -404,6 +404,22 @@ namespace
validate_some_object_detector_stuff
(
images
,
detector
,
1e-6
);
validate_some_object_detector_stuff
(
images
,
detector
,
1e-6
);
}
}
{
std
::
vector
<
object_detector
<
image_scanner_type
>
>
detectors
;
detectors
.
push_back
(
detector
);
detectors
.
push_back
(
detector
);
detectors
.
push_back
(
detector
);
std
::
vector
<
rectangle
>
dets1
=
evaluate_detectors
(
detectors
,
images
[
0
]);
std
::
vector
<
rectangle
>
dets2
=
detector
(
images
[
0
]);
DLIB_TEST
(
dets1
.
size
()
>
0
);
DLIB_TEST
(
dets2
.
size
()
==
dets1
.
size
());
for
(
unsigned
long
i
=
0
;
i
<
dets1
.
size
();
++
i
)
{
DLIB_TEST
(
dets1
[
i
]
==
dets2
[
i
]);
}
}
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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