-
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
add pose tracking demo #380
Conversation
Codecov Report
@@ Coverage Diff @@
## master #380 +/- ##
==========================================
+ Coverage 81.81% 82.84% +1.02%
==========================================
Files 118 121 +3
Lines 7766 7945 +179
Branches 1240 1265 +25
==========================================
+ Hits 6354 6582 +228
+ Misses 1158 1102 -56
- Partials 254 261 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Need unittests and README like https://github.com/open-mmlab/mmpose/blob/master/demo/2d_hand_demo.md |
mmpose/apis/inference_tracking.py
Outdated
boxA_area = (boxA[2] - boxA[0] + 1) * (boxA[3] - boxA[1] + 1) | ||
boxB_area = (boxB[2] - boxB[0] + 1) * (boxB[3] - boxB[1] + 1) | ||
|
||
iou = inter_area / float(boxA_area + boxB_area - inter_area) |
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.
Any chance that the denominator equals 0?
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.
Will this function be used elsewhere?
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.
Do not worry as boxA_area >= inter_area & boxB_area >= inter_area. The denominator equals 0 only is boxA_area = boxA_area = 0, which is impossible for mmdet to predict such a person bbox.
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.
Do we need assertion that boxA[2] > boxA[0]
and boxA[3] > boxA[1]
? @innerlee
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.
If a zero-area bbox be considered an error, we can add assertions.
If it is allowed, then we may add a max(1, blablha...)
at the denominator.
BTW what's the difference between box
and bbox
?
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 think adding assertions should be better. And one suggestion is that the previous steps may also consider this kind of error (box[2] <= box[0]). In detail, if such a bbox is given, function inference_top_down_pose_model may have some problems. We may also consider to add assertions in function _xyxy2xywh or anywhere suitable.
As for the difference box and bbox, function _compute_iou is more general and can compute iou for any two boxes. I use box because I do not want to emphasize they are person bounding boxes. However, we may not consider other kinds of boxes and I will use bbox to avoid confusion.
If you guys agree with my opinions, I will make these two changes very soon. @innerlee @jin-s13
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.
More checks are good. One thing to take care is that we
- use assertion only when the it is an error, because a violation would stop the running program, and any unsaved computations would got lost.
- If the case is not critical, then a warning is good enough.
- If it is neglectable, we can simply ignore it and replace with safe neutral values
I vote for bbox.
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.
The unittest fails.
Dear luminxu, |
Get track id using greedy bbox IOU tracking & Visualize persons according to track id.