| Apple industry is a labor-intensive industry.Picking and harvesting is a necessary step in apple production,however,apple picking is still mainly done by hand.In this paper,the research on the visual detection algorithm of apple picking robot is carried out to address the current problems of low manual picking efficiency and the low accuracy of the fruit detection algorithm of apple picking robot in complex environments(light changes,leaf shading,fruit stacking,etc.),resulting in inaccurate picking.Innovative work includes:(1)Research on conventional detection algorithms based on Histogram of Oriented Gradient(HOG)and Support Vector Machine(SVM).To address the problems of poor detection ability and low accuracy of traditional algorithms for fruit targets in dynamic environments,this paper optimizes the original HOG+SVM apple detection model on the basis of the original HOG.Firstly,the HOG features of the apple target are extracted.Secondly,the backbone network is added with Focus+Cross Stage Partial(CSP)cascade module,and Feature Pyramid Networks(FPN)is also introduced to obtain multi-scale feature maps and fuse them with HOG features.Finally,the SVM is trained to obtain the apple detection classifier.The experiments demonstrated that the improved algorithm effectively improved the detection accuracy of apples.(2)Research on deep learning detection algorithm based on YOLOv5(You Only Look Once v5).Compared with traditional methods,deep learning methods can automatically learn target features from large amounts of data.In this paper,,the YOLOv5 apple detection model is optimized.Firstly,a feature extraction layer is added to the backbone network and fused with a deep convolutional layer.Secondly,a smaller scale detection layer is added in the prediction part to detect small targets.Then,the Anchor calculation method is improved by changing the adaptive Anchor calculation method to 1-Io U(1-Intersection over Union).Finally,the attention mechanism module CA(Coordinate Attention)is added to improve the network feature representation.The experimental results show that the algorithm has a precision of 94.75%,a recall of 91.86%,and an average detection precision of 93.26%.In summary,two different detection algorithms are proposed in this paper,which are important for the improvement of the efficiency and the enhancement of the visual detection capability of apple picking robots in dynamic environments,and provide a reference for the application of robots in agricultural fields.Therefore,the research in this paper has practical value and extension significance. |