[Feature] Support TTA and add --tta in tools/test.py.#1161
Merged
mzr1996 merged 3 commits intoopen-mmlab:dev-1.xfrom Dec 30, 2022
Merged
[Feature] Support TTA and add --tta in tools/test.py.#1161mzr1996 merged 3 commits intoopen-mmlab:dev-1.xfrom
--tta in tools/test.py.#1161mzr1996 merged 3 commits intoopen-mmlab:dev-1.xfrom
Conversation
Codecov ReportBase: 0.02% // Head: 88.60% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1161 +/- ##
============================================
+ Coverage 0.02% 88.60% +88.58%
============================================
Files 121 159 +38
Lines 8217 12544 +4327
Branches 1368 2005 +637
============================================
+ Hits 2 11115 +11113
+ Misses 8215 1098 -7117
- Partials 0 331 +331
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Member
Author
Done. |
Member
Author
|
This PR depends on open-mmlab/mmengine#611. |
Ezra-Yu
reviewed
Nov 8, 2022
Collaborator
Ezra-Yu
left a comment
There was a problem hiding this comment.
How to use custom tta needs to be reflected in the config as well as in the documentation, but this can be done later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
To support Test-Time-Aug (TTA).
Modification
AverageScoreTTAModelinherited from theBaseTTAModelin MMEngine.--ttaoption intools/test.pyto enable TTA during the test.Use cases
To use the default TTA (average the classification scores of images w/ and w/o flip)
To use your own custom TTA method
tta_modelandtta_pipelinein your config file:Checklist
Before PR:
After PR: