Image Classification
Transformers
Safetensors
Spanish
vit
vision-transformer
binary-classification
deepfake-detection
Instructions to use djramirezp/vit-face-classification-quiz2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use djramirezp/vit-face-classification-quiz2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="djramirezp/vit-face-classification-quiz2") 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("djramirezp/vit-face-classification-quiz2") model = AutoModelForImageClassification.from_pretrained("djramirezp/vit-face-classification-quiz2") - Notebooks
- Google Colab
- Kaggle
metadata
language: es
license: apache-2.0
library_name: transformers
pipeline_tag: image-classification
tags:
- vision-transformer
- image-classification
- binary-classification
- deepfake-detection
datasets:
- djramirezp/face-classification-dataset
metrics:
- accuracy
- precision
- recall
- f1
ViT fine-tuned para clasificacion FAKE/REAL
Resumen metodologico
Se utilizo el modelo base google/vit-base-patch16-224-in21k y se realizo fine-tuning con Trainer de Hugging Face.
Las imagenes se preprocesaron con AutoImageProcessor y el entrenamiento se ejecuto con early stopping.
La seleccion del mejor checkpoint se hizo con base en la metrica F1 de validacion.
Hiperparametros principales
- learning_rate: 2e-05
- batch_size: 16
- num_train_epochs: 8
- weight_decay: 0.01
- warmup_ratio: 0.1
- early_stopping_patience: 2
- early_stopping_threshold: 0.001
Resultados
Validacion
- loss: 0.013790015131235123
- accuracy: 0.9981718464351006
- precision: 0.9981786173742297
- recall: 0.9981718464351006
- f1: 0.998171895325199
Test
- loss: 0.02344433404505253
- accuracy: 0.9928952042628775
- precision: 0.9929184199081565
- recall: 0.9928952042628775
- f1: 0.9928942615297829