In order to solve the problem that the target detection algorithm is prone to leakage detection and insufficient detection accuracy in pedestrian detection in forest areas, a forest pedestrian target detection algorithm based on improved YOLOv8 is proposed. The C2f_DWRSeg module is used to replace the C2f module, and the number of initial convolutional channels is expanded so that the network can extract multi-scale features more efficiently. A reconstructed detector head is proposed to increase the complexity of the convolution layer during training, and a single branch structure is used in inference, so as to enrich the feature representation of the network and maintain efficient inference speed; add CGA, the convolution attention mechanism module, before feature fusion, to reduce the amount of calculation; use the Focaler-ShapeIoU loss function to replace the CIoU loss function to make up for the shortcomings of the boundary box regression method and further improve the detection ability. Experimental results show that compared with benchmark model, the improved algorithm mAP50 has increased by 2%, mAP50-95 has increased by 2.4%, and FPS has increased by 4.33%. It proves that the improved algorithm can be better applied to the task of pedestrian detection in forest areas.
式中:IoU表示传统的交并比;B代表预测框;代表真实框(ground truth box);表示考虑框的形状因素的距离项;和为预测框中心的坐标;和为真实框中心的坐标;为包含预测框和真实框的最小外接矩形的对角线长度;和分别为垂直和水平方向的加权系数;表示形状损失项; 和分别是宽和高的形状损失因子;和代表预测框的宽度和高度;和是真实框的宽度和高度;为固定的比例系数(通常取值为4)。
为了验证模型的性能,本试验选择精确率(Precision,Pre)、召回率(Recall,Rec)、平均精度(Average Precision,AP)、平均精确度(Mean Average Precision,mAP)、参数数量(Parameters)、计算量(GFLOPs)和每秒传输帧数(FPS)作为检测性能的评价指标。评价指标计算公式为
FENGR.Research on the application of intelligent forestry management technology in forestry resource management[J].Forestry Science and Technology Information,2024,56(2):137-139.
LIUY H, MAJ X, WANGY C, et al.Forest-pedestrian detection algorithm based on improved CornerNet-Lite[J].Journal of Forestry Engineering,2021,6(4):153-158.
XIAOW Y, WANGJ, LIW S.Research on YOLOv5 lightweight algorithm for pine tree strain identification[J].Forest Engineering,2023,39(4):126-133.
[9]
JUANT, DIANA M CÓRDOVAE, ROMERO-GONZÁ- LEZJ A.A comprehensive review of YOLO architectures in computer vision: from YOLOv1 to YOLOv8 and YOLO-NAS[J].Machine Learning and Knowledge Extraction,2023,5(4):1680-1716.
[10]
ZHANGW, FUC, XIEH, et al.Global context aware RCNN for object detection[J].Neural Computing and Applications,2021,33(18):1-13.
LIUS, QIL, QINH,et al.Path aggregation network for instance segmentation[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City,UT,USA,2018:8759-8768.
[19]
WEIH, LIUX, XUS,et al.DWRSeg: rethinking efficient acquisition of multi-scale contextual information for real-time semantic segmentation[J].arXiv preprint arXiv:2022.
[20]
DINGX, ZHANGX, HANJ,et al.Diverse branch block: building a convolution as an inception-like unit[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition.Nashville,TN,USA,2021:10886-10895.
[21]
ZHANGL, ZOUF, WANGX,et al.Improved algorithm for YOLOX-S object detection based on diverse branch block(DBB)[C]//2022 6th International Conference on Electronic Information Technology and Computer Engineering.2022:1624-1630.
HUANGH X, LIY X, ZHANGZ Y.A NIR prediction model for forest soil carbon content based on ResNet[J].Forest Engineering,2023,39(6):164-171.
[24]
LIUX, PENGH, ZHENGN,et al.Efficientvit: memory efficient vision transformer with cascaded group attention[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition.Vancouver,B,Canada,2023:14420-14430.
[25]
DUS, ZHANGB, ZHANGP,et al.An improved bounding box regression loss function based on CIOU loss for multi-scale object detection[C]//2021 IEEE 2nd International Conference on Pattern Recognition and Machine Learning (PRML),Chengdu,China,2021:92-98.
[26]
ZHANGH, ZHANGS.Shape-IoU:More accurate metric considering bounding box shape and scale[J].arXiv preprint arXiv:2023.
[27]
ZHANGH, ZHANGS.Focaler-IoU: more focused intersection over union loss[J].arXiv preprint arXiv:2401. 10525,2024.