diff --git a/changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md b/changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md new file mode 100644 index 00000000000..91ed0ff84c0 --- /dev/null +++ b/changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md @@ -0,0 +1,4 @@ +### Added + +- Datumaro format now supports skeletons + () diff --git a/cvat/requirements/base.in b/cvat/requirements/base.in index 6cbfb10321a..f5b041d0064 100644 --- a/cvat/requirements/base.in +++ b/cvat/requirements/base.in @@ -6,7 +6,7 @@ azure-storage-blob==12.13.0 boto3==1.17.61 clickhouse-connect==0.6.8 coreapi==2.3.3 -datumaro @ git+https://github.com/cvat-ai/datumaro.git@82982b16b178eb3f39c707795bb68a3306610abf +datumaro @ git+https://github.com/cvat-ai/datumaro.git@2a4d9dbbd86f2e5fc5f8db2cfd2defdf464e9645 dj-pagination==2.5.0 # Despite direct indication allauth in requirements we should keep 'with_social' for dj-rest-auth # to avoid possible further versions conflicts (we use registration functionality) diff --git a/cvat/requirements/base.txt b/cvat/requirements/base.txt index 8c620c55ad4..9193d839860 100644 --- a/cvat/requirements/base.txt +++ b/cvat/requirements/base.txt @@ -1,4 +1,4 @@ -# SHA1:72d30d3a78182797ba879af4b7b50f17ecaf2e8f +# SHA1:e320604118ebbbb6f9a0460d977e416d4cb27200 # # This file is autogenerated by pip-compile-multi # To update, run: @@ -16,7 +16,7 @@ attrs==21.4.0 # -r cvat/requirements/base.in # datumaro # jsonschema -azure-core==1.30.1 +azure-core==1.30.2 # via # azure-storage-blob # msrest @@ -30,7 +30,7 @@ botocore==1.20.112 # s3transfer cachetools==5.3.3 # via google-auth -certifi==2024.2.2 +certifi==2024.7.4 # via # clickhouse-connect # msrest @@ -51,13 +51,13 @@ coreschema==0.0.4 # via coreapi crontab==1.0.1 # via rq-scheduler -cryptography==42.0.7 +cryptography==42.0.8 # via # azure-storage-blob # pyjwt cycler==0.12.1 # via matplotlib -datumaro @ git+https://github.com/cvat-ai/datumaro.git@82982b16b178eb3f39c707795bb68a3306610abf +datumaro @ git+https://github.com/cvat-ai/datumaro.git@2a4d9dbbd86f2e5fc5f8db2cfd2defdf464e9645 # via -r cvat/requirements/base.in defusedxml==0.7.1 # via @@ -67,9 +67,9 @@ deprecated==1.2.14 # via limits dj-pagination==2.5.0 # via -r cvat/requirements/base.in -dj-rest-auth[with_social]==5.0.2 +dj-rest-auth[with-social]==5.0.2 # via -r cvat/requirements/base.in -django==4.2.13 +django==4.2.14 # via # -r cvat/requirements/base.in # dj-rest-auth @@ -100,7 +100,7 @@ django-crum==0.7.9 # via -r cvat/requirements/base.in django-filter==2.4.0 # via -r cvat/requirements/base.in -django-health-check==3.18.2 +django-health-check==3.18.3 # via -r cvat/requirements/base.in django-rq==2.8.1 # via -r cvat/requirements/base.in @@ -117,17 +117,17 @@ easyprocess==1.1 # via pyunpack entrypoint2==1.1 # via pyunpack -fonttools==4.51.0 +fonttools==4.53.1 # via matplotlib freezegun==1.5.1 # via rq-scheduler furl==2.1.0 # via -r cvat/requirements/base.in -google-api-core==2.19.0 +google-api-core==2.19.1 # via # google-cloud-core # google-cloud-storage -google-auth==2.29.0 +google-auth==2.32.0 # via # google-api-core # google-cloud-core @@ -138,15 +138,15 @@ google-cloud-storage==1.42.0 # via -r cvat/requirements/base.in google-crc32c==1.5.0 # via google-resumable-media -google-resumable-media==2.7.0 +google-resumable-media==2.7.1 # via google-cloud-storage -googleapis-common-protos==1.63.0 +googleapis-common-protos==1.63.2 # via google-api-core h5py==3.11.0 # via datumaro idna==3.7 # via requests -importlib-metadata==7.1.0 +importlib-metadata==8.0.0 # via clickhouse-connect importlib-resources==6.4.0 # via limits @@ -168,7 +168,7 @@ jsonschema==4.17.3 # via drf-spectacular kiwisolver==1.4.5 # via matplotlib -limits==3.12.0 +limits==3.13.0 # via python-logstash-async lxml==5.2.2 # via @@ -196,9 +196,9 @@ oauthlib==3.2.2 # via requests-oauthlib orderedmultidict==1.0.1 # via furl -orjson==3.10.3 +orjson==3.10.6 # via datumaro -packaging==24.0 +packaging==24.1 # via # limits # matplotlib @@ -212,9 +212,9 @@ pdf2image==1.14.0 # via -r cvat/requirements/base.in pottery==3.0.0 # via -r cvat/requirements/base.in -proto-plus==1.23.0 +proto-plus==1.24.0 # via google-api-core -protobuf==4.25.3 +protobuf==5.27.2 # via # google-api-core # googleapis-common-protos @@ -233,7 +233,7 @@ pyasn1-modules==0.4.0 # via # google-auth # python-ldap -pycocotools==2.0.7 +pycocotools==2.0.8 # via datumaro pycparser==2.22 # via cffi @@ -281,7 +281,7 @@ redis==4.6.0 # django-rq # pottery # rq -requests==2.31.0 +requests==2.32.3 # via # -r cvat/requirements/base.in # azure-core @@ -312,11 +312,11 @@ ruamel-yaml==0.18.6 # via datumaro ruamel-yaml-clib==0.2.8 # via ruamel-yaml -rules==3.3 +rules==3.4 # via -r cvat/requirements/base.in s3transfer==0.4.2 # via boto3 -scipy==1.13.0 +scipy==1.13.1 # via datumaro shapely==1.7.1 # via -r cvat/requirements/base.in @@ -331,7 +331,7 @@ sqlparse==0.5.0 # via django tensorboardx==2.6.2.2 # via datumaro -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via # asgiref # azure-core @@ -344,7 +344,7 @@ uritemplate==4.1.1 # via # coreapi # drf-spectacular -urllib3==1.26.18 +urllib3==1.26.19 # via # botocore # clickhouse-connect @@ -355,7 +355,7 @@ xmlsec==1.3.14 # via # -r cvat/requirements/base.in # python3-saml -zipp==3.18.2 +zipp==3.19.2 # via importlib-metadata zstandard==0.22.0 # via clickhouse-connect diff --git a/cvat/requirements/development.txt b/cvat/requirements/development.txt index a3a62de1670..6c42a9fd5ba 100644 --- a/cvat/requirements/development.txt +++ b/cvat/requirements/development.txt @@ -9,7 +9,7 @@ astroid==2.11.7 # via pylint -autopep8==2.1.0 +autopep8==2.3.1 # via django-silk black==24.4.2 # via -r cvat/requirements/development.in @@ -19,7 +19,7 @@ django-extensions==3.0.8 # via -r cvat/requirements/development.in django-silk==5.0.3 # via -r cvat/requirements/development.in -gprof2dot==2022.7.29 +gprof2dot==2024.6.6 # via django-silk isort==5.13.2 # via pylint @@ -35,7 +35,7 @@ platformdirs==4.2.2 # via # black # pylint -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via autopep8 pylint==2.14.5 # via @@ -57,11 +57,11 @@ tomli==2.0.1 # autopep8 # black # pylint -tomlkit==0.12.5 +tomlkit==0.13.0 # via pylint -tornado==6.4 +tornado==6.4.1 # via snakeviz # The following packages are considered to be unsafe in a requirements file: -setuptools==70.0.0 +setuptools==70.3.0 # via astroid diff --git a/cvat/requirements/production.txt b/cvat/requirements/production.txt index f51b7bc0c96..dc17626e0ca 100644 --- a/cvat/requirements/production.txt +++ b/cvat/requirements/production.txt @@ -9,7 +9,7 @@ --no-binary lxml --no-binary xmlsec -anyio==4.3.0 +anyio==4.4.0 # via watchfiles coverage==7.2.3 # via -r cvat/requirements/production.in @@ -27,7 +27,7 @@ uvicorn[standard]==0.22.0 # via -r cvat/requirements/production.in uvloop==0.19.0 # via uvicorn -watchfiles==0.21.0 +watchfiles==0.22.0 # via uvicorn websockets==12.0 # via uvicorn diff --git a/site/content/en/docs/manual/advanced/formats/_index.md b/site/content/en/docs/manual/advanced/formats/_index.md index afdf0fb9b8a..de1bddc6d36 100644 --- a/site/content/en/docs/manual/advanced/formats/_index.md +++ b/site/content/en/docs/manual/advanced/formats/_index.md @@ -23,7 +23,7 @@ The table below outlines the available formats for data export in CVAT. -| Format | Type | Computer Vision Task | Models | Shapes | Attributes | Video Tracks | +| Format | Type | Computer Vision Task | Models | Shapes | Attributes | Video Tracks | | ----------------------------------------------------------------------------------------------------------------------------------- | ------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------- | ------------- | | [CamVid 1.0](format-camvid) | .txt
.png | Semantic
Segmentation | U-Net, SegNet, DeepLab,
PSPNet, FCN, Mask R-CNN,
ICNet, ERFNet, HRNet,
V-Net, and others. | Polygons | Not supported | Not supported | | [Cityscapes 1.0](format-cityscapes) | .txt
.png | Semantic
Segmentation | U-Net, SegNet, DeepLab,
PSPNet, FCN, ERFNet,
ICNet, Mask R-CNN, HRNet,
ENet, and others. | Polygons | Specific attributes | Not supported | @@ -31,7 +31,7 @@ The table below outlines the available formats for data export in CVAT. | [COCO Keypoints 1.0](coco-keypoints) | .xml | Keypoints | OpenPose, PoseNet, AlphaPose,
SPM (Single Person Model),
Mask R-CNN with Keypoint Detection:, and others. | Skeletons | Specific attributes | Not supported | | {{< ilink "/docs/manual/advanced/formats/format-cvat#cvat-for-image-export" "CVAT for images 1.1" >}} | .xml | Any in 2D except for Video Tracking | Any model that can decode the format. | Bounding Boxes, Polygons,
Polylines, Points, Cuboids,
Skeletons, Ellipses, Masks, Tags. | All attributes | Not supported | | {{< ilink "/docs/manual/advanced/formats/format-cvat#cvat-for-videos-export" "CVAT for video 1.1" >}} | .xml | Any in 2D except for Classification | Any model that can decode the format. | Bounding Boxes, Polygons,
Polylines, Points, Cuboids,
Skeletons, Ellipses, Masks. | All attributes | Supported | -| [Datumaro 1.0](format-datumaro) | JSON | Any | Any model that can decode the format.
Main format in [Datumaro](https://github.com/openvinotoolkit/datumaro) framework | Bounding Boxes, Polygons,
Polylines, Points, Cuboids,
Tags, Ellipses, Masks. | All attributes | Supported | +| [Datumaro 1.0](format-datumaro) | JSON | Any | Any model that can decode the format.
Main format in [Datumaro](https://github.com/openvinotoolkit/datumaro) framework | Bounding Boxes, Polygons,
Polylines, Points, Cuboids,
Skeletons, Ellipses, Masks, Tags. | All attributes | Supported | | [ICDAR](format-icdar)
Includes ICDAR Recognition 1.0,
ICDAR Detection 1.0,
and ICDAR Segmentation 1.0
descriptions. | .txt | Text recognition,
Text detection,
Text segmentation | EAST: Efficient and Accurate
Scene Text Detector, CRNN, Mask TextSpotter, TextSnake,
and others. | Tag, Bounding Boxes, Polygons | Specific attributes | Not supported | | [ImageNet 1.0](format-imagenet) | .jpg
.txt | Semantic Segmentation,
Classification,
Detection | VGG (VGG16, VGG19), Inception, YOLO, Faster R-CNN , U-Net, and others | Tags | No attributes | Not supported | | [KITTI 1.0](format-kitti) | .txt
.png | Semantic Segmentation, Detection, 3D | PointPillars, SECOND, AVOD, YOLO, DeepSORT, PWC-Net, ORB-SLAM, and others. | Bounding Boxes, Polygons | Specific attributes | Not supported | diff --git a/site/content/en/docs/manual/advanced/formats/format-datumaro.md b/site/content/en/docs/manual/advanced/formats/format-datumaro.md index f75d1e59f17..e3b5918f4d3 100644 --- a/site/content/en/docs/manual/advanced/formats/format-datumaro.md +++ b/site/content/en/docs/manual/advanced/formats/format-datumaro.md @@ -21,7 +21,7 @@ For more information, see: For export of images: any 2D shapes, tags - Supported annotations: Bounding Boxes, Polygons, Polylines, - Masks, Points, Cuboids, Tags + Masks, Points, Cuboids, Tags, Skeletons - Attributes: Supported. - Tracks: Supported. @@ -41,7 +41,7 @@ taskname.zip/ # Import annotations in Datumaro format - supported annotations: Bounding Boxes, Polygons, Polylines, - Masks, Points, Cuboids, Labels + Masks, Points, Cuboids, Labels, Skeletons - supported attributes: any Uploaded file: a zip archive of the following structure: diff --git a/tests/python/rest_api/test_projects.py b/tests/python/rest_api/test_projects.py index 9a98632e93e..9b6fc735f10 100644 --- a/tests/python/rest_api/test_projects.py +++ b/tests/python/rest_api/test_projects.py @@ -586,36 +586,31 @@ def test_can_import_dataset_in_org(self, admin_user): self._test_import_project(admin_user, project_id, "CVAT 1.1", import_data) - def test_can_export_and_import_dataset_with_skeletons_coco_keypoints(self, admin_user): - project_id = 5 - - response = self._test_export_project(admin_user, project_id, format="COCO Keypoints 1.0") - - tmp_file = io.BytesIO(response.data) - tmp_file.name = "dataset.zip" - import_data = { - "dataset_file": tmp_file, - } - - self._test_import_project(admin_user, project_id, "COCO Keypoints 1.0", import_data) - - def test_can_export_and_import_dataset_with_skeletons_cvat_for_images(self, admin_user): - project_id = 5 - - response = self._test_export_project(admin_user, project_id) - - tmp_file = io.BytesIO(response.data) - tmp_file.name = "dataset.zip" - import_data = { - "dataset_file": tmp_file, - } - - self._test_import_project(admin_user, project_id, "CVAT 1.1", import_data) - - def test_can_export_and_import_dataset_with_skeletons_cvat_for_video(self, admin_user): - project_id = 5 + @pytest.mark.parametrize( + "export_format, import_format", + ( + ("COCO Keypoints 1.0", "COCO Keypoints 1.0"), + ("CVAT for images 1.1", "CVAT 1.1"), + ("CVAT for video 1.1", "CVAT 1.1"), + ("Datumaro 1.0", "Datumaro 1.0"), + ), + ) + def test_can_export_and_import_dataset_with_skeletons( + self, annotations, tasks, admin_user, export_format, import_format + ): + tasks_with_skeletons = [ + int(task_id) + for task_id in annotations["task"] + for element in annotations["task"][task_id]["shapes"] + if element["type"] == "skeleton" + ] + project_id = next( + task["project_id"] + for task in tasks + if task["id"] in tasks_with_skeletons and task["project_id"] is not None + ) - response = self._test_export_project(admin_user, project_id, format="CVAT for video 1.1") + response = self._test_export_project(admin_user, project_id, format=export_format) tmp_file = io.BytesIO(response.data) tmp_file.name = "dataset.zip" @@ -623,7 +618,7 @@ def test_can_export_and_import_dataset_with_skeletons_cvat_for_video(self, admin "dataset_file": tmp_file, } - self._test_import_project(admin_user, project_id, "CVAT 1.1", import_data) + self._test_import_project(admin_user, project_id, import_format, import_data) def _test_can_get_project_backup(self, username, pid, **kwargs): for _ in range(30): diff --git a/utils/dataset_manifest/requirements.txt b/utils/dataset_manifest/requirements.txt index c69cb304507..be4701ee47d 100644 --- a/utils/dataset_manifest/requirements.txt +++ b/utils/dataset_manifest/requirements.txt @@ -11,9 +11,9 @@ natsort==8.0.0 # via -r utils/dataset_manifest/requirements.in numpy==1.22.4 # via opencv-python-headless -opencv-python-headless==4.9.0.80 +opencv-python-headless==4.10.0.84 # via -r utils/dataset_manifest/requirements.in -pillow==10.3.0 +pillow==10.4.0 # via -r utils/dataset_manifest/requirements.in tqdm==4.66.4 # via -r utils/dataset_manifest/requirements.in