-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Implemented from_yolo_nas
for keypoints
#1138
Conversation
* Missing batch image support
supervision/keypoint/core.py
Outdated
|
||
xy = yolo_nas_results.prediction.poses[:, :, :2] | ||
confidence = yolo_nas_results.prediction.poses[:, :, 2] | ||
class_id = [0] * len(xy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not include any information not included in the result object. If class_id
and class_name
are not there, we should not add them. YOLO NAS allows you to train a custom pose estimation model: https://www.youtube.com/watch?v=J83ZvWfxjoA, so we should not assume we will get people or all classes are the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a moderate attempt, I found no way to add class_names
or labels when training a pose net for Yolo NAS. I've mocked the results by using a detections network.
* Still hardcoded ID to -1 and name to "" if not provided - this lets us stick to (n,) shape. * Found no way to add class_names to pose tracker, so used the response of YOLO NAS detection instead, to check what the response looks like.
Ready for review: I've removed hardcoding of The special fields for -1 match what we have in |
Hi @LinasKo 👋🏻, let's keep the The same applies to class names. If we don't have this value, simply don't include the key |
Done. Tested and Class names and IDs still appear when input has labels and names. |
Awesome! I tested as well. Merging! |
Description
Implementation of
from_yolo_nas
for KeyPoints.class_id
array entries are hardcoded to0
;class_name
entries as"person"
. Results object from NAS has aclass_names
, but it isNone
. This seems to be set during training, and used in other model types. Let's revisit this after we decide how exactly we want to structureclass_id
andclass_names
inKeyPoints
.Type of change
How has this change been tested, please provide a testcase or example of how you tested the change?
Prerequisites:
Test code:
Docs