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
77ce2775
Commit
77ce2775
authored
Mar 31, 2013
by
Davis King
Browse files
updated unit test to work with new object detector validation interface
parent
a73e7659
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
dlib/test/object_detector.cpp
dlib/test/object_detector.cpp
+18
-18
No files found.
dlib/test/object_detector.cpp
View file @
77ce2775
...
@@ -373,7 +373,7 @@ namespace
...
@@ -373,7 +373,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -383,7 +383,7 @@ namespace
...
@@ -383,7 +383,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -421,7 +421,7 @@ namespace
...
@@ -421,7 +421,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -431,7 +431,7 @@ namespace
...
@@ -431,7 +431,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -463,7 +463,7 @@ namespace
...
@@ -463,7 +463,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -473,7 +473,7 @@ namespace
...
@@ -473,7 +473,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -505,7 +505,7 @@ namespace
...
@@ -505,7 +505,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -515,7 +515,7 @@ namespace
...
@@ -515,7 +515,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -553,7 +553,7 @@ namespace
...
@@ -553,7 +553,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -563,7 +563,7 @@ namespace
...
@@ -563,7 +563,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -599,7 +599,7 @@ namespace
...
@@ -599,7 +599,7 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -609,7 +609,7 @@ namespace
...
@@ -609,7 +609,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
...
@@ -639,11 +639,11 @@ namespace
...
@@ -639,11 +639,11 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
res
=
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
);
res
=
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
);
dlog
<<
LINFO
<<
"3-fold cross validation (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"3-fold cross validation (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -653,7 +653,7 @@ namespace
...
@@ -653,7 +653,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
validate_some_object_detector_stuff
(
images
,
detector
);
validate_some_object_detector_stuff
(
images
,
detector
);
}
}
}
}
...
@@ -731,11 +731,11 @@ namespace
...
@@ -731,11 +731,11 @@ namespace
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
detector
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
res
=
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
);
res
=
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
);
dlog
<<
LINFO
<<
"3-fold cross validation (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"3-fold cross validation (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
{
{
ostringstream
sout
;
ostringstream
sout
;
...
@@ -745,7 +745,7 @@ namespace
...
@@ -745,7 +745,7 @@ namespace
deserialize
(
d2
,
sin
);
deserialize
(
d2
,
sin
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
matrix
<
double
>
res
=
test_object_detection_function
(
d2
,
images
,
object_locations
);
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
dlog
<<
LINFO
<<
"Test detector (precision,recall): "
<<
res
;
DLIB_TEST
(
sum
(
res
)
==
2
);
DLIB_TEST
(
sum
(
res
)
==
3
);
}
}
}
}
...
...
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