Home Knowledge Base CutMix

CutMix is a data augmentation technique that combines the ideas of Cutout (masking image regions) and Mixup (blending labels) — instead of filling the masked region with zeros (wasted pixels), CutMix replaces it with a rectangular patch from another training image and adjusts the label proportionally to the patch area, so a training image that is 70% cat and 30% dog (by area) gets the label [0.7 cat, 0.3 dog], making every pixel informative and achieving stronger regularization than either Cutout or Mixup alone.

What Is CutMix?

How CutMix Works

StepProcessExample
1. Take Image ACat imageFull cat photo
2. Take Image BDog imageFull dog photo
3. Sample λ from Beta(α, α)λ = 0.770% of area from A
4. Cut rectangle from BSize = $sqrt{1-lambda}$ × image size30% area rectangle
5. Paste onto AReplace patch in A with patch from BCat with dog ear region
6. Mix labels$ ilde{y} = 0.7 imes y_A + 0.3 imes y_B$[0.7 cat, 0.3 dog]

Comparison of Augmentation Techniques

TechniqueInputLabelEvery Pixel Informative?Regularization
Standard TrainingOriginal imageHard label [1, 0]YesNone
CutoutImage with black patchHard label [1, 0]No (black pixels wasted)Moderate
MixupGhostly blend of 2 imagesSoft label [0.7, 0.3]Yes (but unnatural)Strong
CutMixImage with patch from anotherSoft label [0.7, 0.3]Yes (natural pixels)Strongest

Benefits

BenefitWhy
Object localizationModel must recognize cats even when part of the image shows a dog — improves WeaklySupervised Object Localization
CalibrationSoft labels teach the model to output calibrated probabilities
RegularizationForces model to use all spatial regions, not just the most discriminative
EfficiencyNo additional data needed — just recombine existing training images

YOLO / Mosaic Variant

The popular YOLO object detection framework uses a variant called Mosaic Augmentation — combining 4 images into a single training image (2×2 grid), which is an extension of the CutMix principle. This helps the model detect objects at different scales and in different contexts.

Results

DatasetModelStandardCutMixImprovement
CIFAR-100PyramidNet16.45% error14.47% error-1.98%
ImageNetResNet-5023.68% error21.40% error-2.28%
ImageNetResNet-50 (localization)46.29% error43.45% error-2.84%

CutMix is the state-of-the-art spatial augmentation technique that makes every pixel count — combining the spatial regularization of Cutout with the label smoothing of Mixup by replacing masked regions with real image content rather than zeros, achieving better classification accuracy, stronger localization ability, and more calibrated predictions than either predecessor.

cutmixcombineaugment

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.