SIA86 commited on
Commit
3847d94
·
1 Parent(s): 37cd4ac

Update WaterFlowCountersRecognition.py

Browse files
Files changed (1) hide show
  1. WaterFlowCountersRecognition.py +4 -4
WaterFlowCountersRecognition.py CHANGED
@@ -61,11 +61,11 @@ class WaterFlowCounter(datasets.GeneratorBasedBuilder):
61
  def _info(self):
62
  features = datasets.Features(
63
  {
64
- "filename": datasets.Value("string"),
65
  "image": datasets.Image(),
66
  "width": datasets.Value('int32'),
67
  "height": datasets.Value('int32'),
68
- "annotations": datasets.Sequence(
69
  {
70
  "id": datasets.Value('int32'),
71
  "bbox": datasets.Sequence(datasets.Value("int64"), length=4),
@@ -171,11 +171,11 @@ class WaterFlowCounter(datasets.GeneratorBasedBuilder):
171
 
172
 
173
  yield idx, {
174
- "filename": file,
175
  "image": {"path": filepath, "bytes": image_bytes},
176
  "width": width,
177
  "height": height,
178
- "annotations": {
179
  "id": ids,
180
  "area": all_area,
181
  "bbox": all_bbox,
 
61
  def _info(self):
62
  features = datasets.Features(
63
  {
64
+ "image_id": datasets.Value("int32"),
65
  "image": datasets.Image(),
66
  "width": datasets.Value('int32'),
67
  "height": datasets.Value('int32'),
68
+ "objects": datasets.Sequence(
69
  {
70
  "id": datasets.Value('int32'),
71
  "bbox": datasets.Sequence(datasets.Value("int64"), length=4),
 
171
 
172
 
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,