Commit e45df83b authored by cclauss's avatar cclauss Committed by pkulzc
Browse files

Fix print function in oid_hierarchical_labels_expansion.py for py3 compatibility.

parent 2d9d7943
...@@ -23,6 +23,8 @@ oid_hierarchical_labels_expansion.py \ ...@@ -23,6 +23,8 @@ oid_hierarchical_labels_expansion.py \
--annotation_type=<1 (for boxes) or 2 (for image-level labels)> --annotation_type=<1 (for boxes) or 2 (for image-level labels)>
""" """
from __future__ import print_function
import argparse import argparse
import json import json
...@@ -154,7 +156,7 @@ def main(parsed_args): ...@@ -154,7 +156,7 @@ def main(parsed_args):
if parsed_args.annotation_type == 2: if parsed_args.annotation_type == 2:
labels_file = True labels_file = True
elif parsed_args.annotation_type != 1: 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 return -1
with open(parsed_args.input_annotations, 'r') as source: with open(parsed_args.input_annotations, 'r') as source:
with open(parsed_args.output_annotations, 'w') as target: with open(parsed_args.output_annotations, 'w') as target:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment