KPGBeltNet: in-vehicle seatbelt detection algorithm based on human keypoint-guided sampling and local–global attention
摘要
Failure to wear seatbelts remains one of the primary factors contributing to severe injuries and fatalities in traffic accidents, making robust in-vehicle seatbelt detection important for intelligent cockpit safety monitoring. Existing vision-based methods are predominantly adapted from general object detection frameworks and may struggle when seatbelts are slender, low-contrast, or visually similar to clothing and seat backgrounds. To improve seatbelt wearing-status recognition under such complex in-vehicle conditions, this paper proposes KPGBeltNet, a seatbelt detection algorithm that integrates human keypoint priors with geometric feature modeling. The proposed method adopts a two-stage detection strategy: firstly, YOLOv11-pose is employed to extract human keypoints, including shoulders and hips, enabling more precise and pose-robust region of interest localization than conventional whole-body bounding box detection; secondly, a block diagonal sampling strategy is introduced to extract a sequence of overlapping local image patches along the shoulder-to-hip direction, thereby capturing the geometric distribution of seatbelts while reducing irrelevant background interference. A local–global attention mechanism is then designed to model the interaction between global region features and local patch features, injecting contextual information into local representations to enhance discriminative capability. Finally, a Bidirectional GRU (Bi-GRU) network is employed to model dependencies among the sampled patch sequence and generate comprehensive feature representations for classification. Experimental results on a self-constructed in-vehicle monitoring dataset demonstrate that KPGBeltNet achieves superior detection accuracy and robustness under complex conditions, including illumination variation and passenger pose changes, providing effective technical support for intelligent cockpit safety monitoring systems. Code and datasets for this paper are available at https://github.com/tjc609/KPGBeltNet.