Instructions to use vivekvar/helmet-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use vivekvar/helmet-v4 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("vivekvar/helmet-v4", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Helmet v4 β single-stage YOLO helmet detector
Predecessor to vivekvar/helmet-v5. Single YOLO model trained directly on helmet/no-helmet crops from Andhra Pradesh RTGS CCTV.
Files
best.ptβ best YOLO checkpoint from trainingtrain_helmet_v4.pyβ training scripttraining_log.json,train.logβ metricscrops/β training crop dataset (withlabels.dbSQLite)
Why superseded
v4 was a single-stage detector β the model had to simultaneously find the rider and classify helmet presence. This led to:
- Wrong-body-part boxing on multi-bike frames
- Helmets misclassified as no-helmet on profile / back views
- Accuracy plateau at F1 β 0.53
v5 splits this into detect (YOLO fine-tuned) β localize driver head (pose) β classify (EfficientNet-B0), hitting F1 = 0.864 on head crops and mAP50 = 0.979 on detection.
- Downloads last month
- 18