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
e66fa51e
Commit
e66fa51e
authored
Jan 12, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clarified examples
parent
2cb5177f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
face_detection_ex.cpp
examples/face_detection_ex.cpp
+6
-6
fhog_object_detector_ex.cpp
examples/fhog_object_detector_ex.cpp
+13
-13
No files found.
examples/face_detection_ex.cpp
View file @
e66fa51e
...
...
@@ -7,7 +7,7 @@
human face.
The examples/faces folder contains some jpg images of people. You can run
this program on them and see the detections by executing the following:
this program on them and see the detections by executing the following
command
:
./face_detection_ex faces/*.jpg
...
...
@@ -17,8 +17,8 @@
general and capable of detecting many types of semi-rigid objects in
addition to human faces. Therefore, if you are interested in making your
own object detectors then read the fhog_object_detector_ex.cpp example
program. It shows how to use the machine learning tools
used to create this
face detector.
program. It shows how to use the machine learning tools
which were used to
create dlib's
face detector.
Finally, note that the face detector is fastest when compiled with at least
...
...
@@ -26,9 +26,9 @@
chip then you should enable at least SSE2 instructions. If you are using
cmake to compile this program you can enable them by using one of the
following commands when you create the build project:
cmake path_to_d
clib
/examples -DUSE_SSE2_INSTRUCTIONS=ON
cmake path_to_d
clib
/examples -DUSE_SSE4_INSTRUCTIONS=ON
cmake path_to_d
clib
/examples -DUSE_AVX_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_SSE2_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_SSE4_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_AVX_INSTRUCTIONS=ON
This will set the appropriate compiler options for GCC, clang, Visual
Studio, or the Intel compiler. If you are using another compiler then you
need to consult your compiler's manual to determine how to enable these
...
...
examples/fhog_object_detector_ex.cpp
View file @
e66fa51e
...
...
@@ -12,9 +12,9 @@
then you should enable at least SSE2 instructions. If you are using cmake
to compile this program you can enable them by using one of the following
commands when you create the build project:
cmake path_to_d
clib
/examples -DUSE_SSE2_INSTRUCTIONS=ON
cmake path_to_d
clib
/examples -DUSE_SSE4_INSTRUCTIONS=ON
cmake path_to_d
clib
/examples -DUSE_AVX_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_SSE2_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_SSE4_INSTRUCTIONS=ON
cmake path_to_d
lib_root
/examples -DUSE_AVX_INSTRUCTIONS=ON
This will set the appropriate compiler options for GCC, clang, Visual
Studio, or the Intel compiler. If you are using another compiler then you
need to consult your compiler's manual to determine how to enable these
...
...
@@ -44,14 +44,14 @@ int main(int argc, char** argv)
try
{
// In this example we are going to train a face detector based on the
// small faces dataset in the
dclib/examples/faces directory. So the
//
first thing we do is load that dataset. This means you need to
//
supply the path to this faces folder as a command line argument so we
// w
ill know w
here it is.
// small faces dataset in the
examples/faces directory. So the first
//
thing we do is load that dataset. This means you need to supply the
//
path to this faces folder as a command line argument so we will know
// where it is.
if
(
argc
!=
2
)
{
cout
<<
"Give the path to the
dclib/
examples/faces directory as the argument to this"
<<
endl
;
cout
<<
"program. For example, if you are in the
dclib/
examples folder then execute "
<<
endl
;
cout
<<
"Give the path to the examples/faces directory as the argument to this"
<<
endl
;
cout
<<
"program. For example, if you are in the examples folder then execute "
<<
endl
;
cout
<<
"this program by running: "
<<
endl
;
cout
<<
" ./fhog_object_detector_ex faces"
<<
endl
;
cout
<<
endl
;
...
...
@@ -84,10 +84,10 @@ int main(int argc, char** argv)
// the data into images_train and face_boxes_train. But for convenience
// dlib comes with tools for creating and loading XML image dataset
// files. Here you see how to load the data. To create the XML files
// you can use the imglab tool which can be found in the
//
dclib/tools/imglab folder. It is a simple graphical tool for
//
labeling objects in images with boxes. To see how to use it read the
//
dclib/tools/imglab/README.txt
file.
// you can use the imglab tool which can be found in the
tools/imglab
//
folder. It is a simple graphical tool for labeling objects in images
//
with boxes. To see how to use it read the tools/imglab/README.txt
// file.
load_image_dataset
(
images_train
,
face_boxes_train
,
faces_directory
+
"/training.xml"
);
load_image_dataset
(
images_test
,
face_boxes_test
,
faces_directory
+
"/testing.xml"
);
...
...
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