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

[Feature] Adaptive wingloss (ICCV'19) #1072

Merged
merged 10 commits into from
Dec 17, 2021
Merged

[Feature] Adaptive wingloss (ICCV'19) #1072

merged 10 commits into from
Dec 17, 2021

Conversation

jin-s13
Copy link
Collaborator

@jin-s13 jin-s13 commented Dec 8, 2021

Motivation

Support Adaptive Wing Loss.

Modification

  1. Rename 'mse_loss' to 'heatmap_loss'
  2. Add AdaptiveWingLoss

BC-breaking (Optional)

Use cases (Optional)

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@jin-s13 jin-s13 added the status/WIP work in progress label Dec 8, 2021
@jin-s13 jin-s13 changed the base branch from master to dev-0.22 December 8, 2021 05:19
@codecov
Copy link

codecov bot commented Dec 8, 2021

Codecov Report

❗ No coverage uploaded for pull request base (dev-0.22@7c92f0e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             dev-0.22    #1072   +/-   ##
===========================================
  Coverage            ?   82.47%           
===========================================
  Files               ?      203           
  Lines               ?    16078           
  Branches            ?     2864           
===========================================
  Hits                ?    13260           
  Misses              ?     2095           
  Partials            ?      723           
Flag Coverage Δ
unittests 82.41% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out 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 7c92f0e...fc7ca2a. Read the comment docs.

@jin-s13 jin-s13 changed the title Support adaptive wingloss (ICCV'19) [Feature] Adaptive wingloss (ICCV'19) Dec 9, 2021
@jin-s13 jin-s13 requested a review from ly015 December 12, 2021 10:13
@@ -159,7 +159,7 @@ def get_loss(self, output, target, target_weight):

assert not isinstance(self.loss, nn.Sequential)
assert target.dim() == 4 and target_weight.dim() == 3
losses['mse_loss'] = self.loss(output, target, target_weight)
losses['heatmap_loss'] = self.loss(output, target, target_weight)
Copy link
Member

Choose a reason for hiding this comment

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

Will this lead to risks of bc breaking?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe.

Copy link
Member

Choose a reason for hiding this comment

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

OK, we can mention it in the changelog.


@LOSSES.register_module()
class AdaptiveWingLoss(nn.Module):
"""Adaptive wing loss. paper ref: 'Adaptive Wing Loss for Robust Face
Copy link
Member

Choose a reason for hiding this comment

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

Please follow standard reference format:

`High-Resolution Representations for Labeling Pixels and Regions
<https://arxiv.org/abs/1904.04514>`__

@ly015 ly015 merged commit 0feda8c into dev-0.22 Dec 17, 2021
@jin-s13 jin-s13 deleted the adaptive_wingloss branch December 27, 2021 06:35
ly015 added a commit that referenced this pull request Jan 4, 2022
* add adaptive wingloss

* move adaptive wingloss to heatmap_loss

* match shape in wingloss

* rename loss

* mean for loss

* add configs

* fix unittest

* rename mse_loss to heatmap_loss

* add docs

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>
ly015 added a commit that referenced this pull request Jan 5, 2022
* add adaptive wingloss

* move adaptive wingloss to heatmap_loss

* match shape in wingloss

* rename loss

* mean for loss

* add configs

* fix unittest

* rename mse_loss to heatmap_loss

* add docs

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 6, 2023
* add adaptive wingloss

* move adaptive wingloss to heatmap_loss

* match shape in wingloss

* rename loss

* mean for loss

* add configs

* fix unittest

* rename mse_loss to heatmap_loss

* add docs

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
* add adaptive wingloss

* move adaptive wingloss to heatmap_loss

* match shape in wingloss

* rename loss

* mean for loss

* add configs

* fix unittest

* rename mse_loss to heatmap_loss

* add docs

* fix lint

Co-authored-by: ly015 <liyining0712@gmail.com>
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.

None yet

2 participants