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] Add GradCAM utils for Recognizer. #324

Merged
merged 13 commits into from
Nov 12, 2020

Conversation

irvingzhang0512
Copy link
Contributor

@irvingzhang0512 irvingzhang0512 commented Nov 9, 2020

  • add unittest
  • test generating heatmaps with labels.

@CLAassistant
Copy link

CLAassistant commented Nov 9, 2020

CLA assistant check
All committers have signed the CLA.

@innerlee innerlee requested a review from SuX97 November 9, 2020 08:35
@codecov
Copy link

codecov bot commented Nov 9, 2020

Codecov Report

Merging #324 (76fb7b0) into master (a02a8de) will increase coverage by 0.15%.
The diff coverage is 95.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #324      +/-   ##
==========================================
+ Coverage   85.81%   85.97%   +0.15%     
==========================================
  Files          97       98       +1     
  Lines        6797     6922     +125     
  Branches     1104     1118      +14     
==========================================
+ Hits         5833     5951     +118     
- Misses        749      753       +4     
- Partials      215      218       +3     
Flag Coverage Δ
unittests 85.95% <95.23%> (+0.15%) ⬆️

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

Impacted Files Coverage Δ
mmaction/models/recognizers/audio_recognizer.py 62.50% <50.00%> (-0.66%) ⬇️
mmaction/models/recognizers/base.py 58.82% <85.71%> (+1.53%) ⬆️
mmaction/models/recognizers/recognizer2d.py 88.05% <95.00%> (+2.95%) ⬆️
mmaction/utils/gradcam_utils.py 96.55% <96.55%> (ø)
mmaction/models/recognizers/recognizer3d.py 89.74% <100.00%> (+3.07%) ⬆️
mmaction/utils/__init__.py 100.00% <100.00%> (ø)
mmaction/core/evaluation/accuracy.py 91.90% <0.00%> (-0.96%) ⬇️
mmaction/models/backbones/resnet2plus1d.py 100.00% <0.00%> (+4.00%) ⬆️

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 13f50f7...907a176. Read the comment docs.

demo/demo_gradcam.py Outdated Show resolved Hide resolved
@SuX97
Copy link
Collaborator

SuX97 commented Nov 9, 2020

Cool.

2. add reisze params in demo_gradcam.py.
3. smaller demo_gradcam.gif.
4. add unittest for `GradCAM` & `forward_gradcam`.
5. add more docs.
@irvingzhang0512
Copy link
Contributor Author

@SuX97
I'm not familiar with unittest...
It seems that test_bmn fails, but I cannot find why.
Any suggestions?

tests/test_gradcam.py Outdated Show resolved Hide resolved
@dreamerlin
Copy link
Collaborator

@SuX97
I'm not familiar with unittest...
It seems that test_bmn fails, but I cannot find why.
Any suggestions?

Some data shapes are too huge, which may cause failure in CI.

demo/demo_gradcam.py Outdated Show resolved Hide resolved
demo/demo_gradcam.py Outdated Show resolved Hide resolved
docs/changelog.md Outdated Show resolved Hide resolved
mmaction/utils/gradcam_utils.py Outdated Show resolved Hide resolved
mmaction/utils/gradcam_utils.py Outdated Show resolved Hide resolved
tests/test_gradcam.py Outdated Show resolved Hide resolved
tests/test_gradcam.py Outdated Show resolved Hide resolved
mmaction/utils/gradcam_utils.py Outdated Show resolved Hide resolved
mmaction/utils/gradcam_utils.py Outdated Show resolved Hide resolved
tests/test_gradcam.py Outdated Show resolved Hide resolved
@dreamerlin
Copy link
Collaborator

The docs about demo can be moved to demo/README.md

mmaction/utils/gradcam_utils.py Outdated Show resolved Hide resolved
demo/demo_gradcam.py Outdated Show resolved Hide resolved
@dreamerlin dreamerlin requested review from SuX97 and innerlee November 11, 2020 04:06
demo/demo_gradcam.py Outdated Show resolved Hide resolved
@dreamerlin
Copy link
Collaborator

Please also help to highlight that the demo can also loads checkpoint from corresponding url, like this. thanks!

@dreamerlin dreamerlin added exist conflict This PR exists conflicts to be resolved need changelog and removed need changelog labels Nov 11, 2020
@dreamerlin
Copy link
Collaborator

LGTM

@dreamerlin dreamerlin removed the exist conflict This PR exists conflicts to be resolved label Nov 12, 2020
Copy link
Collaborator

@SuX97 SuX97 left a comment

Choose a reason for hiding this comment

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

LGTM.

@innerlee
Copy link
Contributor

This is a big pr, thanks!

@innerlee
Copy link
Contributor

good to go after resolving the conflicts

@dreamerlin
Copy link
Collaborator

good to go after resolving the conflicts

Help with resolving conflicts

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