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 Albumentation capabilities to the dataset pipeline #1863

Closed
gvalvano opened this issue May 17, 2023 · 2 comments · Fixed by #1894
Closed

[Feature] Add Albumentation capabilities to the dataset pipeline #1863

gvalvano opened this issue May 17, 2023 · 2 comments · Fixed by #1894
Assignees
Labels
kind/enhancement refactoring, improving CI, template, etc.

Comments

@gvalvano
Copy link

What's the feature?

In MMDetection, it is possible to use Albumentations to make complex transformations to the input data (reference here and here).

Since fine-tuning generative models on small datasets could be problematic (e.g. dreambooth), I believe it would be extra-useful to add albumentation support in MMagic, too! This way, the user could artificially generate new data samples of the target concept.

Any other context?

Example of config file with albumentation:

albu_transforms = [
    dict(
        type='ShiftScaleRotate',
        shift_limit=0.0625,
        scale_limit=0.0,
        rotate_limit=0,
        interpolation=1,
        p=0.5),
    dict(
        type='RandomBrightnessContrast',
        brightness_limit=[0.1, 0.3],
        contrast_limit=[0.1, 0.3],
        p=0.2),),
]
train_pipeline = [
    dict(type='LoadImageFromFile', key='img', channel_order='rgb'),
    dict(type='Resize', scale=(512, 512)),
    dict(type='Albu', transforms=albu_transforms),
    dict(type='PackInputs')
]
@gvalvano gvalvano added the kind/enhancement refactoring, improving CI, template, etc. label May 17, 2023
@Z-Fran Z-Fran self-assigned this Jun 6, 2023
@Z-Fran
Copy link
Collaborator

Z-Fran commented Jun 6, 2023

We will check it

@Z-Fran Z-Fran linked a pull request Jun 7, 2023 that will close this issue
7 tasks
@Z-Fran
Copy link
Collaborator

Z-Fran commented Jun 7, 2023

we will support a simple Albumentation there. #1894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement refactoring, improving CI, template, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants