khaclinh commited on
Commit
a334b09
1 Parent(s): 323670a

Update testdata.py

Browse files
Files changed (1) hide show
  1. testdata.py +8 -6
testdata.py CHANGED
@@ -100,18 +100,20 @@ class TestData(datasets.GeneratorBasedBuilder):
100
  image_dir = os.path.join(data_dir, "fisheye")
101
  annotation_dir = os.path.join(annot_dir, "annotations", "fisheye")
102
  files = []
103
-
 
 
104
  idx = 0
105
  for gt_file in glob(os.path.join(annotation_dir, "*.txt")):
106
  plates = []
107
  faces = []
108
 
109
- gt_relative_file = os.path.relpath(gt_file, annotation_dir)
110
- img_relative_path = gt_relative_file.replace(".txt", ".png")
111
 
112
- img_path = os.path.join(image_dir, img_relative_path)
113
- yield idx, {"image": img_path, "faces": faces, "plates": plates}
114
 
115
  idx += 1
116
 
117
-
 
100
  image_dir = os.path.join(data_dir, "fisheye")
101
  annotation_dir = os.path.join(annot_dir, "annotations", "fisheye")
102
  files = []
103
+
104
+ for i_file in glob(os.path.join(image_dir, "*.png")):
105
+
106
  idx = 0
107
  for gt_file in glob(os.path.join(annotation_dir, "*.txt")):
108
  plates = []
109
  faces = []
110
 
111
+ # gt_relative_file = os.path.relpath(gt_file, annotation_dir)
112
+ # img_relative_path = gt_relative_file.replace(".txt", ".png")
113
 
114
+ # img_path = os.path.join(image_dir, img_relative_path)
115
+ yield idx, {"image": i_file, "faces": faces, "plates": plates}
116
 
117
  idx += 1
118
 
119
+