| At present,sugarcane planting machines all adopt blind planting mode,lacking the function of detecting the position and posture of sugarcane buds,which can not meet the planting agronomic requirements of sugarcane seeds lying flat and sugarcane buds facing both sides of the ditch wall.The existing sugarcane bud detection technology only judges the position of sugarcane buds on the image plane,but can’t judge the orientation of sugarcane buds,which hinders the direction adjustment process of sugarcane seeds and makes it difficult to realize intelligent directional sowing of sugarcane.Therefore,based on the improved target detection algorithm,this paper simultaneously identifies sugarcane seed nodes and sugarcane buds,puts forward a method for judging sugarcane bud position and orientation,establishes a mathematical model for judging sugarcane bud position and orientation,designs a system for judging sugarcane bud position and orientation,develops a system software for judging sugarcane bud position and orientation,builds a prototype of sugarcane bud position and orientation orientation orientation based on raspberry pie,and carries out verification tests on sugarcane seed transportation,sugarcane bud position and orientation detection and sugarcane bud orientation adjustment functions.The main research contents and conclusions are as follows:(1)Make a deep learning image data set.In view of the lack of "double-bud-segment" sugarcane seed database,200 double-bud sugarcane seeds were screened out,and the sugarcane bud positions were divided into 7 categories,and 1,400 sugarcane seed images were obtained.After image preprocessing,image labeling and data amplification,5,880 sample images(5,600 in training set,140 in testing set and 140 in verification set)were made.(2)Improved YOLOv5 sugarcane bud detection algorithm.Aiming at the problem that the current target detection algorithm is not accurate in detecting small target sugarcane buds,the multi-scale prediction structure is added,and the anchor box of YOLOv5 is optimized by K-means algorithm,so as to further improve the detection accuracy of the model for small target sugarcane buds.Aiming at the problem that leaf scars,similar characteristic textures between sugarcane buds and stem nodes are wrongly detected as sugarcane buds,an algorithm combining YOLOv5 with attention mechanism is proposed to suppress useless information and obtain more characteristic target information.The improved YOLOv5 target detection model is trained and tested by combining with the self-built sugarcane seed data set.The results show that the detection accuracy is 93.4%,the m AP is 93.8%,the model size is only 28.4MB,and the FPS is up to 53,which can provide good conditions for the subsequent establishment of a mathematical model for judging sugarcane bud position and posture.(3)Method for determine that position and posture of sugarcane buds.In order to solve the problem of determining the orientation angle of sugarcane buds after target detection algorithm recognition,four criteria for selecting the preselection box are put forward,and the azimuth angle of sugarcane buds is defined.According to the characteristic pixel coordinates,the mathematical model of sugarcane bud position and posture is established,the method of selecting the universal radius Oh of sugarcane seeds and the judgment index of the orientation error angle of sugarcane buds are determined,and the orientation angle of sugarcane buds is determined.(4)Platform construction and test.By deploying raspberry pie environment and configuring NCS2 reasoning acceleration,the trained target detection model and the constructed mathematical model of sugarcane bud position and posture are transplanted to the terminal raspberry pie on the PC side,and the function of raspberry pie image detection and control is realized.The prototype test platform of sugarcane bud position and orientation adjustment device was built,and the software of sugarcane bud position and orientation determination system was developed.The prototype test results showed that the success rate of sugarcane bud position and orientation adjustment reached 86.7%,and the functional modules of sugarcane seed transportation,sugarcane bud detection and sugarcane bud position and orientation adjustment were coordinated,and the work was stable and reliable. |