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

[BUG] Issue getting annotations with the sdk #195

Open
efcy opened this issue Mar 12, 2024 · 1 comment
Open

[BUG] Issue getting annotations with the sdk #195

efcy opened this issue Mar 12, 2024 · 1 comment

Comments

@efcy
Copy link
Contributor

efcy commented Mar 12, 2024

Running

dict_task = my_project.get_task(123)
print(dict_task)

gives me the following dict. Notice that the value of annotations_results is a string. It should be a list of dicts. I cant easily convert it because the keys inside the dict there don't have quotes. I think something is wrong on the sdk end. If I am doing something wrong here please give me a hint on how to proceed.

{
   "id":123,
   "predictions":[
      
   ],
   "annotations":[
      {
         "id":23,
         "created_username":" email, 1",
         "created_ago":"50\\xa0minutes",
         "completed_by":{
            "id":1,
            "first_name":"",
            "last_name":"",
            "avatar":"None",
            "email":"email",
            "initials":"st"
         },
         "result":[
            {
               "id":"Xm01aKoKq_",
               "type":"rectanglelabels",
               "value":{
                  "x":24.429657794676807,
                  "y":26.61596958174905,
                  "width":14.068441064638783,
                  "height":17.49049429657795,
                  "rotation":0,
                  "rectanglelabels":[
                     "ball"
                  ]
               },
               "origin":"manual",
               "to_name":"image",
               "from_name":"label",
               "image_rotation":0,
               "original_width":640,
               "original_height":480
            }
         ],
         "was_cancelled":false,
         "ground_truth":false,
         "created_at":"2024-03-12T19:46:33.835626Z",
         "updated_at":"2024-03-12T19:46:33.835636Z",
         "draft_created_at":"None",
         "lead_time":5.427,
         "import_id":"None",
         "last_action":"None",
         "task":1490,
         "project":21,
         "updated_by":1,
         "parent_prediction":"None",
         "parent_annotation":"None",
         "last_created_by":"None"
      }
   ],
   "drafts":[
      
   ],
   "annotators":[
      1
   ],
   "inner_id":2,
   "cancelled_annotations":0,
   "total_annotations":1,
   "total_predictions":0,
   "completed_at":"2024-03-12T19:46:33.835626Z",
   "annotations_results":"[{id:Xm01aKoKq_, type:rectanglelabels, value:{x:24.43, y:26.62, width:14.07, height:17.49, rotation:0, rectanglelabels:[ball]}, origin:manual, to_name:image, from_name:label, image_rotation:0, original_width:640, original_height:480}]",
   "predictions_results":"",
   "predictions_score":"None",
   "file_upload":"None",
   "storage_filename":"0005584.png",
   "annotations_ids":"23",
   "predictions_model_versions":"",
   "avg_lead_time":5.427,
   "draft_exists":false,
   "updated_by":[
      {
         "user_id":1
      }
   ],
   "data":{
      "image":"<myurl>/tasks/123/presign/?fileuri=czM6Ly9kZ3Bzd2dhemdkandhbXNsdGZhdXp1LzAwMDU1ODQucG5n"
   },
   "meta":{
      
   },
   "created_at":"2024-03-12T19:46:04.287715Z",
   "updated_at":"2024-03-12T19:46:33.927086Z",
   "is_labeled":true,
   "overlap":1,
   "comment_count":0,
   "unresolved_comment_count":0,
   "last_comment_updated_at":"None",
   "project":21,
   "comment_authors":[
      
   ]
}
@jet-c-21
Copy link

jet-c-21 commented Nov 2, 2024

same here, but I think "predictions_results" and "annotations_results" are two duplicated keys, am I right? @makseq

Because we can still get the final result from "predictions" and "annotations"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants