Instructions to use ozonetg/facialemotion-google-vit-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ozonetg/facialemotion-google-vit-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="ozonetg/facialemotion-google-vit-base-patch16-224") 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("ozonetg/facialemotion-google-vit-base-patch16-224") model = AutoModelForImageClassification.from_pretrained("ozonetg/facialemotion-google-vit-base-patch16-224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Returns facial emotion with about 91% accuracy based on facial human image.
Classification report:
precision recall f1-score support
sad 0.8394 0.8632 0.8511 3596
disgust 0.9909 1.0000 0.9954 3596
angry 0.9022 0.9035 0.9028 3595
neutral 0.8752 0.8626 0.8689 3595
fear 0.8788 0.8532 0.8658 3596
surprise 0.9476 0.9449 0.9463 3596
happy 0.9302 0.9372 0.9336 3596
accuracy 0.9092 25170
macro avg 0.9092 0.9092 0.9091 25170
weighted avg 0.9092 0.9092 0.9091 25170
- Downloads last month
- 13
Model tree for ozonetg/facialemotion-google-vit-base-patch16-224
Base model
google/vit-base-patch16-224-in21k