--- library_name: transformers metrics: - accuracy base_model: - microsoft/swin-large-patch4-window12-384-in22k license: apache-2.0 tags: - vision - image-classification model-index: - name: cub-200-bird-classifier-swin results: - task: name: Image Classification type: image-classification dataset: name: cub-200-subset type: cub-200-subset args: default metrics: - name: validation_accuracy type: accuracy value: 0.8653 - name: test_accuracy type: accuracy value: 0.8795 --- # Model Card for Model ID ![image/png](https://cdn-uploads.huggingface.co/production/uploads/624d888b0ce29222ad64c3d6/X7cXpayiKgUCUycIen22S.png) ### Model Description This model was created for the "Feather in Focus!" Kaggle competition of the Information Studies Master's Applied Machine Learning course at the University of Amsterdam. The goal of the competition was to apply novel approaches to achieve the highest possible accuracy on a bird classification task with 200 classes. We were given a labeled dataset of 3,926 images and an unlabeled dataset of 4,000 test images. Out of 32 groups and 1,083 submissions, we achieved the #1 accuracy on the test set with a score of 0.87950. ## Training Details The model we are finetuning, microsoft/swin-large-patch4-window12-384-in22k, was pre-trained on imagenet-21k, see https://huggingface.co./microsoft/swin-large-patch4-window12-384-in22k. #### Preprocessing Data augmentation was applied to the training data in a custom Torch dataset class. Because of the size of the dataset, images were not replaced but were duplicated and augmented. The only augmentations applied were HorizontalFlips and Rotations (10 degrees) to align with the relatively homogenous dataset. ### Finetuning Data The finetuning data is a subset of the cub-200-2011 dataset, https://paperswithcode.com/dataset/cub-200-2011. We finetuned the model on 3533 samples of the labeled dataset we were given, stratified on the label (7066 including augmented images). #### Finetuning Hyperparameters | Hyperparameter | Value | |-----------------------|----------------------------| | Optimizer | AdamW | | Learning Rate | 1e-4 | | Batch Size | 32 | | Epochs | 2 | | Weight Decay | * | | Class Weight | * | | Label Smoothing | * | | Scheduler | * | | Mixed Precision | Torch AMP | *parameters were intentionally left out because of poor results ## Evaluation Data The evaluation data is a subset of the cub-200-2011 dataset, https://paperswithcode.com/dataset/cub-200-2011 We evaluated the model on 393 samples of the labeled dataset we were given, stratified on the label. #### Testing Data The testing data is a subset of an unlabeled subset of the cub-200-2011 dataset, https://paperswithcode.com/dataset/cub-200-2011 of 4000 images.