Update testdata.py
Browse files- testdata.py +3 -1
testdata.py
CHANGED
|
@@ -105,12 +105,14 @@ class TestData(datasets.GeneratorBasedBuilder):
|
|
| 105 |
|
| 106 |
for img_file in glob(os.path.join(image_dir, "*.png")):
|
| 107 |
|
| 108 |
-
d = { image_dir:
|
| 109 |
gt_path = img_file
|
| 110 |
for i, j in d.items():
|
| 111 |
gt_path = gt_path.replace(i, j)
|
| 112 |
faces = []
|
| 113 |
plates = []
|
|
|
|
|
|
|
| 114 |
|
| 115 |
annotation = defaultdict(list)
|
| 116 |
with open(gt_path, 'r') as f:
|
|
|
|
| 105 |
|
| 106 |
for img_file in glob(os.path.join(image_dir, "*.png")):
|
| 107 |
|
| 108 |
+
d = { image_dir: "", ".png": ""}
|
| 109 |
gt_path = img_file
|
| 110 |
for i, j in d.items():
|
| 111 |
gt_path = gt_path.replace(i, j)
|
| 112 |
faces = []
|
| 113 |
plates = []
|
| 114 |
+
|
| 115 |
+
gt_path = os.path.join(annotation_dir, gt_path, ".txt")
|
| 116 |
|
| 117 |
annotation = defaultdict(list)
|
| 118 |
with open(gt_path, 'r') as f:
|