Update WaterFlowCountersRecognition.py
Browse files
WaterFlowCountersRecognition.py
CHANGED
|
@@ -61,11 +61,11 @@ class WaterFlowCounter(datasets.GeneratorBasedBuilder):
|
|
| 61 |
def _info(self):
|
| 62 |
features = datasets.Features(
|
| 63 |
{
|
| 64 |
-
"
|
| 65 |
"image": datasets.Image(),
|
| 66 |
"width": datasets.Value('int32'),
|
| 67 |
"height": datasets.Value('int32'),
|
| 68 |
-
"
|
| 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 |
-
"
|
| 175 |
"image": {"path": filepath, "bytes": image_bytes},
|
| 176 |
"width": width,
|
| 177 |
"height": height,
|
| 178 |
-
"
|
| 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,
|