Переглянути джерело

Add file with non unique image filenames

sfmig 1 рік тому
батько
коміт
3b61b90225

+ 2 - 1
files-registry.txt

@@ -1,4 +1,4 @@
-DATA_DESCRIPTION.md 8e25497ac0a5f3afe70cd92df84c1d9eba4d5a45172b73c7e78830c30c098db6
+README.md 341300d6a2479092011af3901b23609c4e49a027583dd8be0edb24c49c6c42ba
 test_annotations/medium_bboxes_dataset_COCO/COCO_JSON_sample_1.json 8bdea1ed408aaf6ad5eb8deed2f47c16fcff35697ad4983f59afb7462de9c5df
 test_annotations/medium_bboxes_dataset_COCO/COCO_JSON_sample_2.json 7ea3d6d152921294e0ab71740249c87eb5aecbb95a2b6554ab3e89a1d4e59b82
 test_annotations/medium_bboxes_dataset_VIA/VIA_JSON_sample_1.json 3d197d8fbd6121a32d729486c7511eb6d8451371a67fbae791a2309f27c8fb19
@@ -7,6 +7,7 @@ test_annotations/small_bboxes_dataset/small_bboxes_COCO.json c68faaf3b51282841b8
 test_annotations/small_bboxes_dataset/small_bboxes_VIA.json 6780a3b3130a11b7de78c22d421dcf9507288320f596740309516f039e4292fa
 test_annotations/small_bboxes_dataset_duplicates/small_bboxes_duplicates_COCO.json e33cf26c130b338075254e878e82e6f1f05d6927385945903cb11ca4ca1a1e53
 test_annotations/small_bboxes_dataset_duplicates/small_bboxes_duplicates_VIA.json 90c0dfba401d62a168bda231709d899ee3314bd4c9ab5df6483674cf0a47585d
+test_annotations/small_bboxes_dataset_errors/small_bboxes_non_unique_img_filename_VIA.json 5cdf136aa65be68bed3cecf05ace2304dafdc36013aafd0624a63caba679a4a8
 test_annotations/small_bboxes_dataset_errors/small_bboxes_non_unique_img_id_COCO.json 8615bdf983e06aa18dc99c31734f7990923e42abb465b27ab61f66ef77bcd2fb
 test_annotations/small_bboxes_dataset_no_categories/small_bboxes_no_cat_COCO.json 56bb5934e3552a76dd512948d6e4b0ff93037d92b67549a571f10b1b597c2b7d
 test_annotations/small_bboxes_dataset_no_categories/small_bboxes_no_cat_VIA.json 4187c3a265aecd42010b77f6d09db68ea2369c20e2ab336877c079de990b0e14

+ 12 - 8
test_data/README.md

@@ -50,14 +50,6 @@ A small size bounding boxes dataset in VIA, COCO and VIA-CSV formats without cat
 | `small_bboxes_no_cat_COCO.json` | bboxes | COCO | 3 | 3 |  No categories are specified, so no annotations are exported in COCO format. This data should throw an error. |
 | `small_bboxes_null_catID_COCO.json` | bboxes | COCO | 3 | 3 | The category ID in the VIA tool is not an integer, so when exporting the annotations to COCO format the category ID is set to `null`. This data should throw an error. |
 
-#### `small_bboxes_dataset_errors`
-
-Small size bounding boxes datasets with errors to catch.
-
-| File name | Type | Format | N annotations | N images | Comments |
-| --- | --- | --- | --- | --- | --- |
-| `small_bboxes_non_unique_img_id_COCO.json` | bboxes | COCO | 4 | 4 | Two images have the same filename and image ID. This happens if two images have the same number-based filename, because the imageID is extracted using [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) when exporting as COCO in the VIA tool.|
-
 #### `small_bboxes_dataset_subset`
 
 A subset of the corresponding small bounding boxes datasets. If prefixed with `_plus` it contains some additional annotations. See description of the corresponding dataset for more details. The files with the same name except for the format identifier contain the exact same annotations.
@@ -68,3 +60,15 @@ A subset of the corresponding small bounding boxes datasets. If prefixed with `_
 | `small_bboxes_VIA_subset_plus.json` | bboxes | VIA | 3 | 3 | Same as `small_bboxes_VIA_subset.json` but with one additional annotation, different from any of the annotations in `small_bboxes_VIA.json`.|
 | `small_bboxes_COCO_subset.json` | bboxes | VIA | 2 | 3 | Same as `small_bboxes_COCO.json` but the last annotation in the last frame has been removed. |
 | `small_bboxes_COCO_subset_plus.json` | bboxes | VIA | 3 | 3 | Same as `small_bboxes_COCO_subset.json` but with one additional annotation, different from any of the annotations in `small_bboxes_COCO.json`.|
+
+
+#### `small_bboxes_dataset_errors`
+
+Small size bounding boxes datasets with errors to catch.
+
+| File name | Type | Format | N annotations | N images | Comments |
+| --- | --- | --- | --- | --- | --- |
+| `small_bboxes_non_unique_img_id_COCO.json` | bboxes | COCO | 4 | 4 | Two images have the same filename and image ID. This happens if two images have the same number-based filename, because the imageID is extracted using [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt) when exporting as COCO in the VIA tool.|
+| `small_bboxes_non_unique_img_filename_VIA.json` | bboxes | VIA | 4 | 4 | Two images have the same filename. |
+
+

+ 132 - 0
test_data/test_annotations/small_bboxes_dataset_errors/small_bboxes_non_unique_img_filename_VIA.json

@@ -0,0 +1,132 @@
+{
+    "_via_attributes": {
+        "file": {},
+        "region": {
+            "animal": {
+                "default_options": {
+                    "0": true
+                },
+                "description": "",
+                "options": {
+                    "0": "crab"
+                },
+                "type": "dropdown"
+            }
+        }
+    },
+    "_via_data_format_version": "2.0.10",
+    "_via_image_id_list": [
+        "00000.jpg322877",
+        "00083.jpg311221",
+        "00166.jpg324555",
+        "00000.jpg4894585"
+    ],
+    "_via_img_metadata": {
+        "00000.jpg322877": {
+            "file_attributes": {},
+            "filename": "00000.jpg",
+            "regions": [
+                {
+                    "region_attributes": {
+                        "animal": "0"
+                    },
+                    "shape_attributes": {
+                        "height": 187,
+                        "name": "rect",
+                        "width": 294,
+                        "x": 945,
+                        "y": 272
+                    }
+                }
+            ],
+            "size": 322877
+        },
+        "00000.jpg4894585": {
+            "file_attributes": {},
+            "filename": "00000.jpg",
+            "regions": [
+                {
+                    "region_attributes": {
+                        "animal": "0"
+                    },
+                    "shape_attributes": {
+                        "height": 902,
+                        "name": "rect",
+                        "width": 1007,
+                        "x": 1027,
+                        "y": 389
+                    }
+                }
+            ],
+            "size": 4894585
+        },
+        "00083.jpg311221": {
+            "file_attributes": {},
+            "filename": "00083.jpg",
+            "regions": [
+                {
+                    "region_attributes": {
+                        "animal": "0"
+                    },
+                    "shape_attributes": {
+                        "height": 154,
+                        "name": "rect",
+                        "width": 301,
+                        "x": 370,
+                        "y": 288
+                    }
+                }
+            ],
+            "size": 311221
+        },
+        "00166.jpg324555": {
+            "file_attributes": {},
+            "filename": "00166.jpg",
+            "regions": [
+                {
+                    "region_attributes": {
+                        "animal": "0"
+                    },
+                    "shape_attributes": {
+                        "height": 190,
+                        "name": "rect",
+                        "width": 321,
+                        "x": 467,
+                        "y": 315
+                    }
+                }
+            ],
+            "size": 324555
+        }
+    },
+    "_via_settings": {
+        "core": {
+            "buffer_size": 18,
+            "default_filepath": "",
+            "filepath": {}
+        },
+        "project": {
+            "name": "via_project_10Feb2025_13h18m"
+        },
+        "ui": {
+            "annotation_editor_fontsize": 0.8,
+            "annotation_editor_height": 25,
+            "image": {
+                "on_image_annotation_editor_placement": "NEAR_REGION",
+                "region_color": "__via_default_region_color__",
+                "region_label": "__via_region_id__",
+                "region_label_font": "10px Sans"
+            },
+            "image_grid": {
+                "img_height": 80,
+                "rshape_fill": "none",
+                "rshape_fill_opacity": 0.3,
+                "rshape_stroke": "yellow",
+                "rshape_stroke_width": 2,
+                "show_image_policy": "all",
+                "show_region_shape": true
+            },
+            "leftsidebar_width": 18
+        }
+    }
+}