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

Cannot export Datumaro 1.0 #8115

Closed
2 tasks done
ChristianIngwersen opened this issue Jul 3, 2024 · 4 comments · Fixed by #8165
Closed
2 tasks done

Cannot export Datumaro 1.0 #8115

ChristianIngwersen opened this issue Jul 3, 2024 · 4 comments · Fixed by #8165
Assignees
Labels
enhancement New feature or request

Comments

@ChristianIngwersen
Copy link

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

From the web UI, i.e. app.cvat.ai, export either a project, task or job to the Datumaro format.

Expected Behavior

Functional export

Possible Solution

No response

Context

When trying to export from the web GUI to the Datumaro format I get a NotImplementedError.

It works fine exporting to CVAT for video, but would prefer the json format from Datumaro. The project contains videos with 1 bbox and 2 skeleton annotations.
image

Environment

Web app through app.cvat.ai
@ChristianIngwersen ChristianIngwersen added the bug Something isn't working label Jul 3, 2024
@zhiltsov-max
Copy link
Contributor

Hi, skeletons are not supported in the Datumaro format yet. Consider using COCO Person Keypoints instead if you want a json output, it's more or less similar.

@zhiltsov-max zhiltsov-max added enhancement New feature or request and removed bug Something isn't working labels Jul 5, 2024
@ChristianIngwersen
Copy link
Author

Hi, skeletons are not supported in the Datumaro format yet. Consider using COCO Person Keypoints instead if you want a json output, it's more or less similar.

Hi @zhiltsov-max thanks for the answer. The "issue" is that I have both skeleton and bbox annotations. I guess COCO Keypoints wont work then?

@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Jul 5, 2024

It's not simple at the moment, but here is what is available now. Suppose you have a CVAT task with 2 labels: "skeleton" and "skeleton_bbox". There are several options:

  1. Group corresponding skeletons and boxes using the "Group annotations" tool in UI, then export as COCO keypoints. You can check current groups by using the group coloring button.
    Screenshot from 2024-07-05 13-37-10
    Screenshot from 2024-07-05 13-38-11

COCO Keypoints will include bbox information in the "bbox" field, if the boxes are grouped with skeletons. If you parse the resulting annotations with Datumaro, these boxes will be parsed as separate annotations automatically. Keep in mind that you will have no simple way to import this back together if it's needed later, so a backup may be useful.

  1. You can export boxes and skeletons separately in different formats (e.g. COCO for boxes, COCO person keypoints for skeletons), then merge them using some tool (e.g. Datumaro). Note that this way Datumaro will produce bbox annotations for each skeleton parsed as well, but this bbox will be constructed just from the skeleton points, if saved without groups, so you'll need to deduplicate the boxes.

  2. Export in CVAT for * format. You'll probably need to write a custom parser, but you'll have an option to import the results back.

  3. Get task/job annotations from the server as the UI does. It will also be a json, but it will require some postprocessing to become useful.

Related: #7501, #6963

@ChristianIngwersen
Copy link
Author

Thanks! I'll try to investigate

zhiltsov-max added a commit that referenced this issue Jul 16, 2024
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->

Fixes #8115

### 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/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [ ] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## 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.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Maxim Zhiltsov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants