Abstract:Addressing the issue of false negatives and positives in non-motor vehicle irregular driving behavior detection with the current detection algorithm, an improved target detection algorithm, YOLO-CSSM, was proposed based on YOLOv8. The Backbone and Neck were enhanced with an SPD-Conv network module, which improved the model′s ability to learn from small targets and extract features under complex backgrounds. Subsequently, DCNv2 and SegNext Attention modules were integrated into the Backbone and Neck networks, respectively, to emphasize important feature information of non-motor vehicles and drivers, enhancing the model′s feature fusion capability. The MPDIoU was improved using the concept of the WIoU loss function, replacing the original CIoU loss function with Wise-MPDIoU to mitigate the imbalance between positive and negative samples. Validated on a self-built dataset of non-motor vehicle irregular driving behaviors, the improved YOLOv8 algorithm demonstrated precision, recall and mean average precision (mAP@0.5) of 89.4%, 90.0% and 93.6%, respectively, showing improvements of 3.3%, 5.4% and 4.5% over the traditional YOLOv8 algorithm, achieving better detection accuracy and effectiveness.And Based on the non-motorized vehicle violation detection algorithm, a non-motorized vehicle violation recognition and detection system was designed and developed using PyQT5.