date3k2/raw_real_fake_images
Viewer • Updated • 9.31k • 112 • 2
How to use date3k2/vit-real-fake-classification-v2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="date3k2/vit-real-fake-classification-v2")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("date3k2/vit-real-fake-classification-v2")
model = AutoModelForImageClassification.from_pretrained("date3k2/vit-real-fake-classification-v2")This model is a fine-tuned version of google/vit-base-patch16-224 on Real & Fake Images dataset. It achieves the following results on the evaluation set:
The following hyperparameters were used during training:
| 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 |
Base model
google/vit-base-patch16-224