I have tried to modify existig augument.py code in yolov8 repository but it is still implementing the default albumentations while training. Is there any method to add additonal albumentations.
This is what i have tried to add additonal albumentations.
def __init__(self, p=1.0):
"""Initialize the transform object for YOLO bbox formatted params."""
self.p = p
self.transform = None
prefix = colorstr('albumentations: ')
try:
import albumentations as A
check_version(A.__version__, '1.0.3', hard=True) # version requirement
T = [
A.Blur(p=0.01),
A.MedianBlur(p=0.01),
A.ToGray(p=0.01),
A.CLAHE(p=0.01),
A.RandomBrightnessContrast(p=0.5),
A.RandomGamma(p=0.5),
A.ImageCompression(quality_lower=75, p=0.5),
A.MotionBlur(p=0.5, blur_limit=(3,9), always_apply=False)] # transforms
self.transform = A.Compose(T, bbox_params=A.BboxParams(format='yolo', label_fields=['class_labels']))
LOGGER.info(prefix + ', '.join(f'{x}'.replace('always_apply=False, ', '') for x in T if x.p))
except ImportError: # package not installed, skip
pass
except Exception as e:
LOGGER.info(f'{prefix}{e}')
But i don't see "ImageCompression" and "MotionBlur" albumentation in training process.