Abstract
Data mixing augmentation has proved effective in training deep models. Recent methods mix labels mainly based on the mixture proportion of image pixels. As the main discriminative information of a fine-grained image usually resides in subtle regions, methods along this line are prone to heavy label noise in fine-grained recognition. We propose in this paper a novel scheme, termed as Semantically Proportional Mixing (SnapMix), which exploits class activation map (CAM) to lessen the label noise in augmenting fine-grained data. SnapMix generates the target label for a mixed image by estimating its intrinsic semantic composition, and allows for asymmetric mixing operations and ensures semantic correspondence between synthetic images and target labels. Experiments show that our method consistently outperforms existing mixed-based approaches on various datasets and under different network depths. Furthermore, by incorporating the mid-level features, the proposed SnapMix achieves top-level performance, demonstrating its potential to serve as a solid baseline for fine-grained recognition.
Introduction
In fine-grained recognition tasks—such as identifying specific bird species or aircraft models—the critical discriminative information often resides in small, subtle regions like a bird's beak or a specific wing pattern. Standard data augmentation techniques like Mixup and CutMix assume spatial uniformity, where every pixel contributes equally to the label. They calculate mixed labels based on the simple area ratio of the blended images.
However, this assumption fails in fine-grained contexts. If CutMix replaces a small but semantically vital region of an image with a large background patch from another, the resulting label weight for the original class remains high despite the loss of its most important features. This introduces significant "label noise," confusing the model and hindering its ability to learn the subtle visual cues necessary for high-accuracy classification.
Methodology: Semantically Proportional Mixing (SnapMix)
SnapMix addresses label noise by ensuring that synthetic labels accurately reflect the semantic content of the augmented image. The process involves three main steps:
- Semantic Percent Map (SPM) Generation: For each image in a training pair, the model generates a Class Activation Map (CAM). This map is normalized so that all pixel values sum to 1, creating an SPM. The SPM essentially quantifies the "class-specific information" present at every pixel location.
- Asymmetric Mixing: SnapMix moves beyond strictly symmetric operations. A random patch is cropped from image B (potentially scaled or deformed) and pasted onto image A. Unlike CutMix, the regions do not have to be the same size or shape.
- Semantic Label Generation: Instead of area ratios, SnapMix calculates label weights by summing the values in the SPM corresponding to the regions that were kept or added. The weight for class B is determined by the "semantic mass" of the patch taken from image B's SPM. The weight for class A is reduced based on the "semantic mass" obscured in image A's SPM.
This approach ensures that if a tiny but highly informative patch is pasted, it receives a high label weight, maintaining semantic correspondence between the image and its target label.
Experiments and Results
The authors evaluated SnapMix on three standard fine-grained benchmarks: CUB-200-2011 (200 bird species), Stanford Cars, and FGVC-Aircraft, using various ResNet backbones.
Key Performance Metrics
- Superiority over Baselines: SnapMix consistently outperformed CutOut, Mixup, and CutMix. On the CUB dataset with a ResNet-50 backbone, SnapMix achieved 87.75% accuracy, a significant improvement over the 85.49% baseline and 86.15% for CutMix.
- State-of-the-Art Results: When combined with mid-level features, SnapMix reached 89.32% on CUB, rivaling complex specialized architectures that use part-based detectors or multiple forward passes.
- Robustness: Unlike CutMix, which can degrade performance on shallower networks (like ResNet-18), SnapMix provided consistent gains across all model capacities. It also proved to be an effective regularizer when training models from scratch without ImageNet pre-training.
Discussion and Conclusion
SnapMix demonstrates that in fine-grained domains, area does not equal importance. By accounting for semantic value through dynamic CAM-based labeling, SnapMix reduces label noise and increases the diversity of augmented data through asymmetric mixing. While generating CAMs adds some training-time overhead, the method requires no extra computation at inference. Overall, SnapMix offers a robust and effective baseline for augmenting fine-grained datasets, ensuring that models focus on the features that truly define a class.
Summary updated