
# dit-base-Tobacco_Dataset_v3

This model is a fine-tuned version of [microsoft/dit-base](https://huggingface.co/microsoft/dit-base) on the imagefolder dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1958
- Accuracy: 0.9419
- F1
  - Weighted: 0.9403
  - Micro: 0.9419
  - Macro: 0.9278

## Model description

For more information on how it was created, check out the following link: https://github.com/DunnBC22/Vision_Audio_and_Multimodal_Projects/blob/main/Document%20AI/Multiclass%20Classification/Tobacco-Related%20Documents/Tobacco%20Dataset%20%26%20DiT%20Transformer%20Project_v3.ipynb

## Intended uses & limitations

This model is intended to demonstrate my ability to solve a complex problem using technology.

## Training and evaluation data

Dataset Source: https://www.kaggle.com/datasets/patrickaudriaz/tobacco3482jpg

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 8

### Training results

| Training Loss | Epoch | Step | Validation Loss | Accuracy | Weighted F1 | Micro F1 | Macro F1 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:-----------:|:--------:|:--------:|
| 1.9273        | 0.98  | 43   | 1.1368          | 0.5987   | 0.5462      | 0.5987   | 0.5175   |
| 1.0685        | 1.98  | 86   | 0.5244          | 0.8248   | 0.7939      | 0.8248   | 0.7670   |
| 0.7373        | 2.98  | 129  | 0.3631          | 0.8808   | 0.8610      | 0.8808   | 0.8318   |
| 0.641         | 3.98  | 172  | 0.2884          | 0.9045   | 0.8967      | 0.9045   | 0.8732   |
| 0.5579        | 4.98  | 215  | 0.2192          | 0.9361   | 0.9338      | 0.9361   | 0.9214   |
| 0.5279        | 5.98  | 258  | 0.2292          | 0.9289   | 0.9263      | 0.9289   | 0.9137   |
| 0.4918        | 6.98  | 301  | 0.2052          | 0.9368   | 0.9348      | 0.9368   | 0.9218   |
| 0.4723        | 7.98  | 344  | 0.1958          | 0.9419   | 0.9403      | 0.9419   | 0.9278   |


### Framework versions

- Transformers 4.26.1
- Pytorch 1.12.1
- Datasets 2.9.0
- Tokenizers 0.12.1
{"language": ["en"], "tags": ["generated_from_trainer"], "datasets": ["imagefolder"], "metrics": ["accuracy"], "pipeline_tag": "image-classification", "model-index": [{"name": "dit-base-Tobacco_Dataset_v3", "results": [{"task": {"type": "image-classification", "name": "Image Classification"}, "dataset": {"name": "imagefolder", "type": "imagefolder", "config": "data", "split": "train", "args": "data"}, "metrics": [{"type": "accuracy", "value": 0.9418521177315147, "name": "Accuracy"}]}]}]}
transformers pytorch tensorboard beit image-classification generated_from_trainer en dataset:imagefolder model-index autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #beit #image-classification #generated_from_trainer #en #dataset-imagefolder #model-index #autotrain_compatible #endpoints_compatible #region-us 

dit-base-Tobacco\_Dataset\_v3
=============================


This model is a fine-tuned version of microsoft/dit-base on the imagefolder dataset.
It achieves the following results on the evaluation set:


* Loss: 0.1958
* Accuracy: 0.9419
* F1
	+ Weighted: 0.9403
	+ Micro: 0.9419
	+ Macro: 0.9278


Model description
-----------------


For more information on how it was created, check out the following link: URL


Intended uses & limitations
---------------------------


This model is intended to demonstrate my ability to solve a complex problem using technology.


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


Dataset Source: URL


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


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 5e-05
* train\_batch\_size: 32
* eval\_batch\_size: 32
* seed: 42
* gradient\_accumulation\_steps: 4
* total\_train\_batch\_size: 128
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: linear
* lr\_scheduler\_warmup\_ratio: 0.1
* num\_epochs: 8


### Training results



### Framework versions


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1



### Training hyperparameters


The following hyperparameters were used during training:


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


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #beit #image-classification #generated_from_trainer #en #dataset-imagefolder #model-index #autotrain_compatible #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


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


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1
TAGS
#transformers #pytorch #tensorboard #beit #image-classification #generated_from_trainer #en #dataset-imagefolder #model-index #autotrain_compatible #endpoints_compatible #region-us 
### Training hyperparameters


The following hyperparameters were used during training:


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


* Transformers 4.26.1
* Pytorch 1.12.1
* Datasets 2.9.0
* Tokenizers 0.12.1