Replies: 2 comments 3 replies
-
👋 Hello @taitsmp, thank you for your interest in Ultralytics 🚀! We recommend a visit to the Docs for new users, where you can find many Python and CLI usage examples and where many of the most common questions may already be answered. If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. If this is a custom training ❓ Question, please provide as much information as possible, including dataset samples, your setup details, and specific configurations. You can also verify you are following our Tips for Best Training Results for optimal usage. Regarding Albumentations specifically, customization typically involves configuring transformations either in your training script or through the dataset pipeline. To assist you further, could you share any portion of your current workflow or code where you're incorporating Albumentations? This will help ensure a more targeted response from the community or team 😃. Join the Ultralytics community where it suits you best. For real-time chat, head to Discord 🎧. Prefer in-depth discussions? Check out Discourse. Or dive into threads on our Subreddit to share knowledge with others. UpgradeUpgrade to the latest pip install -U ultralytics EnvironmentsYOLO may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLO Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit. This is an automated response to help guide you as quickly as possible. An Ultralytics engineer will also assist you soon 😊. |
Beta Was this translation helpful? Give feedback.
-
@taitsmp you're correct that for classification, the from ultralytics import YOLO
import albumentations as A
# Define custom Albumentations transforms
custom_augs = A.Compose([
A.ToGray(p=0.5), # 50% chance to convert images to grayscale
])
# Load model
model = YOLO("yolo11n-cls.pt")
# Train model with custom augmentations applied
results = model.train(data="path/to/your/dataset", epochs=100, imgsz=640, augment=custom_augs) This allows you to adjust augmentation probabilities as needed. Let me know if further clarification is required! |
Beta Was this translation helpful? Give feedback.
-
Could someone give me very short example of how to configure specific Albumentations transforms when doing image classification using YoloV11 or
My understanding is that classification requires having the data argument to
model.train
be a directory not a yaml file. I'm confused on how to change the configuration of Albumentations in this case. I want to increase the percentage of black and white images used when training.Thank you!
Beta Was this translation helpful? Give feedback.
All reactions