Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
cdbbccbe
Commit
cdbbccbe
authored
Nov 24, 2017
by
Dmitry Kurtaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specific version of MobileNet-SSD from TensorFlow
parent
f071a48e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
mobilenet_ssd_accuracy.py
samples/dnn/mobilenet_ssd_accuracy.py
+1
-1
mobilenet_ssd_python.py
samples/dnn/mobilenet_ssd_python.py
+2
-2
No files found.
samples/dnn/mobilenet_ssd_accuracy.py
View file @
cdbbccbe
...
...
@@ -18,7 +18,7 @@ parser = argparse.ArgumentParser(
'COCO evaluation framework is required: http://cocodataset.org'
)
parser
.
add_argument
(
'--weights'
,
required
=
True
,
help
=
'Path to frozen_inference_graph.pb of MobileNet-SSD model. '
'Download it
at https://github.com/tensorflow/models/tree/master/research/object_detection
'
)
'Download it
from http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz
'
)
parser
.
add_argument
(
'--prototxt'
,
help
=
'Path to ssd_mobilenet_v1_coco.pbtxt from opencv_extra.'
,
required
=
True
)
parser
.
add_argument
(
'--images'
,
help
=
'Path to COCO validation images directory.'
,
required
=
True
)
parser
.
add_argument
(
'--annotations'
,
help
=
'Path to COCO annotations file.'
,
required
=
True
)
...
...
samples/dnn/mobilenet_ssd_python.py
View file @
cdbbccbe
...
...
@@ -6,7 +6,7 @@
#
# Also TensorFlow model from TensorFlow object detection model zoo may be used to
# detect objects from 90 classes:
# http
s://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
# http
://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz
# Text graph definition must be taken from opencv_extra:
# https://github.com/opencv/opencv_extra/tree/master/testdata/dnn/ssd_mobilenet_v1_coco.pbtxt
import
numpy
as
np
...
...
@@ -40,7 +40,7 @@ if __name__ == "__main__":
parser
.
add_argument
(
"--num_classes"
,
default
=
20
,
type
=
int
,
help
=
"Number of classes. It's 20 for Caffe model from "
"https://github.com/chuanqi305/MobileNet-SSD/ and 90 for "
"TensorFlow model from http
s://github.com/tensorflow/models/tree/master/research/object_detection
"
)
"TensorFlow model from http
://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_coco_11_06_2017.tar.gz
"
)
parser
.
add_argument
(
"--thr"
,
default
=
0.2
,
type
=
float
,
help
=
"confidence threshold to filter out weak detections"
)
args
=
parser
.
parse_args
()
...
...
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