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 masked average pooling for pooling with segmentation masks (DetCon) #1739

Merged
merged 22 commits into from
Nov 21, 2024

Conversation

liopeer
Copy link
Contributor

@liopeer liopeer commented Nov 19, 2024

Changes

  • add masked pooling for batched and unbatched feature maps together with integer masks

How has it been tested

  • validated against examples calculated by hand

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.22%. Comparing base (8781c33) to head (484cdc5).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
lightly/models/utils.py 90.47% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1739      +/-   ##
==========================================
+ Coverage   85.21%   85.22%   +0.01%     
==========================================
  Files         162      162              
  Lines        6708     6729      +21     
==========================================
+ Hits         5716     5735      +19     
- Misses        992      994       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Contributor

@guarin guarin left a comment

Choose a reason for hiding this comment

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

This looks great! Left some comments regarding formatting and code structure but the logic looks correct

lightly/models/utils.py Outdated Show resolved Hide resolved
lightly/models/utils.py Outdated Show resolved Hide resolved
lightly/models/utils.py Outdated Show resolved Hide resolved
lightly/models/utils.py Outdated Show resolved Hide resolved
lightly/models/utils.py Outdated Show resolved Hide resolved
lightly/models/utils.py Show resolved Hide resolved
tests/models/test_ModelUtils.py Outdated Show resolved Hide resolved
tests/models/test_ModelUtils.py Outdated Show resolved Hide resolved
tests/models/test_ModelUtils.py Outdated Show resolved Hide resolved
tests/models/test_ModelUtils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@guarin guarin left a comment

Choose a reason for hiding this comment

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

LGTM! I left one more comment but feel free to resolve and merge.

lightly/models/utils.py Outdated Show resolved Hide resolved
@liopeer liopeer merged commit 48ece5e into master Nov 21, 2024
14 checks passed
@liopeer liopeer deleted the lionel-lig-5627-figure-out-mask-pooling branch November 21, 2024 09:07
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.

2 participants