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
ModelZoo
ResNet50_tensorflow
Commits
eeb00c02
Commit
eeb00c02
authored
Jul 17, 2017
by
derekjchow
Committed by
GitHub
Jul 17, 2017
Browse files
Merge pull request #1965 from korrawat/obj_detection_nb
Fix indentation in obj detection tutorial
parents
fe2f8b01
8f52c681
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
object_detection/object_detection_tutorial.ipynb
object_detection/object_detection_tutorial.ipynb
+8
-8
object_detection/utils/label_map_util.py
object_detection/utils/label_map_util.py
+1
-1
No files found.
object_detection/object_detection_tutorial.ipynb
View file @
eeb00c02
...
@@ -140,9 +140,9 @@
...
@@ -140,9 +140,9 @@
"opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)\n",
"opener.retrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)\n",
"tar_file = tarfile.open(MODEL_FILE)\n",
"tar_file = tarfile.open(MODEL_FILE)\n",
"for file in tar_file.getmembers():\n",
"for file in tar_file.getmembers():\n",
"
file_name = os.path.basename(file.name)\n",
" file_name = os.path.basename(file.name)\n",
"
if 'frozen_inference_graph.pb' in file_name:\n",
" if 'frozen_inference_graph.pb' in file_name:\n",
"
tar_file.extract(file, os.getcwd())"
" tar_file.extract(file, os.getcwd())"
]
]
},
},
{
{
...
@@ -162,11 +162,11 @@
...
@@ -162,11 +162,11 @@
"source": [
"source": [
"detection_graph = tf.Graph()\n",
"detection_graph = tf.Graph()\n",
"with detection_graph.as_default():\n",
"with detection_graph.as_default():\n",
"
od_graph_def = tf.GraphDef()\n",
" od_graph_def = tf.GraphDef()\n",
"
with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:\n",
" with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:\n",
"
serialized_graph = fid.read()\n",
" serialized_graph = fid.read()\n",
"
od_graph_def.ParseFromString(serialized_graph)\n",
" od_graph_def.ParseFromString(serialized_graph)\n",
"
tf.import_graph_def(od_graph_def, name='')"
" tf.import_graph_def(od_graph_def, name='')"
]
]
},
},
{
{
...
...
object_detection/utils/label_map_util.py
View file @
eeb00c02
...
@@ -75,7 +75,7 @@ def convert_label_map_to_categories(label_map,
...
@@ -75,7 +75,7 @@ def convert_label_map_to_categories(label_map,
list is created with max_num_classes categories.
list is created with max_num_classes categories.
max_num_classes: maximum number of (consecutive) label indices to include.
max_num_classes: maximum number of (consecutive) label indices to include.
use_display_name: (boolean) choose whether to load 'display_name' field
use_display_name: (boolean) choose whether to load 'display_name' field
as category name. If False o
f
if the display_name field does not exist,
as category name. If False o
r
if the display_name field does not exist,
uses 'name' field as category names instead.
uses 'name' field as category names instead.
Returns:
Returns:
categories: a list of dictionaries representing all possible categories.
categories: a list of dictionaries representing all possible categories.
...
...
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