
# finetuned-vit-base-patch16-224-upside-down-detector

This model is a fine-tuned version of [vit-base-patch16-224-in21k](https://huggingface.co/google/vit-base-patch16-224-in21k) on the custom image orientation dataset adapted from the [beans](https://huggingface.co/datasets/beans) dataset. It achieves the following results on the evaluation set:
- Accuracy: 0.8947

## Training and evaluation data

The custom dataset for image orientation adapted from [beans](https://huggingface.co/datasets/beans) dataset contains a total of 2,590 image samples with 1,295 original and 1,295 upside down. The model was fine-tuned on the train subset and evaluated on validation and test subsets. The dataset splits are listed below:

| Split      | # examples |
|:----------:|:----------:|
| train      | 2068       |
| validation | 133        |
| test       | 128        |

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-04
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 32
- num_epochs: 5

### Training results

| Epoch      | Accuracy   |
|:----------:|:----------:|
| 0          | 0.8609     |
| 1          | 0.8835     |
| 2          | 0.8571     |
| 3          | 0.8941     |
| 4          | 0.8941     |

### Framework versions

- Transformers 4.17.0
- Pytorch 1.9.0+cu111
- Pytorch/XLA 1.9
- Datasets 2.0.0
- Tokenizers 0.12.0

{"license": "apache-2.0", "tags": ["accelerator"], "metrics": ["accuracy"], "widget": [{"src": "https://huggingface.co/jaygala24/finetuned-vit-base-patch16-224-upside-down-detector/resolve/main/original.jpg", "example_title": "original"}, {"src": "https://huggingface.co/jaygala24/finetuned-vit-base-patch16-224-upside-down-detector/resolve/main/upside_down.jpg", "example_title": "upside_down"}], "model-index": [{"name": "finetuned-vit-base-patch16-224-upside-down-detector", "results": []}]}
transformers pytorch vit image-classification accelerator license:apache-2.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #vit #image-classification #accelerator #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 

finetuned-vit-base-patch16-224-upside-down-detector
===================================================


This model is a fine-tuned version of vit-base-patch16-224-in21k on the custom image orientation dataset adapted from the beans dataset. It achieves the following results on the evaluation set:


* Accuracy: 0.8947


Training and evaluation data
----------------------------


The custom dataset for image orientation adapted from beans dataset contains a total of 2,590 image samples with 1,295 original and 1,295 upside down. The model was fine-tuned on the train subset and evaluated on validation and test subsets. The dataset splits are listed below:



Training procedure
------------------


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-04
* train\_batch\_size: 32
* eval\_batch\_size: 32
* seed: 42
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 32
* num\_epochs: 5


### Training results



### Framework versions


* Transformers 4.17.0
* Pytorch 1.9.0+cu111
* Pytorch/XLA 1.9
* Datasets 2.0.0
* Tokenizers 0.12.0



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-04
* train\_batch\_size: 32
* eval\_batch\_size: 32
* seed: 42
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 32
* num\_epochs: 5 ### Training results ### Framework versions


* Transformers 4.17.0
* Pytorch 1.9.0+cu111
* Pytorch/XLA 1.9
* Datasets 2.0.0
* Tokenizers 0.12.0
TAGS
#transformers #pytorch #vit #image-classification #accelerator #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-04
* train\_batch\_size: 32
* eval\_batch\_size: 32
* seed: 42
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 32
* num\_epochs: 5 ### Training results ### Framework versions


* Transformers 4.17.0
* Pytorch 1.9.0+cu111
* Pytorch/XLA 1.9
* Datasets 2.0.0
* Tokenizers 0.12.0
passage: TAGS
#transformers #pytorch #vit #image-classification #accelerator #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 2e-04
* train\_batch\_size: 32
* eval\_batch\_size: 32
* seed: 42
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_steps: 32
* num\_epochs: 5### Training results### Framework versions


* Transformers 4.17.0
* Pytorch 1.9.0+cu111
* Pytorch/XLA 1.9
* Datasets 2.0.0
* Tokenizers 0.12.0