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:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("vivekvar/helmet-v4") 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
- 12