Object Detection
ultralytics
ONNX
Safetensors
helmet-detection
yolo
image-classification
cctv
anpr
india
Instructions to use vivekvar/helmet-v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use vivekvar/helmet-v5 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-v5") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
| import React from 'react' | |
| export default function LiveToggle({ current, onSwitch, recordedMap }) { | |
| const isLive = current.mode === 'live' | |
| const hasRec = current.cam_id && recordedMap[current.cam_id] | |
| return ( | |
| <div className="flex items-center gap-2"> | |
| <button | |
| disabled={!current.cam_id || !hasRec} | |
| onClick={() => onSwitch(current.cam_id, 'recorded')} | |
| className={`px-3 py-1.5 rounded text-[12px] uppercase tracking-wider border | |
| ${!isLive ? 'bg-line text-text border-line' : 'bg-bg text-muted border-line hover:text-text'} | |
| disabled:opacity-30 disabled:cursor-not-allowed`} | |
| >Recorded</button> | |
| <button | |
| disabled={!current.cam_id} | |
| onClick={() => onSwitch(current.cam_id, 'live')} | |
| className={`px-3 py-1.5 rounded text-[12px] uppercase tracking-wider border | |
| flex items-center gap-1.5 | |
| ${isLive ? 'bg-warn/20 text-warn border-warn' : 'bg-bg text-muted border-line hover:text-text'} | |
| disabled:opacity-30 disabled:cursor-not-allowed`} | |
| > | |
| {isLive && <span className="mark-dot bg-warn animate-pulse" />} | |
| Live | |
| </button> | |
| </div> | |
| ) | |
| } | |