Skip to content

Commit e45df83

Browse files
cclausspkulzc
cclauss
authored andcommitted
Fix print function in oid_hierarchical_labels_expansion.py for py3 compatibility.
1 parent 2d9d794 commit e45df83

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

research/object_detection/dataset_tools/oid_hierarchical_labels_expansion.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
--annotation_type=<1 (for boxes) or 2 (for image-level labels)>
2424
"""
2525

26+
from __future__ import print_function
27+
2628
import argparse
2729
import json
2830

@@ -154,7 +156,7 @@ def main(parsed_args):
154156
if parsed_args.annotation_type == 2:
155157
labels_file = True
156158
elif parsed_args.annotation_type != 1:
157-
print '--annotation_type expected value is 1 or 2.'
159+
print('--annotation_type expected value is 1 or 2.')
158160
return -1
159161
with open(parsed_args.input_annotations, 'r') as source:
160162
with open(parsed_args.output_annotations, 'w') as target:

0 commit comments

Comments
 (0)