From fb6deb21799782ad2c6ff205465aeb3f6a0f399c Mon Sep 17 00:00:00 2001 From: "Yi, Jihyeon" Date: Tue, 15 Oct 2024 15:20:50 +0900 Subject: [PATCH 1/2] load visiblity from annotation file in datumaro format --- src/datumaro/plugins/data_formats/datumaro/base.py | 1 + tests/unit/data_formats/datumaro/conftest.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/datumaro/plugins/data_formats/datumaro/base.py b/src/datumaro/plugins/data_formats/datumaro/base.py index a4034269f7..da83a18ced 100644 --- a/src/datumaro/plugins/data_formats/datumaro/base.py +++ b/src/datumaro/plugins/data_formats/datumaro/base.py @@ -339,6 +339,7 @@ def _load_annotations(self, item: Dict): points, label=label_id, id=ann_id, + visibility=ann.get("visibility"), attributes=attributes, group=group, object_id=object_id, diff --git a/tests/unit/data_formats/datumaro/conftest.py b/tests/unit/data_formats/datumaro/conftest.py index 9d08a31700..71fc8b1cd0 100644 --- a/tests/unit/data_formats/datumaro/conftest.py +++ b/tests/unit/data_formats/datumaro/conftest.py @@ -91,7 +91,7 @@ def fxt_test_datumaro_format_dataset(): }, ), Points( - [1, 2, 2, 0, 1, 1], + [1, 2, 0, 0, 1, 1], label=0, id=5, z_order=4, @@ -99,6 +99,7 @@ def fxt_test_datumaro_format_dataset(): "x": 1, "y": "2", }, + visibility=[1, 0, 2], ), Mask( label=3, From 98d62b1da9c931d91e822d151d7dfb35251697fd Mon Sep 17 00:00:00 2001 From: "Yi, Jihyeon" Date: Tue, 15 Oct 2024 15:43:29 +0900 Subject: [PATCH 2/2] change log --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8eb1edf2f..b944af5c92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 () ### Bug fixes +- Fix datumaro format to load visibility information from Points annotations + () ## Q4 2024 Release 1.9.1 ### Enhancements