摘要
Abstract
Objective To address the problems of low detection accuracy,high model parameter count,and high computational cost in existing apple detection in orchard environments,an improved orchard apple detection algorithm based on YOLOv5s is proposed.Methods First,Soft-NMS was used in the YOLOv5s algorithm to replace the original NMS of the model,and the way the original model processed prediction boxes was changed,so as to reduce false detections and missed detections caused by the overlapping and occlusion of apples in the orchard environment and improve the detection accuracy.Then,OTA was used to optimize the label assignment of the original model.The label assignment was regarded as an optimal transport problem,and the context information was fully utilized to reduce the number of ambiguous boxes so as to better handle the problem of dense apple occlusion and further improve the model's detection performance for orchard apples.Finally,the convolution module in the backbone network was replaced with FasterNet blocks,which served as a new feature extraction network.This replacement reduced the parameter count and the computational cost of the model,thereby achieving a lightweight model.Results The experimental results showed that on the orchard apple dataset,compared with the original model,the mAP of the improved algorithm model increased by 2.8%,and the parameter count and the computational cost decreased by 21%and 29%,respectively.Compared with other mainstream detection models in the same series,the improved model had higher detection accuracy,fewer parameters,and lower computational cost.Conclusion The improved model is more suitable for apple detection in orchard scenarios and can be used as a solution for reference and application in related fields.关键词
苹果识别/YOLOv5s/非极大值抑制算法/最优传输分配/FasterNetKey words
apple recognition/YOLOv5s/non-maximum suppression algorithm/optimal transport assignment/FasterNet分类
农业科技