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

CVAT SDK retrieve_annotations only works after download from UI #6601

Closed
2 tasks done
AlanBlanchetNeovision opened this issue Aug 2, 2023 · 1 comment
Closed
2 tasks done
Labels
question Further information is requested

Comments

@AlanBlanchetNeovision
Copy link

My actions before raising this issue

Steps to Reproduce (for bugs)

Whenever using the piece of code below. The annotations don't seem to want to download or sometimes download but without any good reason.

_, res = project_api.retrieve_annotations(
    "CVAT for images 1.1",
    project.id,
    _parse_response=False,
    action="download",
)

I sometimes get HTTP errors but this is not stable.

Expected Behaviour

The function .retrieve_annotations should always return the same result with the same params.

Current Behaviour

The function sometimes work and sometimes returns HTTP errors.

Possible Solution

I believe that CVAT caches the annotation ZIP. And whenever the file is in cache, the CVAT SDK is able to download it.
But if the ZIP isn't in cache, then the retrieve_annotations method will crash.

Whenever I need to download the annotations from my CVAT SDK, I first download it from the UI, then I relaunch my script and it works.

Context

I want to retrieve annotations for my images like I can form the CVAT UI.

Your Environment

  • CVAT versions
    • Server version: 2.4.5
    • Core version: 9.1.1
    • Canvas version: 2.16.6
    • UI version: 1.51.1
    • Python SDK: 2.5.0
  • Operating System and version: Linux 5.15.0-78-generic Added the initial version of CHANGELOG.md #85~20.04.1-Ubuntu SMP Mon Jul 17 09:42:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
@zhiltsov-max
Copy link
Contributor

Hi, the downloading requires several requests, please read this answer about dataset downloading protocol. Everything is the same for downloading annotations. Please also consider using the high-level SDK, which allows downloading annotations and datasets simpler.

@zhiltsov-max zhiltsov-max added the question Further information is requested label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants