Replies: 1 comment 7 replies
-
Hello! 😊 Absolutely, you can integrate additional augmentations using First, ensure you have pip install albumentations Then, you can define your custom augmentation pipeline in your training script like so: from ultralytics import YOLO, Albumentations
import albumentations as A
# Define your custom augmentations
custom_augmentations = Albumentations([
A.RandomResizedCrop(height=640, width=640),
A.RandomBrightnessContrast(brightness_limit=0.2, contrast_limit=0.2),
A.GaussianBlur(blur_limit=(3, 7)),
A.GaussNoise(var_limit=(10.0, 50.0)),
])
# Load your model
model = YOLO('yolov8n.pt', augment=custom_augmentations)
# Train with custom augmentations
results = model.train(data='coco128.yaml', epochs=100, imgsz=640) This code snippet integrates Hope this helps! Let us know if you have any more questions. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, for a project I need to apply a few augmentations that I could not find provided in the default.yaml file.
These are - random resizing and cropping, brightness and contrast, and blur and noise. Is there some way that I can do so using yolov8 during training?
While going through the documentation I came across this
ultralytics.data.augment.Albumentations
.If this can be helpful, then can you please provide me a working integrated code for the train mode? Thanks
Beta Was this translation helpful? Give feedback.
All reactions