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
50b636c1
Commit
50b636c1
authored
Mar 31, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added notes that the object detector validation methods also output MAP values.
parent
77ce2775
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
10 deletions
+11
-10
object_detector_advanced_ex.cpp
examples/object_detector_advanced_ex.cpp
+5
-4
object_detector_ex.cpp
examples/object_detector_ex.cpp
+3
-3
train_object_detector.cpp
examples/train_object_detector.cpp
+3
-3
No files found.
examples/object_detector_advanced_ex.cpp
View file @
50b636c1
...
...
@@ -247,12 +247,13 @@ int main()
object_detector
<
image_scanner_type
>
detector
=
trainer
.
train
(
images
,
object_locations
);
// We can easily test the new detector against our training data. This print statement will indicate that it
// has perfect precision and recall on this simple task.
cout
<<
"Test detector (precision,recall): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// We can easily test the new detector against our training data. This print
// statement will indicate that it has perfect precision and recall on this simple
// task. It will also print the mean average precision (MAP).
cout
<<
"Test detector (precision,recall,MAP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// The cross validation should also indicate perfect precision and recall.
cout
<<
"3-fold cross validation (precision,recall): "
cout
<<
"3-fold cross validation (precision,recall
,MAP
): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
...
...
examples/object_detector_ex.cpp
View file @
50b636c1
...
...
@@ -207,11 +207,11 @@ int main()
object_detector
<
image_scanner_type
>
detector
=
trainer
.
train
(
images
,
object_locations
);
// We can easily test the new detector against our training data. This print statement will indicate that it
// has perfect precision and recall on this simple task.
cout
<<
"Test detector (precision,recall): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// has perfect precision and recall on this simple task.
It will also print the mean average precision (MAP).
cout
<<
"Test detector (precision,recall
,MAP
): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// The cross validation should also indicate perfect precision and recall.
cout
<<
"3-fold cross validation (precision,recall): "
cout
<<
"3-fold cross validation (precision,recall
,MAP
): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
...
...
examples/train_object_detector.cpp
View file @
50b636c1
...
...
@@ -189,7 +189,7 @@ int main(int argc, char** argv)
fout
.
close
();
cout
<<
"Testing detector on training data..."
<<
endl
;
cout
<<
"Test detector (precision,recall): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Test detector (precision,recall
,MAP
): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
}
else
{
...
...
@@ -197,7 +197,7 @@ int main(int argc, char** argv)
randomize_samples
(
images
,
object_locations
);
// The cross validation should also indicate perfect precision and recall.
cout
<<
num_folds
<<
"-fold cross validation (precision,recall): "
cout
<<
num_folds
<<
"-fold cross validation (precision,recall
,MAP
): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
num_folds
)
<<
endl
;
}
...
...
@@ -252,7 +252,7 @@ int main(int argc, char** argv)
if
(
parser
.
option
(
"test"
))
{
cout
<<
"Testing detector on data..."
<<
endl
;
cout
<<
"Results (precision,recall): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Results (precision,recall
,MAP
): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
return
EXIT_SUCCESS
;
}
}
...
...
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