Object Detection
ultralytics
ONNX
English
computer-vision
yolo
yolov11
helmet-detection
safety
traffic-monitoring
cctv
Instructions to use Smolry/Helmet-classifer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Smolry/Helmet-classifer with ultralytics:
from ultralytics import YOLOvv11 model = YOLOvv11.from_pretrained("Smolry/Helmet-classifer") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
metrics:
|
|
@@ -8,9 +8,229 @@ metrics:
|
|
| 8 |
- f1
|
| 9 |
- recall
|
| 10 |
tags:
|
|
|
|
| 11 |
- computer-vision
|
|
|
|
|
|
|
| 12 |
- helmet-detection
|
| 13 |
-
-
|
| 14 |
-
-
|
|
|
|
| 15 |
pipeline_tag: object-detection
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- cctv
|
| 19 |
pipeline_tag: object-detection
|
| 20 |
+
library_name: ultralytics
|
| 21 |
+
base_model:
|
| 22 |
+
- Ultralytics/YOLO11
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
# Helmet and No-Helmet Detection — YOLO11s
|
| 26 |
+
|
| 27 |
+
A YOLO11s object detection model trained for detecting **helmets** and
|
| 28 |
+
**no-helmet instances** in images.
|
| 29 |
+
|
| 30 |
+
The training dataset was obtained from Roboflow and was originally
|
| 31 |
+
created by another Roboflow user. The dataset was forked and used for
|
| 32 |
+
training this model. Dataset attribution and licensing information are
|
| 33 |
+
provided below.
|
| 34 |
+
|
| 35 |
+
## Model Description
|
| 36 |
+
|
| 37 |
+
This model is a custom-trained **Ultralytics YOLO11s** object detection
|
| 38 |
+
model.
|
| 39 |
+
|
| 40 |
+
The model predicts two classes:
|
| 41 |
+
|
| 42 |
+
| Class ID | Class |
|
| 43 |
+
|----------|-------|
|
| 44 |
+
| 0 | helmet |
|
| 45 |
+
| 1 | no-helmet |
|
| 46 |
+
|
| 47 |
+
The model accepts images at a nominal resolution of **640 × 640 pixels**
|
| 48 |
+
and produces bounding-box detections for the two classes.
|
| 49 |
+
|
| 50 |
+
### Model Architecture
|
| 51 |
+
|
| 52 |
+
- Architecture: YOLO11s
|
| 53 |
+
- Task: Object Detection
|
| 54 |
+
- Parameters: 9,428,566
|
| 55 |
+
- Layers: 181
|
| 56 |
+
- GFLOPs: 21.6
|
| 57 |
+
- Input image size: 640 × 640
|
| 58 |
+
- Number of classes: 2
|
| 59 |
+
|
| 60 |
+
The checkpoint identifies the architecture as YOLO11s and reports
|
| 61 |
+
181 layers, 9,428,566 parameters, and 21.6 GFLOPs.
|
| 62 |
+
|
| 63 |
+
## Intended Use
|
| 64 |
+
|
| 65 |
+
This model is intended for research, experimentation, and computer
|
| 66 |
+
vision applications involving helmet compliance detection.
|
| 67 |
+
|
| 68 |
+
Potential applications include:
|
| 69 |
+
|
| 70 |
+
- Helmet detection in CCTV footage
|
| 71 |
+
- Road safety monitoring
|
| 72 |
+
- Traffic violation detection
|
| 73 |
+
- Industrial safety monitoring
|
| 74 |
+
- Motorcycle helmet compliance analysis
|
| 75 |
+
- Computer vision research
|
| 76 |
+
|
| 77 |
+
The model is particularly intended as a component of a larger
|
| 78 |
+
computer vision pipeline rather than as a complete traffic-violation
|
| 79 |
+
system.
|
| 80 |
+
|
| 81 |
+
For example:
|
| 82 |
+
```text
|
| 83 |
+
CCTV Image
|
| 84 |
+
|
|
| 85 |
+
v
|
| 86 |
+
Helmet Detector
|
| 87 |
+
|
|
| 88 |
+
+---- helmet
|
| 89 |
+
|
|
| 90 |
+
+---- no-helmet
|
| 91 |
+
|
|
| 92 |
+
v
|
| 93 |
+
Person / Vehicle Association
|
| 94 |
+
|
|
| 95 |
+
v
|
| 96 |
+
Number Plate Detection
|
| 97 |
+
|
|
| 98 |
+
v
|
| 99 |
+
Violation Processing
|
| 100 |
+
```
|
| 101 |
+
This model itself only performs helmet/no-helmet object detection.
|
| 102 |
+
|
| 103 |
+
## Classes
|
| 104 |
+
|
| 105 |
+
The class mapping stored in the trained checkpoint is:
|
| 106 |
+
|
| 107 |
+
0: helmet
|
| 108 |
+
1: no-helmet
|
| 109 |
+
|
| 110 |
+
The model should therefore be interpreted using this class mapping
|
| 111 |
+
when processing its predictions.
|
| 112 |
+
|
| 113 |
+
## Training
|
| 114 |
+
|
| 115 |
+
The model was trained using a dataset exported from Roboflow.
|
| 116 |
+
|
| 117 |
+
The original dataset was not created by the author of this model.
|
| 118 |
+
Instead, the dataset was forked from an existing Roboflow dataset and
|
| 119 |
+
subsequently used for training.
|
| 120 |
+
|
| 121 |
+
The checkpoint stores the following training configuration.
|
| 122 |
+
|
| 123 |
+
### Training Configuration
|
| 124 |
+
|
| 125 |
+
| Parameter | Value |
|
| 126 |
+
|-----------|-------|
|
| 127 |
+
| Task | Detection |
|
| 128 |
+
| Image size | 640 |
|
| 129 |
+
| Batch size | 16 |
|
| 130 |
+
| Epochs configured | 100 |
|
| 131 |
+
| Pretrained | True |
|
| 132 |
+
| Optimizer | Auto |
|
| 133 |
+
| Workers | 8 |
|
| 134 |
+
| AMP | True |
|
| 135 |
+
| Seed | 0 |
|
| 136 |
+
| Deterministic | True |
|
| 137 |
+
| Patience | 10 |
|
| 138 |
+
| Validation | True |
|
| 139 |
+
| Validation split | val |
|
| 140 |
+
|
| 141 |
+
The checkpoint was produced using Ultralytics version 8.3.233.
|
| 142 |
+
|
| 143 |
+
The stored checkpoint metadata identifies the model as an
|
| 144 |
+
`ultralytics.nn.tasks.DetectionModel`.
|
| 145 |
+
|
| 146 |
+
## Data Augmentation
|
| 147 |
+
|
| 148 |
+
The stored training configuration includes the following
|
| 149 |
+
augmentation settings:
|
| 150 |
+
|
| 151 |
+
| Augmentation | Value |
|
| 152 |
+
|--------------|-------|
|
| 153 |
+
| Mosaic | 1.0 |
|
| 154 |
+
| MixUp | 0.12 |
|
| 155 |
+
| Copy-Paste | 0.05 |
|
| 156 |
+
| Horizontal Flip | 0.5 |
|
| 157 |
+
| Scale | 0.6 |
|
| 158 |
+
| Rotation | 4.0 |
|
| 159 |
+
| Translation | 0.1 |
|
| 160 |
+
| Shear | 1.0 |
|
| 161 |
+
| Perspective | 0.0004 |
|
| 162 |
+
|
| 163 |
+
These values are reported from the training configuration stored
|
| 164 |
+
inside the model checkpoint.
|
| 165 |
+
|
| 166 |
+
## Dataset
|
| 167 |
+
|
| 168 |
+
### Original Dataset
|
| 169 |
+
|
| 170 |
+
The training dataset was obtained from Roboflow.
|
| 171 |
+
|
| 172 |
+
**Original dataset:**
|
| 173 |
+
[-00000)](https://app.roboflow.com/smolry/helmet-detection_yolov8-8jenr/1/images)
|
| 174 |
+
|
| 175 |
+
**Original dataset author:**
|
| 176 |
+
[](https://app.roboflow.com/smolry)
|
| 177 |
+
|
| 178 |
+
**Roboflow project:**
|
| 179 |
+
[](https://app.roboflow.com/smolry/helmet-detection_yolov8-8jenr)
|
| 180 |
+
|
| 181 |
+
**Dataset version:**
|
| 182 |
+
[v1 2026-01-25 2:39am]
|
| 183 |
+
|
| 184 |
+
The dataset was forked from the original Roboflow project and used as
|
| 185 |
+
the basis for training this model.
|
| 186 |
+
|
| 187 |
+
### Dataset Attribution
|
| 188 |
+
|
| 189 |
+
This model does not claim ownership of the original dataset.
|
| 190 |
+
|
| 191 |
+
The dataset and its annotations remain subject to the original
|
| 192 |
+
dataset's license and attribution requirements.
|
| 193 |
+
|
| 194 |
+
Users of this model should consult the original dataset page and
|
| 195 |
+
license before redistributing the dataset, annotations, or derived
|
| 196 |
+
datasets.
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
## Data Preprocessing
|
| 200 |
+
|
| 201 |
+
The model was trained using the YOLO-compatible dataset configuration
|
| 202 |
+
exported from Roboflow.
|
| 203 |
+
|
| 204 |
+
The checkpoint references the following dataset configuration:
|
| 205 |
+
|
| 206 |
+
/content/Helmet-and-Non-Helmet-Detection--2/data.yaml
|
| 207 |
+
|
| 208 |
+
The original training environment was hosted in Google Colab /
|
| 209 |
+
Google Drive according to paths recorded in the checkpoint.
|
| 210 |
+
|
| 211 |
+
## Model Input
|
| 212 |
+
|
| 213 |
+
The model expects an image input and was trained using:
|
| 214 |
+
|
| 215 |
+
640 × 640
|
| 216 |
+
|
| 217 |
+
Ultralytics handles the necessary image preprocessing during normal
|
| 218 |
+
inference.
|
| 219 |
+
|
| 220 |
+
## Inference
|
| 221 |
+
|
| 222 |
+
Install Ultralytics:
|
| 223 |
+
|
| 224 |
+
pip install ultralytics
|
| 225 |
+
|
| 226 |
+
Load the model:
|
| 227 |
+
|
| 228 |
+
```python
|
| 229 |
+
from ultralytics import YOLO
|
| 230 |
+
|
| 231 |
+
model = YOLO("best.pt")
|
| 232 |
+
|
| 233 |
+
results = model("image.jpg", imgsz=640)
|
| 234 |
+
|
| 235 |
+
for result in results:
|
| 236 |
+
result.show()
|