Update testdata.py
Browse files- testdata.py +3 -1
testdata.py
CHANGED
|
@@ -127,6 +127,7 @@ class TestData(datasets.GeneratorBasedBuilder):
|
|
| 127 |
for file_type in IMG_EXT:
|
| 128 |
files.extend(list(Path(image_dir).glob(f'**/*.{file_type}')))
|
| 129 |
|
|
|
|
| 130 |
for image_path in tqdm(files):
|
| 131 |
# img_relative_path = image_path.relative_to(image_dir)
|
| 132 |
#gt_pah = (Path(annotation_dir) / img_relative_path).with_suffix('.txt')
|
|
@@ -152,4 +153,5 @@ class TestData(datasets.GeneratorBasedBuilder):
|
|
| 152 |
# else:
|
| 153 |
# plates({"bbox": [x1, y1, x2, y2]})
|
| 154 |
|
| 155 |
-
yield idx, {"image": image_path, "faces": faces, "plates": plates}
|
|
|
|
|
|
| 127 |
for file_type in IMG_EXT:
|
| 128 |
files.extend(list(Path(image_dir).glob(f'**/*.{file_type}')))
|
| 129 |
|
| 130 |
+
idx = 0
|
| 131 |
for image_path in tqdm(files):
|
| 132 |
# img_relative_path = image_path.relative_to(image_dir)
|
| 133 |
#gt_pah = (Path(annotation_dir) / img_relative_path).with_suffix('.txt')
|
|
|
|
| 153 |
# else:
|
| 154 |
# plates({"bbox": [x1, y1, x2, y2]})
|
| 155 |
|
| 156 |
+
yield idx, {"image": image_path, "faces": faces, "plates": plates}
|
| 157 |
+
idx += 1
|