|
--- |
|
license: apache-2.0 |
|
base_model: google/vit-base-patch16-224 |
|
tags: |
|
- generated_from_trainer |
|
metrics: |
|
- accuracy |
|
- f1 |
|
- recall |
|
- precision |
|
model-index: |
|
- name: vit-real-fake-cls |
|
results: [] |
|
datasets: |
|
- date3k2/raw_real_fake_images |
|
--- |
|
|
|
<!-- This model card has been generated automatically according to the information the Trainer had access to. You |
|
should probably proofread and complete it, then remove this comment. --> |
|
|
|
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="200" height="32"/>](https://wandb.ai/date3k2/real-fake-classification/runs/3wxs9xk6) |
|
# ViT Real Fake Image Classification |
|
|
|
This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on [Real & Fake Images](https://huggingface.co/datasets/date3k2/raw_real_fake_images) dataset. |
|
It achieves the following results on the evaluation set: |
|
- Loss: 0.0398 |
|
- Accuracy: 0.9866 |
|
- F1: 0.9878 |
|
- Recall: 0.9854 |
|
- Precision: 0.9902 |
|
|
|
### Training hyperparameters |
|
|
|
The following hyperparameters were used during training: |
|
- learning_rate: 5e-05 |
|
- train_batch_size: 128 |
|
- eval_batch_size: 128 |
|
- seed: 42 |
|
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 |
|
- lr_scheduler_type: linear |
|
- lr_scheduler_warmup_ratio: 0.1 |
|
- num_epochs: 10 |
|
|
|
### Training results |
|
|
|
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Recall | Precision | |
|
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|:------:|:---------:| |
|
| 0.1759 | 1.0 | 59 | 0.2212 | 0.9173 | 0.9229 | 0.8978 | 0.9495 | |
|
| 0.1903 | 2.0 | 118 | 0.1047 | 0.9629 | 0.9659 | 0.9503 | 0.9819 | |
|
| 0.0463 | 3.0 | 177 | 0.0824 | 0.9699 | 0.9730 | 0.9834 | 0.9628 | |
|
| 0.0015 | 4.0 | 236 | 0.0763 | 0.9764 | 0.9787 | 0.9825 | 0.9749 | |
|
| 0.0631 | 5.0 | 295 | 0.0794 | 0.9737 | 0.9759 | 0.9640 | 0.9880 | |
|
| 0.0114 | 6.0 | 354 | 0.0582 | 0.9801 | 0.9819 | 0.9786 | 0.9853 | |
|
| 0.0004 | 7.0 | 413 | 0.0662 | 0.9807 | 0.9824 | 0.9796 | 0.9853 | |
|
| 0.0231 | 8.0 | 472 | 0.0713 | 0.9753 | 0.9773 | 0.9659 | 0.9890 | |
|
| 0.0017 | 9.0 | 531 | 0.0518 | 0.9817 | 0.9834 | 0.9796 | 0.9872 | |
|
| 0.0268 | 10.0 | 590 | 0.0385 | 0.9839 | 0.9855 | 0.9903 | 0.9807 | |
|
|
|
|
|
### Framework versions |
|
|
|
- Transformers 4.41.0 |
|
- Pytorch 2.3.0+cu121 |
|
- Datasets 2.19.1 |
|
- Tokenizers 0.19.1 |