Snapmix

SnapMix is a semantically proportional data augmentation technique for fine-grained recognition — using Class Activation Maps (CAM) to determine the semantic importance of each pixel, then mixing images with labels weighted by the semantic content, not just area.

How Does SnapMix Work?

  • CAM: Compute Class Activation Maps for both images using the current model.
  • Cut Region: Select a region from image $B$ (random or guided by CAM).
  • Paste: Replace the corresponding region in image $A$.
  • Semantic Labels: Weight labels by the CAM activation in the visible regions, not by pixel area.
  • Paper: Huang et al. (2021).

Why It Matters

  • Fine-Grained: Designed for tasks where small, discriminative parts define the class (bird species, car models).
  • Semantic Labeling: CAM-based label mixing is more accurate than area-based (a 50% area overlap may contain 90% of the discriminative features).
  • Better Than CutMix: Significant improvements on fine-grained benchmarks (CUB-200, Stanford Cars).

SnapMix is semantically-aware CutMix — using attention maps to assign honest labels that reflect the true informative content of mixed images.

Take snapmix further

Ask the copilot about this term, or have our engineers assess it against your process.