LanceaKing/asvspoof2019
Updated • 283 • 4
How to use MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection")
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("MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection")
model = AutoModelForImageClassification.from_pretrained("MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection")
model = AutoModelForImageClassification.from_pretrained("MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection")This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the imagefolder dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.007 | 1.0 | 3173 | 0.0108 | 0.9972 | 0.9984 | 0.9969 | 1.0 |
| 0.0015 | 2.0 | 6346 | 0.0022 | 0.9997 | 0.9998 | 0.9999 | 0.9998 |
| 0.0 | 3.0 | 9519 | 0.0025 | 0.9996 | 0.9998 | 0.9997 | 0.9999 |
Base model
google/vit-base-patch16-224-in21k
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="MattyB95/VIT-ASVspoof2019-Mel_Spectrogram-Synthetic-Voice-Detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")