CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features
Paper β’ 1905.04899 β’ Published
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
ResNet18 + CBAM Attention Β· 20-Class Fruit Classification Β· Test Accuracy: 91.78%
Click here to the repo of Github
Input (224Γ224 RGB)
β
βΌ
βββββββββββββββββββββββββββββββββββ
β ResNet18 Backbone (ImageNet) β
β ββ Conv1 + BN + ReLU + MaxPool β
β ββ Layer1 (64ch) β
β ββ Layer2 (128ch) βββΊ CBAM(128)β
β ββ Layer3 (256ch) βββΊ CBAM(256)β
β ββ Layer4 (512ch) βββΊ CBAM(512)β
β ββ AdaptiveAvgPool2d(1,1) β
βββββββββββββββββββββββββββββββββββ
β 512-d feature
βΌ
βββββββββββββββββββββββββββββββββββ
β Classification Head β
β Dropout(0.5) β
β Linear(512β256) + ReLU + BN β
β Dropout(0.3) β
β Linear(256β20) β
βββββββββββββββββββββββββββββββββββ
β
20-class logits
Total Parameters: ~11.39M
Channel + Spatial dual-dimension attention, injected after ResNet Layer2/3/4. Guides the model to focus on fruit regions and suppress background interference.
Mixed-sample augmentation with probability 0.5. Forces the model to learn from partial regions, improving generalization.
Dual mechanism: weighted random sampling + weighted cross-entropy loss to ensure minority class performance.
| # | Fruit | # | Fruit | # | Fruit | # | Fruit |
|---|---|---|---|---|---|---|---|
| 1 | Apple | 6 | Strawberry | 11 | Jujube | 16 | Papaya |
| 2 | Banana | 7 | Pineapple | 12 | Pear | 17 | Avocado |
| 3 | Orange | 8 | Mango | 13 | Cherry | 18 | Blueberry |
| 4 | Grape | 9 | Lemon | 14 | Coconut | 19 | Cantaloupe |
| 5 | Watermelon | 10 | Kiwi | 15 | Pomegranate | 20 | Dragonfruit |