Smart Two-Wheeler Rider Safety System: Helmet Detection and Speed Control using Edge AI
Motorcycle accidents caused by helmet non-compliance remain a major public safety concern, particularly in densely populated urban environments where manual traffic enforcement is insufficient. This paper presents a distributed Edge AI-based rider safety framework capable of real-time helmet detection and automatic speed restriction. The proposed architecture separates visual inference and motor actuation into two independent computational nodes using a Raspberry Pi 5 and RP2040 microcontroller respectively, thereby minimizing control latency and improving deterministic response reliability. An optimized YOLO11s object detection model was trained using a custom dataset containing helmet, no-helmet, and adversarial edge-case samples such as caps and partially occluded faces. The trained model was quantized using the NCNN framework for efficient ARM-based edge deployment. Experimental evaluation demonstrated a best mAP@50 of 0.9034, precision of 0.9248, and average inference latency of approximately 45 ms, corresponding to nearly 22 FPS on Raspberry Pi 5 hardware. To reduce false-positive activations, a five-frame sequential validation mechanism and hysteresis-based PWM throttle regulation strategy were implemented. The system successfully performed real-time throttle limitationduring no-helmet detection scenarios while maintaining stable unrestricted operation for compliant riders. The proposedframework demonstrates the feasibility of combining Edge AI perception with hardware-level safety intervention for intelligent two-wheeler rider protection systems.