YOLO Vision 2026:
Back to Ultralytics Glossary

CutMix

Discover how the CutMix data augmentation technique prevents overfitting. Learn how to easily apply it to train robust Ultralytics YOLO26 models.

CutMix is an advanced data augmentation technique used to train robust computer vision models by cutting a rectangular patch from one image and pasting it onto a target image. Unlike simpler augmentations that adjust brightness or rotation, CutMix alters the fundamental composition of a training sample. When the pixels are swapped, the corresponding ground-truth labels are also mixed proportionally to the area of the patch. This helps artificial neural networks learn to identify objects from partial views, forcing the model to rely on multiple features rather than focusing solely on the most discriminative parts of an object. First introduced in a 2019 academic paper, it has become a standard operation in deep learning frameworks to prevent overfitting and improve generalization across large datasets.

How the Technique Works#

During model training, the algorithm randomly selects a center coordinate and a box size to extract a region from a secondary image. This patch is then overlaid directly onto a primary image within the active batch. If the primary image contained a dog and the secondary contained a cat, the final image would feature a cat patch replacing a portion of the dog. The classification labels are updated using linear interpolation based on the exact patch area—for example, yielding a label of 0.7 dog and 0.3 cat. In object detection tasks, bounding boxes that retain at least a certain percentage (often 10%) of their original area within the pasted region are preserved. This technique is natively supported as a cutmix training hyperparameter in Ultralytics YOLO, allowing practitioners to easily define the probability of this transformation.

Differentiating Between MixUp and Cutout#

CutMix is closely related to two other prominent data augmentation techniques, but it resolves their specific limitations:

  • MixUp Augmentation: MixUp blends two images globally by calculating a weighted average of their pixel values. While effective, it often results in unnatural, semitransparent phantom images that can confuse models by disrupting local spatial correlation. In contrast, CutMix preserves the original pixel intensities within the cut regions, which researchers further optimized in approaches like Attentive CutMix.
  • Cutout Augmentation: Cutout drops information by masking a random rectangular region with black pixels or the dataset mean. While it encourages the model to look at the entire object, it wastes valuable training tensors. CutMix replaces that missing space with informative image classification patches from other images, increasing overall learning efficiency.

Real-World Applications#

By training models to recognize severely occluded objects, CutMix significantly boosts machine learning performance across diverse industries.

Implementation in Practice#

Integrating this augmentation into an AI pipeline is straightforward. Most high-level libraries support it natively, such as PyTorch Transforms and Keras Preprocessing Layers.

When training a model like YOLO26, configuring this augmentation requires just a single parameter adjustment. This automatically handles both the image patching and the complex bounding box clipping logic.

from ultralytics import YOLO

# Initialize the recommended Ultralytics YOLO26 model
model = YOLO("yolo26n.pt")

# Train the model with CutMix enabled at a 50% probability
results = model.train(data="coco8.yaml", epochs=50, imgsz=640, cutmix=0.5)

For teams managing large-scale vision workflows, the Ultralytics Platform simplifies this by allowing users to tune these data augmentation best practices directly from a cloud interface, streamlining the path from annotation to model deployment.

Explore solutions

Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more
Computer vision for aerial imagery

Computer vision for aerial imagery

Transform drone and aerial imagery into real-time insights for agriculture, aquaculture, environmental monitoring, conservation, and geospatial analysis with Ultralytics YOLO.
Learn more
Computer vision in aerospace

Computer vision in aerospace

Bring vision AI to aerial monitoring with Ultralytics YOLO models. Power drones, aerospace workflows, environmental conservation & geospatial industries with computer vision solutions.
Learn more
Computer vision in security

Computer vision in security

Protect every site with Ultralytics YOLO models. Vision AI powers perimeter monitoring, threat detection, license-plate recognition, and workplace safety.
Learn more
Computer vision in robotics

Computer vision in robotics

Power smarter machines with Ultralytics YOLO models. Vision AI in robotics drives autonomous navigation, perception, object tracking, and real-time control.
Learn more
Computer vision in logistics

Computer vision in logistics

Streamline logistics with Ultralytics YOLO models. Vision AI enables package inspection, sorting, vehicle tracking, and real-time warehouse safety monitoring.
Learn more
Computer vision in retail

Computer vision in retail

Reimagine retail with Ultralytics YOLO models. Vision AI powers inventory tracking, shelf monitoring, queue management, and smarter customer insights.
Learn more
Computer vision in healthcare

Computer vision in healthcare

Build healthcare solutions with Ultralytics YOLO models. Vision AI in healthcare powers faster medical imaging, smarter diagnostics, and patient monitoring.
Learn more
Computer vision in manufacturing

Computer vision in manufacturing

Optimize manufacturing with Ultralytics YOLO models. Vision AI drives quality control, defect detection, PPE compliance, and assembly line automation.
Learn more
Computer vision in automotive

Computer vision in automotive

Apply computer vision in automotive with Ultralytics YOLO models. Vision AI elevates road safety, driver assistance, and vehicle automation for smarter roads.
Learn more
Computer vision in agriculture

Computer vision in agriculture

Bring vision AI to smart agriculture with Ultralytics YOLO models. Power crop monitoring, livestock tracking, and precision farming for higher, smarter yields.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning