How to use from the
Use from the
Transformers library
# 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")
Quick Links

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
Downloads last month
113
Safetensors
Model size
85.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dima806/smoker_image_classification

Finetuned
(2536)
this model