Instructions to use Beehzod/best_smoke_cigarette-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Beehzod/best_smoke_cigarette-detection with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("Beehzod/best_smoke_cigarette-detection", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Beehzod/best_smoke_cigarette-detection: direct link, hf CLI and curl.
- Browser
- Download file 1.77 kB
-
https://huggingface.co/Beehzod/best_smoke_cigarette-detection/resolve/main/README.md
- Command line
-
hf download hf://Beehzod/best_smoke_cigarette-detection/README.md
-
curl -L -o README.md https://huggingface.co/Beehzod/best_smoke_cigarette-detection/resolve/main/README.md
1.77 kB
metadata
license: mit
library_name: ultralytics
pipeline_tag: object-detection
base_model: Ultralytics/YOLO11
tags:
- yolo
- smoking-detection
- cigarette-detection
- object-detection
- ultralytics
model-index:
- name: best_smoke_cigarette-detection
results:
- task:
type: object-detection
metrics:
- name: mAP50
type: mAP
value: 0.7898
- name: mAP50-95
type: mAP
value: 0.4617
- name: precision
type: precision
value: 0.8199
- name: recall
type: recall
value: 0.765
best_smoke_cigarette-detection
Fine-tuned from the official Ultralytics YOLO11m checkpoint (yolo11m.pt) using Ultralytics.
Classes
cigarette
Dataset
- Source: richie-lab/smoking-tasfx (version 2)
- Images: 12046 train / 318 valid / 122 test
- Check the dataset page above for its license -- not necessarily the same as this repo's
licensefield, which reflects the base model's license.
Training
| Parameter | Value |
|---|---|
| Base checkpoint | yolo11m.pt |
| Epochs | 100 |
| Image size | 640 |
| Batch size | 17 |
| Optimizer | AdamW |
| Initial LR (lr0) | 0.001 |
| Patience (early stop) | 20 |
Results (held-out validation split)
| Metric | Value |
|---|---|
| mAP50 | 0.7898 |
| mAP50-95 | 0.4617 |
| Precision | 0.8199 |
| Recall | 0.7650 |
Usage
from ultralytics import YOLO
model = YOLO("best.pt")
results = model.predict("image.jpg", conf=0.25)
for r in results:
for box in r.boxes:
print(model.names[int(box.cls[0])], float(box.conf[0]))