-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Update Datumaro format #7125
Update Datumaro format #7125
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #7125 +/- ##
===========================================
- Coverage 82.58% 82.57% -0.01%
===========================================
Files 362 362
Lines 39264 39264
Branches 3578 3578
===========================================
- Hits 32426 32424 -2
- Misses 6838 6840 +2
|
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> Closes #7703 Related: #7258 Related: #7125 Related: #7699 Changes: cvat-ai/datumaro@8a14a99...82982b1 - Fixed WiderFace dataset example - Fixed export without images in Datumaro format - no empty `media` and `point_cloud` fields should be in the results ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I submit my changes into the `develop` branch - [ ] I have created a changelog fragment <!-- see top comment in CHANGELOG.md --> - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning)) ### License - [ ] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
@coderabbitai review |
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe recent updates enhance the CVAT tool by introducing support for JSON imports in Datumaro format and improving media handling capabilities. Changes include renaming classes to support various media types, refining error handling in export/import functions, and adding new test methods to ensure robustness in handling Datumaro files. Changes
Assessment against linked issues
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (3)
cvat/apps/dataset_manager/bindings.py (1)
Line range hint
1926-1926
: Change the membership test fromnot in
toin
to correct the logic.- if not frame_number in instance_data.frame_info: + if frame_number not in instance_data.frame_info:tests/python/rest_api/test_tasks.py (2)
775-821
: LGTM! The test methodtest_datumaro_export_without_annotations_includes_image_info
is well-structured and covers the necessary checks.Consider adding a comment explaining the selection criteria for the task in the setup phase to enhance readability and maintainability.
2722-2757
: LGTM! The test methodtest_can_import_datumaro_json
correctly tests the import functionality for the Datumaro JSON format.Consider adding a comment explaining the selection criteria for the task in the setup phase to enhance readability and maintainability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (2)
cvat/apps/dataset_manager/bindings.py (1)
Line range hint
1927-1927
: Usenot in
for membership testing.- if not frame_number in instance_data.frame_info: + if frame_number not in instance_data.frame_info:tests/python/rest_api/test_tasks.py (1)
59-62
: Consider adding a docstring to_DATUMARO_FORMAT_FOR_DIMENSION
for better code documentation.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- cvat/apps/dataset_manager/bindings.py (13 hunks)
- tests/python/rest_api/test_tasks.py (3 hunks)
Additional Context Used
Ruff (11)
cvat/apps/dataset_manager/bindings.py (1)
1927-1927: Test for membership should be
not in
tests/python/rest_api/test_tasks.py (10)
350-350: f-string without any placeholders
1136-1136: f-string without any placeholders
1703-1703: f-string without any placeholders
1829-1829: Ambiguous variable name:
l
1849-1849: Ambiguous variable name:
l
1850-1850: Ambiguous variable name:
l
1865-1865: Ambiguous variable name:
l
1876-1876: Ambiguous variable name:
l
1890-1890: Ambiguous variable name:
l
2379-2379: f-string without any placeholders
Additional comments not posted (25)
tests/python/rest_api/test_tasks.py (25)
Line range hint
63-67
: LGTM! The functionget_cloud_storage_content
is concise and appears to handle cloud storage content retrieval effectively.
Line range hint
69-74
: LGTM! The method_test_task_list_200
effectively tests the task list retrieval functionality.
Line range hint
76-86
: LGTM! The method_test_users_to_see_task_list
correctly implements visibility checks for task lists based on user roles.
Line range hint
88-98
: LGTM! The method_test_assigned_users_to_see_task_data
effectively tests the visibility of task data for assigned users.
Line range hint
100-112
: LGTM! The methodtest_project_tasks_visibility
correctly tests the visibility of project tasks based on user roles and permissions.
Line range hint
114-122
: LGTM! The methodtest_task_assigned_to_see_task
effectively tests the visibility of assigned tasks to specific users.
Line range hint
124-138
: LGTM! The methodtest_org_project_tasks_visibility
correctly tests the visibility of organizational project tasks based on user roles.
Line range hint
140-148
: LGTM! The methodtest_org_task_assigneed_to_see_task
effectively tests the visibility of assigned tasks to specific users in an organization.
Line range hint
150-160
: LGTM! The methodtest_can_get_job_validation_summary
correctly tests the retrieval of job validation summaries.
Line range hint
162-172
: LGTM! The methodtest_can_get_job_completed_summary
correctly tests the retrieval of job completion summaries.
Line range hint
174-186
: LGTM! The methodtest_can_remove_owner_and_fetch_with_sdk
effectively tests the removal of a task owner and subsequent data retrieval.
Line range hint
188-194
: LGTM! The methodsetup
correctly sets up the testing environment for the classTestListTasksFilters
.
Line range hint
196-200
: LGTM! The methodtest_can_use_simple_filter_for_object_list
effectively tests the functionality of simple filters for object lists.
Line range hint
202-207
: LGTM! The method_test_create_task_201
effectively tests the creation of a task with a 201 status code.
Line range hint
209-214
: LGTM! The method_test_create_task_403
effectively tests the creation of a task with a 403 status code, indicating forbidden access.
Line range hint
216-226
: LGTM! The method_test_users_to_create_task_in_project
effectively tests whether different users can create tasks within a project based on their roles and permissions.
Line range hint
228-238
: LGTM! The methodtest_users_to_create_task_in_project
correctly tests the ability of users to create tasks in a project based on their roles.
Line range hint
240-250
: LGTM! The methodtest_worker_cannot_create_task_in_project_without_ownership
effectively tests whether workers can create tasks in a project without having ownership.
Line range hint
252-262
: LGTM! The methodtest_create_response_matches_get
effectively tests whether the response from creating a task matches the data retrieved from a subsequent GET request.
Line range hint
264-286
: LGTM! The methodtest_can_create_task_with_skeleton
effectively tests the creation of a task with complex skeleton annotations.
Line range hint
288-299
: LGTM! The methodtest_frame_content_type
effectively tests the content type of frames retrieved from tasks.
Line range hint
301-307
: LGTM! The method_test_check_response
effectively checks the response status and data after patching task annotations.
Line range hint
309-319
: LGTM! The methodrequest_data
effectively prepares data for patching task annotations by modifying points and incrementing the version.
Line range hint
321-339
: LGTM! The methodtest_user_update_task_annotations
effectively tests the ability of users to update task annotations based on their privileges and roles.
Line range hint
341-359
: LGTM! The methodtest_member_update_task_annotation
effectively tests the ability of organization members to update task annotations based on their roles.
…in supporting formats
586704c
to
56db39b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7125 +/- ##
========================================
Coverage 74.18% 74.18%
========================================
Files 401 401
Lines 43510 43523 +13
Branches 3950 3950
========================================
+ Hits 32278 32288 +10
- Misses 11232 11235 +3
|
|
Motivation and context
Fixes #5424
Fixes #7375
Fixes #8700
Depends on cvat-ai/datumaro#34
This PR improves quality of life when using Datumaro format.
Refactored(will be in another PR)conv_mask_to_poly
uses to avoid code and logic duplicationHow has this been tested?
Unit tests
Checklist
develop
branch(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit