YOLOv8数据增强

1.找到augment.py(ultralytics/data/augment.py),修改对应内容
 # Transforms
 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.0),
     A.RandomGamma(p=0.0),
     A.ImageCompression(quality_lower=75, p=0.0),
 ]
2.对应的增强库可以在albumentations找到
3.比如加雾操作,将原始代码修改为:
 # Transforms
 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.0),
     A.RandomGamma(p=0.0),
     A.ImageCompression(quality_lower=75, p=0.0),
     A.RandomFog(p=xxx)
 ]

你可能感兴趣的:(研究生,yolov8)