The swift and precise detection of vehicles plays a significant role in intelligent transportation systems. Current vehicle detection algorithms encounter challenges of high computational complexity, low detection rate, and limited feasibility on mobile devices. To address these issues, this paper proposes a lightweight vehicle detection algorithm based on YOLOv7-tiny (You Only Look Once version seven) called Ghost-YOLOv7. The width of model is scaled to 0.5 and the standard convolution of the backbone network is replaced with Ghost convolution to achieve a lighter network and improve the detection speed; then a self-designed Ghost bi-directional feature pyramid network (Ghost-BiFPN) is embedded into the neck network to enhance feature extraction capability of the algorithm and enriches semantic information; and a Ghost Decouoled Head (GDH) is employed for accurate prediction of vehicle location and species; finally, a coordinate attention mechanism is introduced into the output layer to suppress environmental interference. The WIoU loss function is employed to further enhance the detection accuracy. Ablation experiments results on the PASCAL VOC dataset demonstrate that Ghost-YOLOv7 outperforms the original YOLOv7-tiny model. It achieving a 29.8% reduction in computation, 37.3% reduction in the number of parameters, 35.1% reduction in model weights, 1.1% higher mean average precision (mAP), the detection speed is higher 27FPS compared with the original algorithm. Ghost-YOLOv7 was also compared on KITTI and BIT-vehicle datasets as well, and the results show that this algorithm has the overall best performance.
翻译:车辆的快速精确检测在智能交通系统中具有重要意义。当前车辆检测算法面临计算复杂度高、检测率低以及移动设备适配性差等挑战。为解决上述问题,本文提出一种基于YOLOv7-tiny(You Only Look Once第七版)的轻量化车辆检测算法Ghost-YOLOv7。该算法将模型宽度缩放至0.5,并将主干网络的标准卷积替换为Ghost卷积以实现模型轻量化、提升检测速度;随后在颈部网络中嵌入自设计的Ghost双向特征金字塔网络(Ghost-BiFPN)以增强算法特征提取能力、丰富语义信息;采用Ghost解耦头(GDH)实现车辆位置与类别的精确预测;最后在输出层引入坐标注意力机制抑制环境干扰。通过采用WIoU损失函数进一步提升检测精度。在PASCAL VOC数据集上的消融实验结果表明,Ghost-YOLOv7相较于原始YOLOv7-tiny模型性能更优:计算量降低29.8%、参数量减少37.3%、模型权重缩减35.1%、平均精度均值(mAP)提升1.1%,检测速度较原始算法提高27FPS。同时在KITTI与BIT-vehicle数据集上的对比实验证明,该算法具有整体最优性能。