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 Mosaic transform #1093

Merged
merged 21 commits into from
Jan 11, 2022
Merged

[Feature] Add Mosaic transform #1093

merged 21 commits into from
Jan 11, 2022

Conversation

lkm2835
Copy link
Contributor

@lkm2835 lkm2835 commented Nov 30, 2021

Modification

mmseg/datasets/pipelines/transforms.py: Add class Mosaic
tests/test_data/test_transform.py: Add test_mosaic
mmseg/datasets/pipelines/__init__.py: import Mosaic


original code: Mosaic, test_mosaic in mmdet

@Junjun2016
Copy link
Collaborator

Hi @lkm2835
Thanks for your contribution again.
@RockeyCoss please review it and do some ablation studies.

@Junjun2016 Junjun2016 self-requested a review November 30, 2021 16:38
Copy link
Collaborator

@Junjun2016 Junjun2016 left a comment

Choose a reason for hiding this comment

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

We may also need MultiImageMixDataset.

@Junjun2016
Copy link
Collaborator

We may also need MultiImageMixDataset.

Can adjust MultiImageMixDataset in mmdet (https://github.com/open-mmlab/mmdetection/blob/f08548bfd6d394a82566022709b5ce9e6b0a855e/mmdet/datasets/dataset_wrappers.py#L289) to mmseg accordingly.

@lkm2835
Copy link
Contributor Author

lkm2835 commented Nov 30, 2021

We may also need MultiImageMixDataset.

I'll prepare and create another PR.

@Junjun2016
Copy link
Collaborator

We may also need MultiImageMixDataset.

I'll prepare and create another PR.

Great, it is better to add some results on your own datasets or mmseg supported datasets.

@codecov
Copy link

codecov bot commented Dec 1, 2021

Codecov Report

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

Project coverage is 90.17%. Comparing base (7f06e01) to head (5bd9cb8).
Report is 254 commits behind head on master.

Files Patch % Lines
mmseg/datasets/pipelines/transforms.py 97.72% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
+ Coverage   90.07%   90.17%   +0.09%     
==========================================
  Files         125      125              
  Lines        7268     7356      +88     
  Branches     1206     1218      +12     
==========================================
+ Hits         6547     6633      +86     
- Misses        518      520       +2     
  Partials      203      203              
Flag Coverage Δ
unittests 90.17% <97.72%> (+0.09%) ⬆️

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

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

mmseg/datasets/pipelines/transforms.py Outdated Show resolved Hide resolved
@RockeyCoss
Copy link
Contributor

@lkm2835 Hi,The results are as follows:

exp_num method mIoU best best index mIoU last last index
1 deeplabv3_r50-d8_512x512_160k_ade20k 0.43 10 0.43 10
2 deeplabv3_r50-d8_512x512_160k_ade20k_mosaic_0.2-1.8 0.4316 10 0.4316 10
3 deeplabv3_r50-d8_512x512_160k_ade20k_mosaic_0.5-1.5 0.4326 10 0.4326 10
4 deeplabv3_r50-d8_512x512_160k_ade20k_mosaic_0.8-1.2 0.4283 10 0.4283 10

We can see that

@lkm2835
Copy link
Contributor Author

lkm2835 commented Dec 16, 2021

We have done different img scales test for Mosaic augmentation.

The results are as follows:
[Feature] Add MultiImageMixDataset #1105

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2022

CLA assistant check
All committers have signed the CLA.

@Junjun2016 Junjun2016 merged commit f0262fa into open-mmlab:master Jan 11, 2022
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
* Fix typo in usage example

* original mosaic code in mmdet

* Adjust mosaic to the semantic segmentation

* Remove bbox test in test_mosaic

* Add unittests

* Fix resize mode for seg_fields

* Fix repr error

* modify Mosaic docs

* modify from Mosaic to RandomMosaic

* Add docstring

* modify Mosaic docstring

* [Docs] Add a blank line before Returns:

* add blank lines

Co-authored-by: MeowZheng <meowzheng@outlook.com>
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