SIA86 commited on
Commit
11101bc
·
1 Parent(s): 39d5b04

Update WaterFlowCountersRecognition.py

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