open-mmlab / mmsegmentation

OpenMMLab Semantic Segmentation Toolbox and Benchmark.
https://mmsegmentation.readthedocs.io/en/main/
Apache License 2.0
8.25k stars 2.61k forks source link

do not support albumentations ? #2662

Open caj-github opened 1 year ago

caj-github commented 1 year ago

albumentations not supported

MeowZheng commented 1 year ago

it is in our backlog, would you like to tell us exactly what you use it for?

mmeendez8 commented 1 year ago

Hi @MeowZheng, I am willing to work in this PR so it can be merged soon. Is that fine? I am actually using that code in my projects so I use Albu for weather augmentations and other image transforms.

MeowZheng commented 1 year ago

Of course! thanks for your contribution.

Hi @MeowZheng, I am willing to work in this PR so it can be merged soon. Is that fine? I am actually using that code in my projects so I use Albu for weather augmentations and other image transforms.

mmeendez8 commented 1 year ago

How can we use this from mmseg1.0?

hadariru commented 6 months ago

To use albumentation on mmsegmentation, just add it into the configs for example

train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadAnnotations'),
    dict(type='Albu', transforms = [
            dict(type='HorizontalFlip', p=0.5),
            dict(type='OneOf', transforms=[
                dict(type='GaussNoise'),
                dict(type='IAAAdditiveGaussianNoise'),
            ]),
        p=0.5
        ])
]