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

using datumaro to convert voc annotations to cvat #937

Closed
verasativa opened this issue Dec 11, 2019 · 1 comment · Fixed by #1034
Closed

using datumaro to convert voc annotations to cvat #937

verasativa opened this issue Dec 11, 2019 · 1 comment · Fixed by #1034
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@verasativa
Copy link

verasativa commented Dec 11, 2019

I'm trying to figure out how datumaro works, and eventually how to integrate to our dvc workflow. But I'm starting with a simple task: convert voc annotations to cvat format.
I'm creating a datumaro dataset with:
pythonw -m datumaro create -d data/datumaro_dataset
then adding the one source with:
pythonw -m datumaro source import -f voc -n v1 -p data/datumaro_dataset/ dir data/Workers/version_1/Annotations
then from the data/datumaro_datasetdir:
pythonw -m datumaro source export -n datumaro_dataset -d ../export -f cvat
but I'm getting a:
KeyError: 'Key "datumaro_dataset" does not exist or a:
FileExistsError: [Errno 17] File exists: '/Users/vera/repositories/workers-detector/data/export'

Questions:
What will be the proper way to do this conversion?
I'm interested on contributing to datumaro; what will be the best communication channel with developers? (no really lucky on gitter)

cc: @zhiltsov-max

@nmanovic nmanovic added the question Further information is requested label Dec 12, 2019
@zhiltsov-max
Copy link
Contributor

@verasativa, currently, CVAT format support is not implemented in Datumaro, we are going to do it soon. Once it is supported, to export a dataset you would do:

datum project import -d data/datumaro_dataset -f voc data/Workers/version_1/Annotations
datum project export -p data/datumaro_dataset -f cvat ../export

Your variant with sources is also OK, but it should look like this:

pythonw -m datumaro create -d data/datumaro_dataset
pythonw -m datumaro source import -f voc -n v1 -p data/datumaro_dataset/ dir data/Workers/version_1/Annotations
pythonw -m datumaro source export -n v1 -d ../export -f cvat # note v1 here as source name

KeyError is for non-existing project source which was named v1, not datumaro_dataset.

Regarding FileExistsError: currently we avoid overwriting existing dirs to prevent data loss. We're open for your suggestions on design.

@zhiltsov-max zhiltsov-max added enhancement New feature or request and removed question Further information is requested labels Dec 18, 2019
@nmanovic nmanovic added this to the 1.0.0 - Release milestone Dec 23, 2019
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