mmrotate
mmrotate copied to clipboard
[WIP] Add PolyRandomAffine and FilterRotatedAnnotations
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
Add PolyRandomAffine and FilterRotatedAnnotations. Part of RotatedYOLOX.
For the rect_classes in PolyRandomRotate, I didn't find a better solution to add them to the RandomAffine, so I ignored it for now.
I think there may be a problem with clip_border too. This may change the bbox shape at edges.
Modification
Please briefly describe what modification is made in this PR.
BC-breaking (Optional)
Does the modification introduce changes that break the back-compatibility of the downstream repos? If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist
- Pre-commit or other linting tools are used to fix the potential lint issues.
- The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
- The documentation has been modified accordingly, like docstring or example tutorials.
Should I rename that to PolyRandomAffine, the transform is done in polygon.
Codecov Report
Merging #353 (dcde999) into dev (36de5f6) will decrease coverage by
0.20%. The diff coverage is16.82%.
@@ Coverage Diff @@
## dev #353 +/- ##
==========================================
- Coverage 29.46% 29.25% -0.21%
==========================================
Files 121 121
Lines 8495 8596 +101
Branches 1289 1303 +14
==========================================
+ Hits 2503 2515 +12
- Misses 5891 5980 +89
Partials 101 101
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 29.23% <16.82%> (-0.21%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| mmrotate/datasets/pipelines/transforms.py | 52.02% <12.16%> (-13.76%) |
:arrow_down: |
| mmrotate/core/bbox/transforms.py | 36.07% <16.66%> (-0.25%) |
:arrow_down: |
| mmrotate/datasets/pipelines/loading.py | 25.53% <20.83%> (-4.91%) |
:arrow_down: |
| mmrotate/core/bbox/__init__.py | 100.00% <100.00%> (ø) |
|
| mmrotate/datasets/pipelines/__init__.py | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 36de5f6...dcde999. Read the comment docs.
Should I rename that to
PolyRandomAffine, the transform is done in polygon.
Yes.
Continue in #409