Instructions to use dima806/face_obstruction_image_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/face_obstruction_image_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/face_obstruction_image_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("dima806/face_obstruction_image_detection") model = AutoModelForImageClassification.from_pretrained("dima806/face_obstruction_image_detection") - Inference
- Notebooks
- Google Colab
- Kaggle
Returns face obstruction type given a facial image with about 91% accuracy.
See https://www.kaggle.com/code/dima806/face-obstruction-image-detection-vit for more details.
Classification report:
precision recall f1-score support
sunglasses 0.9974 0.9985 0.9980 3422
glasses 0.9896 0.9968 0.9932 3422
other 0.7198 0.7613 0.7400 3422
mask 0.9971 0.9985 0.9978 3422
hand 0.7505 0.7086 0.7290 3422
none 0.9976 0.9860 0.9918 3422
accuracy 0.9083 20532
macro avg 0.9087 0.9083 0.9083 20532
weighted avg 0.9087 0.9083 0.9083 20532
- Downloads last month
- 3,391
Model tree for dima806/face_obstruction_image_detection
Base model
google/vit-base-patch16-224-in21k