Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.54k stars 496 forks source link

Can I use Albumentations library? #1815

Closed futurelee2 closed 8 months ago

futurelee2 commented 8 months ago

💡 Your Question

Hi i have problem for Augmentations I would like to use 'Albumentations' instead of transforms set by default

default is : DetectionMosaic DetectionRandomAffine DetectionMixup DetectionHSV DetectionHorizontalFlip DetectionPaddedRescale DetectionTargetsFormatTransform

How do I modify the code to use this library?

import albumentations as A

transforms = A.Compose[
    A.Blur(p=0.01),
    A.MedianBlur(p=0.01),
    A.ToGray(p=0.01),
    A.CLAHE(p=0.01),
    A.RandomBrightnessContrast(p=0.0),
    A.RandomGamma(p=0.0),
    A.ImageCompression(quality_lower=75, p=0.0),
            ])

Versions

No response

BloodAxe commented 8 months ago

Yes you can. Please check https://github.com/Deci-AI/super-gradients/blob/master/notebooks/albumentations_tutorial.ipynb