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
b84e2123
Commit
b84e2123
authored
Nov 15, 2017
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed network filename to something more descriptive.
parent
36392bb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
dnn_semantic_segmentation_ex.cpp
examples/dnn_semantic_segmentation_ex.cpp
+4
-4
dnn_semantic_segmentation_ex.h
examples/dnn_semantic_segmentation_ex.h
+2
-3
dnn_semantic_segmentation_train_ex.cpp
examples/dnn_semantic_segmentation_train_ex.cpp
+1
-1
No files found.
examples/dnn_semantic_segmentation_ex.cpp
View file @
b84e2123
...
...
@@ -16,7 +16,7 @@
./dnn_semantic_segmentation_ex /path/to/VOC2012-or-other-images
An alternative to steps 2-4 above is to download a pre-trained network
from here: http://dlib.net/files/voc2012net.dnn
from here: http://dlib.net/files/
semantic_segmentation_
voc2012net.dnn
It would be a good idea to become familiar with dlib's DNN tooling before reading this
example. So you should read dnn_introduction_ex.cpp and dnn_introduction2_ex.cpp
...
...
@@ -111,16 +111,16 @@ int main(int argc, char** argv) try
cout
<<
"You call this program like this: "
<<
endl
;
cout
<<
"./dnn_semantic_segmentation_train_ex /path/to/images"
<<
endl
;
cout
<<
endl
;
cout
<<
"You will also need a trained 'voc2012net.dnn' file."
<<
endl
;
cout
<<
"You will also need a trained '
semantic_segmentation_
voc2012net.dnn' file."
<<
endl
;
cout
<<
"You can either train it yourself (see example program"
<<
endl
;
cout
<<
"dnn_semantic_segmentation_train_ex), or download a"
<<
endl
;
cout
<<
"copy from here: http://dlib.net/files/voc2012net.dnn"
<<
endl
;
cout
<<
"copy from here: http://dlib.net/files/
semantic_segmentation_
voc2012net.dnn"
<<
endl
;
return
1
;
}
// Read the file containing the trained network from the working directory.
anet_type
net
;
deserialize
(
"voc2012net.dnn"
)
>>
net
;
deserialize
(
"
semantic_segmentation_
voc2012net.dnn"
)
>>
net
;
// Show inference results in a window.
image_window
win
;
...
...
examples/dnn_semantic_segmentation_ex.h
View file @
b84e2123
...
...
@@ -23,7 +23,7 @@
./dnn_semantic_segmentation_ex /path/to/VOC2012-or-other-images
An alternative to steps 2-4 above is to download a pre-trained network
from here: http://dlib.net/files/voc2012net.dnn
from here: http://dlib.net/files/
semantic_segmentation_
voc2012net.dnn
It would be a good idea to become familiar with dlib's DNN tooling before reading this
example. So you should read dnn_introduction_ex.cpp and dnn_introduction2_ex.cpp
...
...
@@ -187,4 +187,4 @@ using anet_type = dlib::loss_multiclass_log_per_pixel<
// ----------------------------------------------------------------------------------------
#endif // DLIB_DNn_SEMANTIC_SEGMENTATION_EX_H_
\ No newline at end of file
#endif // DLIB_DNn_SEMANTIC_SEGMENTATION_EX_H_
examples/dnn_semantic_segmentation_train_ex.cpp
View file @
b84e2123
...
...
@@ -371,7 +371,7 @@ int main(int argc, char** argv) try
net
.
clean
();
cout
<<
"saving network"
<<
endl
;
serialize
(
"voc2012net.dnn"
)
<<
net
;
serialize
(
"
semantic_segmentation_
voc2012net.dnn"
)
<<
net
;
// Make a copy of the network to use it for inference.
...
...
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