Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeletons in datumaro format #8165

Merged
merged 10 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Added

- Datumaro format now supports skeletons
(<https://github.com/cvat-ai/cvat/pull/8165>)
2 changes: 1 addition & 1 deletion cvat/requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
54 changes: 28 additions & 26 deletions cvat/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# SHA1:72d30d3a78182797ba879af4b7b50f17ecaf2e8f
# SHA1:e320604118ebbbb6f9a0460d977e416d4cb27200
#
# This file is autogenerated by pip-compile-multi
# To update, run:
#
# pip-compile-multi
#
-r ../../utils/dataset_manifest/requirements.txt
--no-binary lxml
--no-binary xmlsec

zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved
asgiref==3.8.1
# via django
Expand All @@ -16,7 +18,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
Expand All @@ -30,7 +32,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
Expand All @@ -51,13 +53,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
Expand All @@ -67,9 +69,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
Expand Down Expand Up @@ -100,7 +102,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
Expand All @@ -117,17 +119,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
Expand All @@ -138,15 +140,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
Expand All @@ -168,7 +170,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
Expand Down Expand Up @@ -196,9 +198,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
Expand All @@ -212,9 +214,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
Expand All @@ -233,7 +235,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
Expand Down Expand Up @@ -281,7 +283,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
Expand Down Expand Up @@ -312,11 +314,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
Expand All @@ -331,7 +333,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
Expand All @@ -344,7 +346,7 @@ uritemplate==4.1.1
# via
# coreapi
# drf-spectacular
urllib3==1.26.18
urllib3==1.26.19
# via
# botocore
# clickhouse-connect
Expand All @@ -355,7 +357,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
14 changes: 8 additions & 6 deletions cvat/requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
# pip-compile-multi
#
-r base.txt
--no-binary lxml
--no-binary xmlsec

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
Expand All @@ -19,7 +21,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
Expand All @@ -35,7 +37,7 @@ platformdirs==4.2.2
# via
# black
# pylint
pycodestyle==2.11.1
pycodestyle==2.12.0
# via autopep8
pylint==2.14.5
# via
Expand All @@ -57,11 +59,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
4 changes: 2 additions & 2 deletions cvat/requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions cvat/requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# pip-compile-multi
#
-r development.txt
--no-binary lxml
--no-binary xmlsec

coverage==7.2.3
# via -r cvat/requirements/testing.in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:
Expand Down
43 changes: 14 additions & 29 deletions tests/python/rest_api/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,44 +568,29 @@ 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):
@pytest.mark.parametrize(
"export_format, import_format",
(
("COCO Keypoints 1.0", "COCO Keypoints 1.0"),
("CVAT for images 1.1", "CVAT 1.1"),
zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved
("CVAT for video 1.1", "CVAT 1.1"),
("Datumaro 1.0", "Datumaro 1.0"),
),
)
def test_can_export_and_import_dataset_with_skeletons(
self, admin_user, export_format, import_format
):
project_id = 5

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"
import_data = {
"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)
Eldies marked this conversation as resolved.
Show resolved Hide resolved

def _test_can_get_project_backup(self, username, pid, **kwargs):
for _ in range(30):
Expand Down
7 changes: 5 additions & 2 deletions utils/dataset_manifest/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
#
# pip-compile-multi
#
--no-binary lxml
--no-binary xmlsec

av==9.2.0
# via -r utils/dataset_manifest/requirements.in
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
Loading