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

Unable to upload annotations #4459

Closed
2 tasks done
k1won opened this issue Mar 14, 2022 · 4 comments · Fixed by #4513
Closed
2 tasks done

Unable to upload annotations #4459

k1won opened this issue Mar 14, 2022 · 4 comments · Fixed by #4513
Assignees
Labels
bug Something isn't working

Comments

@k1won
Copy link
Contributor

k1won commented Mar 14, 2022

My actions before raising this issue

Expected Behaviour

  • Annotations should be created through file upload.

Current Behaviour

  • After applying Tus for task annotations import #4327, 403 Forbidden status code is returned when uploading a job annotation file.
  • at the result of checking the opa log, the scope value of the input data is null.
  • task annotations upload also same
  • By Tus for task annotations import #4327, when the "upload annotations" function is executed, the http request method is changed from PUT to POST, but the cause is that the new key:value definition for POST does not exist in get_scopes() of JobPermission.

image

Possible Solution

  • Add the following two key:value pairs to get_scopes() in JobPermission and TaskPermission class.

('annotations', 'POST'): 'import:annotations'
('append_annotations_chunk', 'PATCH'): 'update:annotations',

Steps to Reproduce (for bugs)

  1. create some labeled shapes
  2. save and export annotations (w/ task owner account)
  3. remove annotations and save
  4. upload annotations

Context

Your Environment

  • Git hash commit (git log -1): 7ef553f
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS): ubuntu 18.04
  • 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.

@nmanovic
Copy link
Contributor

@k1won , thanks.

@klakhov , could you please fix the issue and be sure that we have a test for the issue?

@nmanovic nmanovic added the bug Something isn't working label Mar 14, 2022
@nmanovic nmanovic added this to To do in Identity and Access Management (IAM) via automation Mar 14, 2022
@klakhov
Copy link
Contributor

klakhov commented Mar 15, 2022

@nmanovic Yes, the problem will be fixed

@MiiViiDynamics
Copy link

MiiViiDynamics commented Mar 25, 2022

I also get the same problem.
The message indicated upload succeeded, but not rectangle can be seen.
The annotation as below.
<annotation> <folder>images</folder> <filename>hard_hat_workers1007.png</filename> <size> <width>416</width> <height>415</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>helmet</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>104</xmin> <ymin>91</ymin> <xmax>164</xmax> <ymax>165</ymax> </bndbox> </object> <object> <name>helmet</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>142</xmin> <ymin>140</ymin> <xmax>171</xmax> <ymax>180</ymax> </bndbox> </object> <object> <name>person</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>47</xmin> <ymin>99</ymin> <xmax>165</xmax> <ymax>344</ymax> </bndbox> </object> <object> <name>person</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>141</xmin> <ymin>140</ymin> <xmax>173</xmax> <ymax>321</ymax> </bndbox> </object> <object> <name>head</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>313</xmin> <ymin>175</ymin> <xmax>329</xmax> <ymax>190</ymax> </bndbox> </object> <object> <name>person</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>308</xmin> <ymin>173</ymin> <xmax>348</xmax> <ymax>217</ymax> </bndbox> </object> <object> <name>helmet</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>104</xmin> <ymin>0</ymin> <xmax>165</xmax> <ymax>52</ymax> </bndbox> </object> <object> <name>person</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>47</xmin> <ymin>345</ymin> <xmax>166</xmax> <ymax>414</ymax> </bndbox> </object> <object> <name>person</name> <pose>Unspecified</pose> <truncated>0</truncated> <occluded>0</occluded> <difficult>0</difficult> <bndbox> <xmin>141</xmin> <ymin>368</ymin> <xmax>174</xmax> <ymax>414</ymax> </bndbox> </object> </annotation>

Identity and Access Management (IAM) automation moved this from To do to Done Mar 25, 2022
@bit-scientist
Copy link

@k1won, hi. do yo mind taking a look at #5653 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
5 participants