室外场景对于人们的日常出行至关重要.为了提高室外目标检测算法的实时性和准确性,采用YOLOv4 算法作为基础算法,对其进行改进.首先将Focus模块插入到CSPDarknet主干网络中,其次在YOLOv4 算法网络结构中使用空间锯齿空洞卷积结构加强模型对图像特征细节的提取,以替代原网络中的空间金字塔池化结构;对颈部进行了网络裁剪,能够达到减小网络权重的目的;最后为加强模型对于深、浅层特征的融合能力,采用双向特征金字塔结构,从而提高模型在浅层预测方面及深层定位方面的能力.实验表明,在文中构建的室外场景数据集上,改进后的YOLOv4 算法的mAP 达到 87.9%,模型大小也减少了30MB,相比原YOLOv4 算法检测在检测精度提升的同时速度也有明显提高.
Outdoor scenes are crucial to People's Daily travel.In order to improve the real-time and accuracy of the outdoor target detection algorithm,the YOLOv4 algorithm is adopted as the basic algorithm to improve it.Firstly,the Focus module is inserted into the BACKBONE network of SPDarknet.Secondly,the spatial sawtooth cavity convo-lution structure is used in the network structure of the YOLOv4 algorithm to enhance the extraction of image feature details from the model,which replaces the spatial pyramid pooling structure in the original network.The neck network is clipped to reduce the weight of the network.Finally,in order to enhance the fusion ability of deep and shallow fea-tures of the model,a bidirectional feature pyramid structure is adopted to improve the ability of shallow prediction and deep positioning of the model.Experiments show that on the outdoor scene data set constructed in this paper,the mAP of the improved YOLOv4 algorithm reaches 87.9%,and the model size is reduced by 30MB.Compared with the orig-inal YOLOv4 algorithm,the detection accuracy is improved and the speed is also significantly improved.