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

[Enhance] Support multi-band image for Mosaic #2748

Merged
merged 3 commits into from Mar 15, 2023

Conversation

KKIEEK
Copy link
Contributor

@KKIEEK KKIEEK commented Mar 13, 2023

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

Please describe the motivation of this PR and the goal you want to achieve through this PR.

Modification

I changed the hardcoded 3 channel length to dynamic channel length in np.full function arguments.
This modification enables RandomMosaic transform to support multispectral image (e.g. RGB image with NIR band) or bi-temporal image pairs for change detection task.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-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

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2023

CLA assistant check
All committers have signed the CLA.

@KKIEEK KKIEEK changed the title [Enhance] Support multi-band image for Mosaic transform [Enhance] Support multi-band image for Mosaic Mar 13, 2023
@codecov
Copy link

codecov bot commented Mar 15, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (45fae72) 83.46% compared to head (c0bd3d8) 83.46%.

❗ Current head c0bd3d8 differs from pull request most recent head 20e6a0f. Consider uploading reports for the commit 20e6a0f to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev-1.x    #2748      +/-   ##
===========================================
- Coverage    83.46%   83.46%   -0.01%     
===========================================
  Files          147      147              
  Lines         8669     8670       +1     
  Branches      1303     1303              
===========================================
  Hits          7236     7236              
- Misses        1203     1204       +1     
  Partials       230      230              
Flag Coverage Δ
unittests 83.46% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
mmseg/datasets/transforms/transforms.py 90.41% <100.00%> (-0.12%) ⬇️

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng MeowZheng merged commit cb2d8fe into open-mmlab:dev-1.x Mar 15, 2023
7 checks passed
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
@KKIEEK KKIEEK deleted the feat/multidim-mosaic branch April 15, 2023 14:10
nahidnazifi87 pushed a commit to nahidnazifi87/mmsegmentation_playground that referenced this pull request Apr 5, 2024
## Modification

I changed the hardcoded 3 channel length to dynamic channel length in
`np.full` function arguments.
This modification enables `RandomMosaic` transform to support
multispectral image (e.g. RGB image with NIR band) or bi-temporal image
pairs for change detection task.

## Checklist

1. Pre-commit or other linting tools are used to fix the potential lint
issues.
2. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
3. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
4. The documentation has been modified accordingly, like docstring or
example tutorials.
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

4 participants