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

Conversation

Eldies
Copy link
Contributor

@Eldies Eldies commented Jul 15, 2024

Motivation and context

Fixes #8115

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • New Features

    • Added support for exporting and importing Skeletons in the Datumaro format.
  • Bug Fixes

    • Improved testing for dataset export and import to cover multiple formats using parameterization.
  • Documentation

    • Updated documentation to reflect the new "Skeletons" annotation type in Datumaro format.
  • Chores

    • Updated multiple dependencies to their latest versions for improved security and performance.
  • Tests

    • Enhanced test coverage for dataset export and import functionality with new formats.

Copy link
Contributor

coderabbitai bot commented Jul 15, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The update introduces support for skeleton annotations in the Datumaro format. This includes modifications in the dataset export and import functionalities, with several dependency updates for enhanced compatibility and performance. Additionally, multiple test files were refactored to include parameterized testing for different formats, ensuring robust validation.

Changes

Files Change Summary
changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md Added changelog entry for support of skeletons in Datumaro format.
cvat/requirements/base.in, cvat/requirements/base.txt Updated the datumaro package along with various other dependencies.
cvat/requirements/development.txt Updated versions of development dependencies like autopep8, gprof2dot, pycodestyle, etc.
cvat/requirements/production.txt Updated versions of anyio and watchfiles.
cvat/requirements/testing.txt Added --no-binary options for lxml and xmlsec.
site/content/en/docs/manual/advanced/formats/format-datumaro.md Updated documentation to include support for skeletons in Datumaro format.
tests/python/rest_api/test_projects.py Refactored test_can_export_and_import_dataset_with_skeletons to use parameterization for different formats like COCO Keypoints, CVAT for images and video, Datumaro.
utils/dataset_manifest/requirements.txt Added --no-binary options and updated versions for opencv-python-headless and pillow.

Sequence Diagram(s)

Not applicable as the changes are primarily related to adding new dependency support and minor refactoring.

Assessment against linked issues

Objective Addressed Explanation
Ability to export Datumaro 1.0 format without errors (#8115)
Support skeleton annotations in Datumaro format (#8115)

Poem

In lines of code, new structures form,
For Datumaro, now skeletons storm.
With versions fresh, dependencies aligned,
Export and import seamlessly combined.
Bugs now squashed, the data flows,
In CVAT's garden, a new feature grows. 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Eldies Eldies force-pushed the dl/skeletons-in-datumaro-format branch from 12a78a0 to 39450d7 Compare July 15, 2024 07:08
@Eldies Eldies marked this pull request as ready for review July 15, 2024 07:18
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (1)
cvat/requirements/base.txt (1)

72-72: Verify compatibility of dj-rest-auth[with-social] version 5.0.2.

The update to version 5.0.2 introduces changes in how settings are handled, which may affect session and token authentication flows. Please review the following points:

  • Comments in cvat/apps/iam/views.py indicate potential issues with handling two authentication flows simultaneously.
  • There is a related issue documented: GitHub Issue #604.

Ensure that these changes do not introduce any breaking changes or incompatibilities with the rest of the codebase.

Analysis chain

Verify compatibility of dj-rest-auth[with-social] version 5.0.2.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

#!/bin/bash
# Description: Verify compatibility of `dj-rest-auth[with-social]` version `5.0.

</details>

<details>
<summary>Scripts executed</summary>

The following scripts were executed for the analysis:



---

Script:

```shell
#!/bin/bash
# Find all occurrences of `dj-rest-auth` in the codebase to understand its usage and integration.
rg 'dj-rest-auth' -A 5

Length of output: 3685

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9565cff and 39450d7.

Files selected for processing (9)
  • changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md (1 hunks)
  • cvat/requirements/base.in (1 hunks)
  • cvat/requirements/base.txt (17 hunks)
  • cvat/requirements/development.txt (4 hunks)
  • cvat/requirements/production.txt (2 hunks)
  • cvat/requirements/testing.txt (1 hunks)
  • site/content/en/docs/manual/advanced/formats/format-datumaro.md (2 hunks)
  • tests/python/rest_api/test_projects.py (1 hunks)
  • utils/dataset_manifest/requirements.txt (1 hunks)
Files skipped from review due to trivial changes (4)
  • changelog.d/20240715_110113_dlavrukhin_skeletons_in_datumaro_format.md
  • cvat/requirements/base.in
  • cvat/requirements/production.txt
  • cvat/requirements/testing.txt
Additional comments not posted (17)
utils/dataset_manifest/requirements.txt (3)

8-9: LGTM! Ensure compatibility with source installations.

The addition of --no-binary options for lxml and xmlsec ensures they are installed from source, which can help avoid potential issues with precompiled binaries.


17-17: Verify compatibility of opencv-python-headless version 4.10.0.84.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

Verified compatibility of opencv-python-headless version 4.10.0.84.

The update does not introduce any breaking changes or incompatibilities with the rest of the codebase.

  • Instances of cv2 functions and methods are used across various files.
  • The functions and methods used are standard and should be compatible with the new version.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `opencv-python-headless` version `4.10.0.84`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import cv2'

Length of output: 67


Script:

#!/bin/bash
# Description: Verify compatibility of `opencv-python-headless` version `4.10.0.84`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --glob '*.py' -A 5 'import cv2'

Length of output: 6465


Script:

#!/bin/bash
# Description: Verify compatibility of `opencv-python-headless` version `4.10.0.84`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.

# List of files where `import cv2` is used
files=(
  "utils/dataset_manifest/utils.py"
  "serverless/openvino/dextr/nuclio/model_handler.py"
  "serverless/onnx/WongKinYiu/yolov7/nuclio/model_handler.py"
  "serverless/pytorch/saic-vul/hrnet/nuclio/model_handler.py"
  "serverless/pytorch/shiyinzhang/iog/nuclio/model_handler.py"
  "serverless/openvino/omz/intel/text-detection-0004/nuclio/model_handler.py"
  "serverless/openvino/omz/intel/semantic-segmentation-adas-0001/nuclio/model_handler.py"
  "serverless/pytorch/saic-vul/fbrs/nuclio/model_handler.py"
  "serverless/openvino/omz/public/mask_rcnn_inception_resnet_v2_atrous_coco/nuclio/model_handler.py"
  "serverless/openvino/base/model_loader.py"
  "cvat/apps/engine/utils.py"
  "cvat/apps/dataset_manager/formats/transformations.py"
  "cvat/apps/engine/frame_provider.py"
  "cvat/apps/engine/cache.py"
)

# Search for usage of `cv2` functions and methods in the identified files
for file in "${files[@]}"; do
  echo "Checking $file"
  rg 'cv2\.' "$file"
done

Length of output: 6411


19-19: Verify compatibility of pillow version 10.4.0.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

cvat/requirements/development.txt (7)

9-10: LGTM! Ensure compatibility with source installations.

The addition of --no-binary options for lxml and xmlsec ensures they are installed from source, which can help avoid potential issues with precompiled binaries.


24-24: Verify compatibility of gprof2dot version 2024.6.6.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.


14-14: Verify compatibility of autopep8 version 2.3.1.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

Let's correct the file type and re-run the script to verify the compatibility of autopep8 version 2.3.1.


To ensure thorough verification, let's search for any usage of autopep8 in shell scripts and configuration files.


Verified compatibility of autopep8 version 2.3.1.

No issues found with the update to autopep8 version 2.3.1. The tool is not directly imported or used in the codebase, indicating it is likely used as a development tool.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `autopep8` version `2.3.1`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import autopep8'

Length of output: 72


Script:

#!/bin/bash
# Description: Verify compatibility of `autopep8` version `2.3.1`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type py -A 5 $'import autopep8'

Length of output: 37


Script:

#!/bin/bash
# Description: Verify usage of `autopep8` in shell scripts and configuration files.

# Test: Check for any usage of `autopep8` in shell scripts.
# Expect: No issues found.
rg 'autopep8' --type sh

# Test: Check for any usage of `autopep8` in configuration files.
# Expect: No issues found.
rg 'autopep8' --type yaml --type json --type toml

Length of output: 73


62-62: Verify compatibility of tomlkit version 0.13.0.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

The update to tomlkit version 0.13.0 appears to be safe.

No instances of tomlkit imports or usage were found in the Python codebase, indicating that the library is not being used directly. It is likely safe to proceed with the update.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `tomlkit` version `0.13.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import tomlkit'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify compatibility of `tomlkit` version `0.13.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --glob '*.py' -A 5 'import tomlkit'

Length of output: 40


Script:

#!/bin/bash
# Description: Verify compatibility of `tomlkit` version `0.13.0`.

# Test: Check for any usage of `tomlkit` in the codebase.
# Expect: No issues found.
rg --glob '*.py' 'tomlkit'

Length of output: 26


40-40: Verify compatibility of pycodestyle version 2.12.0.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

Verified compatibility of pycodestyle version 2.12.0.

The only reference to pycodestyle in the codebase is in the cvat/requirements/development.txt file, indicating it is used as a development dependency. No issues or incompatibilities were found with the update to version 2.12.0.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `pycodestyle` version `2.12.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import pycodestyle'

Length of output: 75


Script:

#!/bin/bash
# Description: Verify compatibility of `pycodestyle` version `2.12.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type py -A 5 'import pycodestyle'

Length of output: 40


Script:

#!/bin/bash
# Description: Verify compatibility of `pycodestyle` version `2.12.0`.

# Test: Check for any references to `pycodestyle` in the codebase.
# Expect: No issues found.
rg 'pycodestyle'

Length of output: 70


64-64: Verify compatibility of tornado version 6.4.1.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

Verified compatibility of tornado version 6.4.1.

The usage of tornado is limited to template files in cvat-sdk/gen/templates/openapi-generator/api_client.mustache. No direct Python code imports tornado. Therefore, the update to tornado==6.4.1 should not introduce any immediate issues.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `tornado` version `6.4.1`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import tornado'

Length of output: 71


Script:

#!/bin/bash
# Description: Verify compatibility of `tornado` version `6.4.1`.

# Find all Python files and search for `import tornado` within those files.
fd --extension py --exec rg 'import tornado' {}

Length of output: 51


Script:

#!/bin/bash
# Description: Verify compatibility of `tornado` version `6.4.1`.

# Find all Python files and search for `tornado` import statements with more context.
fd --extension py --exec rg 'import tornado' -A 10 {}

Length of output: 57


Script:

#!/bin/bash
# Description: Verify any usage of `tornado` in the codebase.

# Search for any occurrences of `tornado` in the codebase.
rg 'tornado'

Length of output: 1106


68-68: Verify compatibility of setuptools version 70.3.0.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

Verification successful

Let's update the script to correctly search for the usage of setuptools in all Python files.


Let's extend the search to include the setup.py file and other potential places where setuptools might be used.


The setuptools library is used in cvat-cli/setup.py. We need to verify that the functions from setuptools used in this file are compatible with version 70.3.0.


Let's extend the search to capture the full context of setuptools usage in cvat-cli/setup.py.


Verified compatibility of setuptools version 70.3.0.

The setuptools library is used in cvat-cli/setup.py for standard functions (setup and find_packages). These functions are core to setuptools and are unlikely to have breaking changes in a minor version update. No issues were found.

  • cvat-cli/setup.py: Uses setuptools for setup and find_packages.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify compatibility of `setuptools` version `70.3.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg --type python -A 5 $'import setuptools'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify compatibility of `setuptools` version `70.3.0`.

# Test: Check for any breaking changes or incompatibilities introduced by the new version.
# Expect: No issues found.
rg 'import setuptools' --glob '*.py' -A 5

Length of output: 43


Script:

#!/bin/bash
# Description: Verify compatibility of `setuptools` version `70.3.0`.

# Test: Check for any usage of `setuptools` in the setup files and other potential places.
# Expect: No issues found.

# Search in setup.py and other related files
rg 'setuptools' --glob '*setup.py' -A 5

Length of output: 310


Script:

#!/bin/bash
# Description: Verify compatibility of `setuptools` version `70.3.0`.

# Test: Check for usage of `setuptools` functions in `cvat-cli/setup.py`.
# Expect: No issues found.

# Search for usage of `setuptools` functions in `cvat-cli/setup.py`
rg 'setuptools' cvat-cli/setup.py -A 10

Length of output: 346


Script:

#!/bin/bash
# Description: Verify compatibility of `setuptools` version `70.3.0`.

# Test: Check for usage of `setuptools` functions in `cvat-cli/setup.py`.
# Expect: No issues found.

# Search for usage of `setuptools` functions in `cvat-cli/setup.py`
rg 'setuptools' cvat-cli/setup.py -A 50

Length of output: 1687

site/content/en/docs/manual/advanced/formats/format-datumaro.md (2)

24-24: LGTM! Skeleton annotations support added to export section.

The export section now correctly includes information about skeleton annotations.


44-44: LGTM! Skeleton annotations support added to import section.

The import section now correctly includes information about skeleton annotations.

cvat/requirements/base.txt (4)

21-21: Verify compatibility of azure-core version 1.30.2.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.


56-56: Verify compatibility of cryptography version 42.0.8.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.


62-62: Verify compatibility of datumaro new commit hash.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.


35-35: Verify compatibility of certifi version 2024.7.4.

Ensure that the new version does not introduce any breaking changes or incompatibilities with the rest of the codebase.

tests/python/rest_api/test_projects.py (1)

571-579: Good use of parameterization to improve test coverage.

The parameterization of the test method enhances test coverage and reduces code duplication.

tests/python/rest_api/test_projects.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.35%. Comparing base (7716bfe) to head (6382023).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8165      +/-   ##
===========================================
- Coverage    83.40%   83.35%   -0.06%     
===========================================
  Files          388      388              
  Lines        41299    41299              
  Branches      3852     3852              
===========================================
- Hits         34446    34425      -21     
- Misses        6853     6874      +21     
Components Coverage Δ
cvat-ui 79.64% <ø> (ø)
cvat-server 86.68% <ø> (-0.10%) ⬇️

Copy link

sonarcloud bot commented Jul 16, 2024

@zhiltsov-max zhiltsov-max merged commit f1726c4 into develop Jul 16, 2024
33 checks passed
@zhiltsov-max zhiltsov-max deleted the dl/skeletons-in-datumaro-format branch July 17, 2024 09:10
@cvat-bot cvat-bot bot mentioned this pull request Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot export Datumaro 1.0
3 participants