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
e45df83b
Commit
e45df83b
authored
Nov 27, 2018
by
cclauss
Committed by
pkulzc
Nov 27, 2018
Browse files
Fix print function in oid_hierarchical_labels_expansion.py for py3 compatibility.
parent
2d9d7943
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py
...ection/dataset_tools/oid_hierarchical_labels_expansion.py
+3
-1
No files found.
research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py
View file @
e45df83b
...
...
@@ -23,6 +23,8 @@ oid_hierarchical_labels_expansion.py \
--annotation_type=<1 (for boxes) or 2 (for image-level labels)>
"""
from
__future__
import
print_function
import
argparse
import
json
...
...
@@ -154,7 +156,7 @@ def main(parsed_args):
if
parsed_args
.
annotation_type
==
2
:
labels_file
=
True
elif
parsed_args
.
annotation_type
!=
1
:
print
'--annotation_type expected value is 1 or 2.'
print
(
'--annotation_type expected value is 1 or 2.'
)
return
-
1
with
open
(
parsed_args
.
input_annotations
,
'r'
)
as
source
:
with
open
(
parsed_args
.
output_annotations
,
'w'
)
as
target
:
...
...
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