initial key point support and annotators#1128
Conversation
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
…to feat/dev/keypoints-annotated
…to feat/dev/keypoints-annotated
…to feat/dev/keypoints-annotated
supervision/keypoint/annotate.py
Outdated
| def annotate(self, scene: ImageType, keypoints: KeyPoints) -> ImageType: | ||
| if len(keypoints) == 0: | ||
| return scene | ||
| if keypoints.class_id is None: |
There was a problem hiding this comment.
Do we need class_id at this point?
There was a problem hiding this comment.
I have no use for it, and I doubt anyone would need it in this form.
There was a problem hiding this comment.
Let's drop it for now.
| pass | ||
|
|
||
|
|
||
| class VertexAnnotator(BaseKeyPointAnnotator): |
There was a problem hiding this comment.
I renamed the annotator to VertexAnnotator. In general, I'd like to use the vertex and edge naming conventions.
There was a problem hiding this comment.
Good. At the back of our minds, let's also start thinking of names for triplets (joints?)
Having those will let us compute angles, compare skeletons and create new annotators.
There was a problem hiding this comment.
Should we change SkeletonAnnotator to EdgeAnnotator too?
supervision/keypoint/annotate.py
Outdated
| for xy in xy_all: | ||
| skeleton = self.skeleton | ||
| if not skeleton: | ||
| skeleton = resolve_skeleton_by_vertex_count(len(xy)) |
There was a problem hiding this comment.
I simplified skeleton resolving logic here.
|
(This is a comment about skeleton changes - it got too broad to have inline 🙂 ) Upon sleeping on it, I'd have dropped the singleton but kept the logic as a static class. Some thoughts about your changes: I like that:
I don't like that:
Having a I'm neutral about:
At the end of the day, if we're not using static checks anyway, I'm leaning towards this:
When you read this, let's chat and wrap this one up 🙂 P.S. I'll see if I can add |
|
Description
KeyPointsclass along withfrom_ultralyticsconnectorVertexAnnotatorandSkeletonAnnotator