Instructions to use dima806/smoker_image_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dima806/smoker_image_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="dima806/smoker_image_classification") 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/smoker_image_classification") model = AutoModelForImageClassification.from_pretrained("dima806/smoker_image_classification") - Notebooks
- Google Colab
- Kaggle
| license: apache-2.0 | |
| metrics: | |
| - accuracy | |
| - f1 | |
| base_model: | |
| - google/vit-base-patch16-224-in21k | |
| Returns whether the person is a smoker based on image with about 97% accuracy. | |
| See https://www.kaggle.com/code/dima806/smoker-image-detection-vit for more details. | |
| ``` | |
| Classification report: | |
| precision recall f1-score support | |
| notsmoking 0.9907 0.9464 0.9680 112 | |
| smoking 0.9487 0.9911 0.9694 112 | |
| accuracy 0.9688 224 | |
| macro avg 0.9697 0.9688 0.9687 224 | |
| weighted avg 0.9697 0.9688 0.9687 224 | |
| ``` |