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
Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,19 @@ metrics:
|
|
| 4 |
- accuracy
|
| 5 |
- f1
|
| 6 |
---
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- accuracy
|
| 5 |
- f1
|
| 6 |
---
|
| 7 |
+
Returns whether the person is a smoker based on image.
|
| 8 |
+
|
| 9 |
+
See https://www.kaggle.com/code/dima806/smoker-image-detection-vit for more details.
|
| 10 |
+
|
| 11 |
+
```
|
| 12 |
+
Classification report:
|
| 13 |
+
|
| 14 |
+
precision recall f1-score support
|
| 15 |
+
|
| 16 |
+
notsmoking 0.9907 0.9464 0.9680 112
|
| 17 |
+
smoking 0.9487 0.9911 0.9694 112
|
| 18 |
+
|
| 19 |
+
accuracy 0.9688 224
|
| 20 |
+
macro avg 0.9697 0.9688 0.9687 224
|
| 21 |
+
weighted avg 0.9697 0.9688 0.9687 224
|
| 22 |
+
```
|