Instructions to use dima806/facial_emotions_image_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/facial_emotions_image_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/facial_emotions_image_detection") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("dima806/facial_emotions_image_detection") model = AutoModelForImageClassification.from_pretrained("dima806/facial_emotions_image_detection", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,24 @@ metrics:
|
|
| 4 |
- accuracy
|
| 5 |
- f1
|
| 6 |
---
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- accuracy
|
| 5 |
- f1
|
| 6 |
---
|
| 7 |
+
Returns facial emotion based on facial human image.
|
| 8 |
+
|
| 9 |
+
See https://www.kaggle.com/code/dima806/facial-emotions-image-detection-vit for more details.
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
Classification report:
|
| 13 |
+
|
| 14 |
+
precision recall f1-score support
|
| 15 |
+
|
| 16 |
+
sad 0.7948 0.7948 0.7948 1798
|
| 17 |
+
disgust 0.9923 0.9983 0.9953 1798
|
| 18 |
+
angry 0.8390 0.8576 0.8482 1798
|
| 19 |
+
neutral 0.8141 0.8381 0.8259 1797
|
| 20 |
+
fear 0.8134 0.7953 0.8043 1798
|
| 21 |
+
surprise 0.9421 0.9227 0.9323 1798
|
| 22 |
+
happy 0.9272 0.9132 0.9201 1798
|
| 23 |
+
|
| 24 |
+
accuracy 0.8743 12585
|
| 25 |
+
macro avg 0.8747 0.8743 0.8744 12585
|
| 26 |
+
weighted avg 0.8747 0.8743 0.8744 12585
|
| 27 |
+
```
|