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
7431515f
Unverified
Commit
7431515f
authored
Jan 23, 2018
by
cclauss
Committed by
GitHub
Jan 23, 2018
Browse files
long(image_id, 16) --> int(image_id, 16)
See:
https://github.com/tensorflow/models/pull/3220#discussion_r163131613
parent
088ec5d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
research/object_detection/dataset_tools/create_oid_tf_record.py
...ch/object_detection/dataset_tools/create_oid_tf_record.py
+1
-6
No files found.
research/object_detection/dataset_tools/create_oid_tf_record.py
View file @
7431515f
...
@@ -42,11 +42,6 @@ import tensorflow as tf
...
@@ -42,11 +42,6 @@ import tensorflow as tf
from
object_detection.dataset_tools
import
oid_tfrecord_creation
from
object_detection.dataset_tools
import
oid_tfrecord_creation
from
object_detection.utils
import
label_map_util
from
object_detection.utils
import
label_map_util
try
:
long
# Python 2
except
NameError
:
long
=
int
# Python 3
tf
.
flags
.
DEFINE_string
(
'input_annotations_csv'
,
None
,
tf
.
flags
.
DEFINE_string
(
'input_annotations_csv'
,
None
,
'Path to CSV containing image bounding box annotations'
)
'Path to CSV containing image bounding box annotations'
)
tf
.
flags
.
DEFINE_string
(
'input_images_directory'
,
None
,
tf
.
flags
.
DEFINE_string
(
'input_images_directory'
,
None
,
...
@@ -101,7 +96,7 @@ def main(_):
...
@@ -101,7 +96,7 @@ def main(_):
tf_example
=
oid_tfrecord_creation
.
tf_example_from_annotations_data_frame
(
tf_example
=
oid_tfrecord_creation
.
tf_example_from_annotations_data_frame
(
image_annotations
,
label_map
,
encoded_image
)
image_annotations
,
label_map
,
encoded_image
)
if
tf_example
:
if
tf_example
:
shard_idx
=
long
(
image_id
,
16
)
%
FLAGS
.
num_shards
shard_idx
=
int
(
image_id
,
16
)
%
FLAGS
.
num_shards
output_tfrecords
[
shard_idx
].
write
(
tf_example
.
SerializeToString
())
output_tfrecords
[
shard_idx
].
write
(
tf_example
.
SerializeToString
())
...
...
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