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
1b23bb13
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "f5ccffecf7c9c7b08c39043d1c9528be2c5cfecc"
Commit
1b23bb13
authored
Jul 25, 2013
by
Davis King
Browse files
Updated comments in examples to account for recent code change.
parent
c9ed8aa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
examples/object_detector_advanced_ex.cpp
examples/object_detector_advanced_ex.cpp
+3
-3
examples/object_detector_ex.cpp
examples/object_detector_ex.cpp
+3
-3
examples/train_object_detector.cpp
examples/train_object_detector.cpp
+3
-4
No files found.
examples/object_detector_advanced_ex.cpp
View file @
1b23bb13
...
@@ -249,11 +249,11 @@ int main()
...
@@ -249,11 +249,11 @@ int main()
// We can easily test the new detector against our training data. This print
// 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
// statement will indicate that it has perfect precision and recall on this simple
// task. It will also print the
mean
average precision (
M
AP).
// task. It will also print the average precision (AP).
cout
<<
"Test detector (precision,recall,
M
AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Test detector (precision,recall,AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// The cross validation should also indicate perfect precision and recall.
// The cross validation should also indicate perfect precision and recall.
cout
<<
"3-fold cross validation (precision,recall,
M
AP): "
cout
<<
"3-fold cross validation (precision,recall,AP): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
...
...
examples/object_detector_ex.cpp
View file @
1b23bb13
...
@@ -207,11 +207,11 @@ int main()
...
@@ -207,11 +207,11 @@ int main()
object_detector
<
image_scanner_type
>
detector
=
trainer
.
train
(
images
,
object_locations
);
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
// 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 (
M
AP).
// has perfect precision and recall on this simple task. It will also print the average precision (AP).
cout
<<
"Test detector (precision,recall,
M
AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Test detector (precision,recall,AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
// The cross validation should also indicate perfect precision and recall.
// The cross validation should also indicate perfect precision and recall.
cout
<<
"3-fold cross validation (precision,recall,
M
AP): "
cout
<<
"3-fold cross validation (precision,recall,AP): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
3
)
<<
endl
;
...
...
examples/train_object_detector.cpp
View file @
1b23bb13
...
@@ -189,15 +189,14 @@ int main(int argc, char** argv)
...
@@ -189,15 +189,14 @@ int main(int argc, char** argv)
fout
.
close
();
fout
.
close
();
cout
<<
"Testing detector on training data..."
<<
endl
;
cout
<<
"Testing detector on training data..."
<<
endl
;
cout
<<
"Test detector (precision,recall,
M
AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Test detector (precision,recall,AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
}
}
else
else
{
{
// shuffle the order of the training images
// shuffle the order of the training images
randomize_samples
(
images
,
object_locations
);
randomize_samples
(
images
,
object_locations
);
// The cross validation should also indicate perfect precision and recall.
cout
<<
num_folds
<<
"-fold cross validation (precision,recall,AP): "
cout
<<
num_folds
<<
"-fold cross validation (precision,recall,MAP): "
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
num_folds
)
<<
endl
;
<<
cross_validate_object_detection_trainer
(
trainer
,
images
,
object_locations
,
num_folds
)
<<
endl
;
}
}
...
@@ -252,7 +251,7 @@ int main(int argc, char** argv)
...
@@ -252,7 +251,7 @@ int main(int argc, char** argv)
if
(
parser
.
option
(
"test"
))
if
(
parser
.
option
(
"test"
))
{
{
cout
<<
"Testing detector on data..."
<<
endl
;
cout
<<
"Testing detector on data..."
<<
endl
;
cout
<<
"Results (precision,recall,
M
AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
cout
<<
"Results (precision,recall,AP): "
<<
test_object_detection_function
(
detector
,
images
,
object_locations
)
<<
endl
;
return
EXIT_SUCCESS
;
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