Tolerate absense of label files
@@ -146,6 +146,8 @@ def image_demo():
expected_classes = []
expected_boxes = []
class_count = dict((k, 0) for k in mc.CLASS_NAMES)
+
+ if FLAGS.label_dir:
label_file_name = os.path.join(FLAGS.label_dir, file_name)
label_file_name = os.path.splitext(label_file_name)[0] + '.txt'
with open(label_file_name) as lf:
