roboflow / roboflow-python

The official Roboflow Python package. Manage your datasets, models, and deployments. Roboflow has everything you need to build a computer vision application.
https://docs.roboflow.com/python
Apache License 2.0
280 stars 72 forks source link

When uploading pose keypoints via api in coco, it expects deleted keypoints #321

Closed hartwoolery closed 1 week ago

hartwoolery commented 2 weeks ago

when you create the classes for pose in roboflow you can delete a keypoint from your template. however, these deleted keypoints are expected to be present in the data when you upload to roboflow via api, otherwise your keypoints will be out of order Screenshot 2024-08-28 at 8 32 51 PM

yeldarby commented 2 weeks ago

That’s a good point. What format are you uploading in?

Do you already have existing data in your dataset? The reason we keep them is so it’s non-destructive if you delete a point here you can restore it on all your images since it has a uniquely referenced ID

I wonder if we need a config for whether your skeleton matches the full historical one or the current state.

Do you have a desired behavior?

hartwoolery commented 2 weeks ago

Makes sense! I'm uploading it in coco format - I think that's the only supported one. IMO the default behavior should be to assume new uploads match the current state of the skeleton, so perhaps have the client or backend check the state and fill in the blanks.

yeldarby commented 2 weeks ago

Yeh I think that makes sense. We will have a look at this before the end of the week and let you know when it’s fixed/deployed.

yeldarby commented 2 weeks ago

(Sorry; following up that I didn't get to this last week & am diving in this afternoon)

yeldarby commented 2 weeks ago

Update: I was able to reproduce this in my staging environment. Looking into how to fix w/o also breaking any happy paths.

SolomonLake commented 1 week ago

@yeldarby and I have pushed a fix for this issue to our API. When you upload annotation data via the API or front-end UI we now make sure the keypoints are in order!

We try to detect and handle both cases where there are keypoints equal to the number of non-deleted points in your existing skeleton, and where you have padded the array with deleted points.

I'm going to close as completed, @hartwoolery if you experience more issues with this let me know and I'll re-open! Thank you for reporting this issue!