Skip to content

Commit

Permalink
[GSoc2024] Added labels in dataset_meta.json of widerface_dataset to …
Browse files Browse the repository at this point in the history
…solve import issue #7258 of opencv/cvat (#36)

* Add labels in dataset_meta.json of widerface_dataset

* Update dataset_meta.json, relevant tests in test_wilderface_format.py for wilderface_dataset
  • Loading branch information
teja1412-hub authored Mar 29, 2024
1 parent 068d569 commit 3e33d6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/assets/widerface_dataset/dataset_meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"label_map": {"0": "Parade", "1": "Handshaking"}
"labels": ["face"]
}
11 changes: 7 additions & 4 deletions tests/test_widerface_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ def test_can_import(self):
"pose": "0",
"invalid": "0",
},
label=0,
),
Label(0),
],
),
DatasetItem(
Expand All @@ -452,6 +452,7 @@ def test_can_import(self):
"pose": "0",
"invalid": "0",
},
label=0,
),
Bbox(
5,
Expand All @@ -466,8 +467,8 @@ def test_can_import(self):
"pose": "0",
"invalid": "0",
},
label=0,
),
Label(1),
],
),
DatasetItem(
Expand All @@ -488,6 +489,7 @@ def test_can_import(self):
"pose": "2",
"invalid": "0",
},
label=0,
),
Bbox(
3,
Expand All @@ -502,6 +504,7 @@ def test_can_import(self):
"pose": "0",
"invalid": "0",
},
label=0,
),
Bbox(
5,
Expand All @@ -516,12 +519,12 @@ def test_can_import(self):
"pose": "2",
"invalid": "0",
},
label=0,
),
Label(0),
],
),
],
categories=["Parade", "Handshaking"],
categories=["face"],
)

dataset = Dataset.import_from(DUMMY_DATASET_DIR, "wider_face")
Expand Down

0 comments on commit 3e33d6e

Please sign in to comment.