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 multi-stage loss #204

Merged
merged 2 commits into from
Oct 21, 2020
Merged

add multi-stage loss #204

merged 2 commits into from
Oct 21, 2020

Conversation

wusize
Copy link
Collaborator

@wusize wusize commented Oct 20, 2020

add multi-stage loss

@CLAassistant
Copy link

CLAassistant commented Oct 20, 2020

CLA assistant check
All committers have signed the CLA.

output[-1][target_weight.squeeze(-1) > 0].unsqueeze(
0).detach().cpu().numpy(),
target[target_weight.squeeze(-1) > 0].unsqueeze(
0).detach().cpu().numpy())
else:
_, avg_acc, cnt = pose_pck_accuracy(
Copy link
Contributor

Choose a reason for hiding this comment

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

are these cnts used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, I think. These cnts have been here in previous versions. Should I change the cnts into _ ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah

0).detach().cpu().numpy())
if target.dim() == 5 and target_weight.dim() == 4:
_, avg_acc, cnt = pose_pck_accuracy(
output[-1][target_weight[:, -1, :, :].squeeze(-1) > 0].
Copy link
Contributor

Choose a reason for hiding this comment

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

question: why is the last output special

Copy link
Collaborator

@jin-s13 jin-s13 Oct 21, 2020

Choose a reason for hiding this comment

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

Generally speaking, the last output is the final prediction (used for calculating accuracy), while the intermediate outputs are used for training.

Copy link
Contributor

Choose a reason for hiding this comment

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

cool, @wusize may add a line of comment explaining this magic number

@innerlee
Copy link
Contributor

the main change is ok, but there are some unintended changes

@codecov
Copy link

codecov bot commented Oct 21, 2020

Codecov Report

Merging #204 into master will increase coverage by 0.14%.
The diff coverage is 96.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #204      +/-   ##
==========================================
+ Coverage   82.75%   82.90%   +0.14%     
==========================================
  Files         106      106              
  Lines        6189     6211      +22     
  Branches      994     1001       +7     
==========================================
+ Hits         5122     5149      +27     
+ Misses        877      874       -3     
+ Partials      190      188       -2     
Flag Coverage Δ
#unittests 82.90% <96.29%> (+0.14%) ⬆️

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

Impacted Files Coverage Δ
mmpose/models/detectors/top_down.py 78.12% <96.29%> (+3.48%) ⬆️
mmpose/models/losses/mse_loss.py 96.49% <0.00%> (+3.50%) ⬆️
mmpose/models/builder.py 100.00% <0.00%> (+18.75%) ⬆️

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 268bc59...4f3b3aa. Read the comment docs.

@innerlee innerlee merged commit e5cdec2 into master Oct 21, 2020
@jin-s13 jin-s13 deleted the multi_stage_loss branch October 26, 2020 06:11
rollingman1 pushed a commit to rollingman1/mmpose that referenced this pull request Nov 5, 2021
@OpenMMLab-Assistant001
Copy link

Hi @wusize 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.

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. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA

If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:)
Thank you again for your contribution❤

shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* add multi-stage loss

* Modifications
HAOCHENYE pushed a commit to HAOCHENYE/mmpose that referenced this pull request Jun 27, 2023
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* add multi-stage loss

* Modifications
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