SIA86 commited on
Commit
272ad79
·
1 Parent(s): 11101bc

Update WaterFlowCountersRecognition.py

Browse files
Files changed (1) hide show
  1. WaterFlowCountersRecognition.py +16 -17
WaterFlowCountersRecognition.py CHANGED
@@ -169,21 +169,20 @@ class WaterFlowCounter(datasets.GeneratorBasedBuilder):
169
  rotated.append(int(region['region_attributes']['rotated']))
170
 
171
  '''
172
- if len(names) == len(all_area):
173
- yield idx, {
174
- "image_id": idx,
175
- "image": {"path": filepath, "bytes": image_bytes},
176
- "width": width,
177
- "height": height,
178
- "objects": {
179
- "id": ids,
180
- "area": all_area,
181
- "bbox": all_bbox,
182
- "category":names,
183
- }
184
- }
185
- idx += 1
186
- else:
187
- idx += 1
188
  continue
189
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  rotated.append(int(region['region_attributes']['rotated']))
170
 
171
  '''
172
+ if len(names) != len(all_area):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  continue
174
+
175
+ yield idx, {
176
+ "image_id": idx,
177
+ "image": {"path": filepath, "bytes": image_bytes},
178
+ "width": width,
179
+ "height": height,
180
+ "objects": {
181
+ "id": ids,
182
+ "area": all_area,
183
+ "bbox": all_bbox,
184
+ "category":names,
185
+ }
186
+ }
187
+ idx += 1
188
+