diff --git a/mediapipe/model_maker/python/vision/object_detector/dataset_util.py b/mediapipe/model_maker/python/vision/object_detector/dataset_util.py index 7fc6cd7ee..020c94501 100644 --- a/mediapipe/model_maker/python/vision/object_detector/dataset_util.py +++ b/mediapipe/model_maker/python/vision/object_detector/dataset_util.py @@ -444,8 +444,8 @@ class PascalVocCacheFilesWriter(CacheFilesWriter): images_dir = os.path.join(data_dir, 'images') all_annotation_paths = tf.io.gfile.glob(annotations_dir + r'/*.xml') - data = collections.defaultdict(list) for ind, ann_file in enumerate(all_annotation_paths): + data = collections.defaultdict(list) tree = ET.parse(ann_file) root = tree.getroot() img_filename = _xml_get(root, 'filename').text