|
|
@ -233,13 +233,14 @@ def create_voc_label(is_training):
|
|
|
|
'id': img_id}
|
|
|
|
'id': img_id}
|
|
|
|
json_dict['images'].append(image)
|
|
|
|
json_dict['images'].append(image)
|
|
|
|
|
|
|
|
|
|
|
|
for cls_name, cid in cls_map.items():
|
|
|
|
if not is_training:
|
|
|
|
cat = {'supercategory': 'none', 'id': cid, 'name': cls_name}
|
|
|
|
for cls_name, cid in cls_map.items():
|
|
|
|
json_dict['categories'].append(cat)
|
|
|
|
cat = {'supercategory': 'none', 'id': cid, 'name': cls_name}
|
|
|
|
json_fp = open(json_file, 'w')
|
|
|
|
json_dict['categories'].append(cat)
|
|
|
|
json_str = json.dumps(json_dict)
|
|
|
|
json_fp = open(json_file, 'w')
|
|
|
|
json_fp.write(json_str)
|
|
|
|
json_str = json.dumps(json_dict)
|
|
|
|
json_fp.close()
|
|
|
|
json_fp.write(json_str)
|
|
|
|
|
|
|
|
json_fp.close()
|
|
|
|
|
|
|
|
|
|
|
|
return images, image_files_dict, image_anno_dict
|
|
|
|
return images, image_files_dict, image_anno_dict
|
|
|
|
|
|
|
|
|
|
|
|