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
Add demo tracking keypoints and bounding boxes using OpenPose and YOLOv5 #99
Conversation
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.
This is great!
I left a few comments of things that may need changing. Also, we need to add a reference in the main README to this demo.
Finally, was wondering why the production_ID_4791196_10s.mp4
file was versioned?
|
||
## Explanation | ||
|
||
This example aims to show the possibilities that Norfair offers to track objects from multiple classes using a single `Tracker` instance. Also the example shows Norfair's ability to draw keypoints and bounding boxes for different types of objects. |
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.
This example aims to show the possibilities -> This example aims at showing the possibilities
distances = np.linalg.norm(detected_pose.points - tracked_pose.estimate, axis=1) | ||
match_num = np.count_nonzero( | ||
(distances < KEYPOINT_DIST_THRESHOLD) | ||
* (detected_pose.scores > DETECTION_THRESHOLD) | ||
* (tracked_pose.last_detection.scores > DETECTION_THRESHOLD) | ||
) | ||
return 1 / (1 + match_num) |
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.
Would be slightly more readable under an else
statement, as we are choosing between 2 distinct options.
) | ||
KEYPOINT_DIST_THRESHOLD = video.input_height / 40 | ||
|
||
for i, frame in enumerate(video): |
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.
I'd personally not support skipping frames in this demo. There are a lot of things going on, and we want to make each demo show off a small, easy to grasp, subset of Norfair's features. So anything that makes the demo shorter and simpler is better (except not tracking 2 classes 😂).
Just saw that that video is the input video for the demo. We should probably not version it, and store it somewhere so that users can download it manually. Maybe add a wget command to the demo or something like that. Storing it in github would probably be ideal. Same goes for the gif. We can chat about this on slack later. |
e821007
to
b2a33f9
Compare
Made the requested changes. Regarding the input video I uploaded it by editing the README file from the web UI. |
b2a33f9
to
d14725b
Compare
d14725b
to
af44da4
Compare
Add demo tracking keypoints and bounding boxes using OpenPose and YOLOv5
Add demo tracking keypoints and bounding boxes using OpenPose and YOLOv5
This PR builds a demo to show the possibilities that Norfair offers to track objects from multiple classes using a single
Tracker
instance. Also the example shows Norfair's ability to draw keypoints and bounding boxes for different types of objects.