Skip to content
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

Merged
merged 23 commits into from
Dec 31, 2020
Merged

add pose tracking demo #380

merged 23 commits into from
Dec 31, 2020

Conversation

luminxu
Copy link
Collaborator

@luminxu luminxu commented Dec 24, 2020

Get track id using greedy bbox IOU tracking & Visualize persons according to track id.

@CLAassistant
Copy link

CLAassistant commented Dec 24, 2020

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Dec 24, 2020

Codecov Report

Merging #380 (7f4c209) into master (3361d45) will increase coverage by 1.02%.
The diff coverage is 85.91%.

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 82.84% <85.91%> (+1.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpose/apis/inference_tracking.py 85.71% <85.71%> (ø)
mmpose/apis/__init__.py 100.00% <100.00%> (ø)
mmpose/datasets/__init__.py 100.00% <0.00%> (ø)
mmpose/datasets/datasets/__init__.py 100.00% <0.00%> (ø)
mmpose/models/losses/multi_loss_factory.py 100.00% <0.00%> (ø)
mmpose/datasets/datasets/top_down/__init__.py 100.00% <0.00%> (ø)
mmpose/datasets/datasets/bottom_up/__init__.py 100.00% <0.00%> (ø)
mmpose/datasets/pipelines/top_down_transform.py 60.19% <0.00%> (ø)
mmpose/datasets/pipelines/bottom_up_transform.py 77.39% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3361d45...7f4c209. Read the comment docs.

@innerlee
Copy link
Contributor

This was referenced Dec 26, 2020
@innerlee innerlee removed the need doc label Dec 29, 2020
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)
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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

Copy link
Contributor

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?

Copy link
Collaborator Author

@luminxu luminxu Dec 30, 2020

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

Copy link
Contributor

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.

Copy link
Collaborator

@jin-s13 jin-s13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unittest fails.

@innerlee innerlee merged commit 5382dff into open-mmlab:master Dec 31, 2020
@OpenMMLab-Assistant003
Copy link

Dear luminxu,
First of all, we want to express our gratitude for your significant PR in the MMPose project. Your contribution is highly appreciated, and we are grateful for your efforts in helping improve this open-source project during your personal time. We believe that many developers will benefit from your PR.
If you are Chinese or have WeChat,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. We look forward to seeing you there! Join us :https://discord.gg/raweFPmdzG
Thank you again for your contribution❤
Best regards! @luminxu

shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants