Instructions to use keras-io/CutMix_data_augmentation_for_image_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use keras-io/CutMix_data_augmentation_for_image_classification with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy) # See https://github.com/keras-team/tf-keras for more details. from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("keras-io/CutMix_data_augmentation_for_image_classification") - Notebooks
- Google Colab
- Kaggle
Tensorflow Keras implementation of : CutMix data augmentation for image classification
The full credit goes to: Sayan Nath
The Data augmentation strategy
CutMix is a data Augmentation strategy where some portion of the training example is removed and pasted with the content from other images in the training set. The labels are also mixed based on the proportion of the pixels that were combined. The full paper is at https://arxiv.org/pdf/1905.04899.pdf by Yun et. al., 2019.
CutMix augmented examples from CIFAR-10
Here are a few examples of augmented images.
Model and Dataset used
The Data augmentation is applied to the CIFAR-10 Data set. The model used here is the Resnet-20 with Categorical Cross-Entropy loss.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'learning_rate': 0.001, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: float32
Training Metrics
After 20 Epocs, the accuracy of the model trained on the CutMix augmented data is 79.61%, while the accuracy of the model trained on the original data is 75.62%. I also found that the training on the original data was slightly faster.
Model Plot
- Downloads last month
- 13
