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

Incorrect information in documentation and/or unexpected cli behavior on export #4244

Closed
2 tasks done
mrKallah opened this issue Jan 26, 2022 · 5 comments · Fixed by #4251 or #4263
Closed
2 tasks done

Incorrect information in documentation and/or unexpected cli behavior on export #4244

mrKallah opened this issue Jan 26, 2022 · 5 comments · Fixed by #4251 or #4263
Labels
documentation Documentation should be updated

Comments

@mrKallah
Copy link

My actions before raising this issue

I'm going to say this is connected to #4119 and #4056 and @TOsmanov and @AetherBreeze

When using command

python3 cli.py export --format "COCO 1.0" 267

I get the error

usage: cli.py export [-h] task_id filename
cli.py export: error: argument task_id: invalid int value: 'COCO 1.0'

even through the Documetnation says:

cli.py export --format "COCO 1.0" 136

There also seems to be no way to export without images?

Expected Behaviour

Expect the documentation to be correct
Export without image to be possible

Current Behaviour

Documentation is wrong
--format seems to be broken from my testing
Export without image is not possible

Possible Solution

export through web interface enables you to do all of the above

Your Environment

  • Git hash commit (git log -1): 5e43171
  • Docker version docker version (e.g. Docker 17.0.05): 20.10.12
  • Are you using Docker Swarm or Kubernetes? no
  • Operating System and version (e.g. Linux, Windows, MacOS): Ubuntu
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

@theteleforce
Copy link
Contributor

This is quite strange. So far as I can tell, there has never been a --format argument for export tasks in definition.py. Seems like intended functionality that was never implemented.

I unfortunately don't have the time right now to implement it myself. I added functionality to create by performing the actions via the web interface, intercepting the requests in devtools, and adding logic to core.py to reproduce these requests with command line input. Anyone interested in adding this might take a similar approach.

The current CLI export functionality was added entirely in #3056 -- anyone involved with that might have some input.

@TOsmanov
Copy link
Contributor

Hi @mrKallah,

There is an mistake in the documentation.
You can export task annotation without images using cli.py dump:

python3 cli.py dump --format "COCO 1.0" 267 annotation.tar

@nmanovic nmanovic added the documentation Documentation should be updated label Jan 27, 2022
@mrKallah
Copy link
Author

Hi @mrKallah,

There is an mistake in the documentation. You can export task annotation without images using cli.py dump:

python3 cli.py dump --format "COCO 1.0" 267 annotation.tar

@TOsmanov
I have it working now, thank you for your reply, just another suggestion, you have put annotation.tar but using for example

tar -xf filename.tar

returns

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

and if I do

mv filename.tar filename
file filename

that returns

Stabben - M2 - HD: Zip archive data, at least v2.0 to extract

So I'd say the likelihood is that the compression used is actually zip not tar, and the docs should probably be updated accordingly.

@mrKallah
Copy link
Author

On second thought, maybe its zip because I am using YOLO and not COCO? If so maybe a list for the different ones?

@TOsmanov
Copy link
Contributor

On second thought, maybe its zip because I am using YOLO and not COCO? If so maybe a list for the different ones?

@mrKallah
You're right, downloading the annotation must be in zip format, this is also relevant for the format CVAT 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation should be updated
Projects
None yet
4 participants