CN-117115429-B - Sugarcane tail breaking point target detection method based on lightweight YOLOv7
Abstract
The invention discloses a sugarcane tail break point target detection method based on light YOLOv, which comprises the following steps of S1 sugarcane tail break point detection data set construction, S2 sugarcane tail break point detection data set processing, S3YOLOv7 detection algorithm improvement, S4 post-improvement YOLOv7 detection algorithm training and S4 sugarcane tail break point detection. The invention can solve the technical problem that in the prior art, the mechanized harvesting of the whole sugarcane can not accurately identify the proper sugarcane tail breaking point, and can enable YOLOv to be applied to a sugarcane harvester, so that the sugarcane harvester can accurately identify the proper tail breaking point, harvest the whole sugarcane, reduce the impurity content of the whole sugarcane harvesting, improve the working efficiency and increase the benefit.
Inventors
- ZHU CHANGWEI
- HUANG RONGXUE
- ZHOU JINGHUI
- Lv Shunmin
- QIN YUSONG
Assignees
- 桂林理工大学南宁分校
Dates
- Publication Date
- 20260508
- Application Date
- 20230830
Claims (6)
- 1. The sugarcane tail breaking point target detection method based on the light YOLOv is characterized by comprising the following steps of: s1, constructing a sugarcane tail break point detection data set; S2, processing a sugarcane tail break point detection data set; improvement of S3 YOLOv detection algorithm; S4, training a YOLOv detection algorithm after improvement; s5, detecting tail breaking points of sugarcane; In the S3, the improvement method is that a Mobilenetv network structure is adopted to carry out light weight improvement on the YOLOv detection algorithm; Analyzing a network structure of YOLOv7, wherein the network structure of a YOLOv detection algorithm mainly comprises Input, backbone and Head, respectively fusing the Head and the Backbone at three parts of 8 times of downsampling characteristic diagrams C3 (80 x 80), 16 times of downsampling characteristic diagrams C4 (40 x 40) and 32 times of downsampling characteristic diagrams C5 (20 x 20) to obtain three parts of P3, P4 and P5, analyzing the network structure of Mobilenetv3, finding out three parts of which the output characteristic diagram is consistent with the sizes of C3 (80 x 80), C4 (40 x 40) and C5 (20 x 20) of the Backbone in YOLOv, replacing the three parts of P3, P4 and P5 of the Backbone in the original YOLOv7, which are correspondingly generated by the modified C3, C4 and C5, and converting the other parts of the new network structure after light weight, and obtaining a detection algorithm of YOLOv; in the step S4, the training method is as follows: ① Importing the file of the improved YOLOv detection algorithm as a training parameter, adjusting the corresponding parameter, training the improved YOLOv detection algorithm through the sugarcane tail break point detection data set obtained in the step S2, and obtaining a model with highest training precision according to training results of different parameters; ② Recovering the accuracy of the model with the highest training accuracy obtained in ①; The precision recovery method comprises the steps of taking an original YOLOv detection algorithm as a teacher model, taking a YOLOv detection algorithm with highest precision obtained in ① as a student model, carrying out knowledge distillation on a sugarcane tail break point detection dataset, and carrying out precision recovery on the YOLOv detection algorithm with highest precision obtained in ①.
- 2. The sugarcane tail break point target detection method based on the lightweight YOLOv <7> is characterized in that in the S1, field sugarcane tail break point images are shot in different time periods, different distances and different angles, and a sugarcane tail break point detection data set is constructed.
- 3. The method for detecting the sugarcane tail break point target based on the lightweight YOLOv as claimed in claim 1, wherein the step S2 specifically comprises the following steps: a. Screening, namely eliminating images with poor blurring and effects from a sugarcane tail breaking point detection data set; b. Marking, namely marking the tail breaking points of the screened sugarcane tail breaking point images; c. Expanding the sugarcane tail break point detection data set by changing image parameters of the marked image; d. dividing the expanded sugarcane tail break point detection data set into a plurality of subsets according to a certain proportion.
- 4. A sugarcane tail break point target detection method based on lightweight YOLOv as claimed in claim 3 wherein in c, changing image parameters includes adjusting image brightness, contrast and rotating, mirroring the image.
- 5. The method for detecting sugarcane tail break point targets based on lightweight YOLOv as claimed in claim 3, wherein in d, the whole sugarcane tail break point detection data set is divided into a training set Train, a verification set Val and a Test set Test according to a ratio of 9:1:1.
- 6. The method for detecting the sugarcane tail break point target based on the lightweight YOLOv as claimed in claim 1 is characterized in that in the step S5, a sugarcane tail break point detection dataset is input into a YOLOv model trained in the step S4 for testing, confidence is set, a prediction frame with the confidence higher than a preset value is obtained after rejection, and the prediction frame with the highest confidence is taken as an optimal prediction frame, namely the sugarcane tail break point.
Description
Sugarcane tail breaking point target detection method based on lightweight YOLOv7 Technical Field The invention belongs to the technical field of sugarcane harvesting, and particularly relates to a sugarcane tail breaking point target detection method based on light YOLOv. Background The sugarcane is used as an important raw material for sugar production, and is a key crop which ensures that a 'sugar pot' in China firmly holds the sugar pot in the hands of Chinese people. At present, the main harvesting mode of sugarcane is mainly traditional manual harvesting, a large amount of labor force is relied on, the mechanized harvesting degree is not high, in the mechanized harvesting, the sugarcane harvester is mainly a segmented sugarcane harvester, the sugarcane harvester can directly cut off the sugarcane, long-term storage of the sugarcane is not facilitated, meanwhile, the whole sugarcane is more beneficial to the sugar manufacturing process of the existing sugar factory, and therefore the whole rod type sugarcane harvester is more suitable for production and processing of the actual existing sugar manufacturing process. However, the current whole-rod sugarcane harvester is less, and the sugarcane harvesting is mixed with sugarcane tips, sugarcane leaves and other impurities, so that the impurity content is high, and the requirement of a sugar mill is far less than that of the whole-rod sugarcane harvester. For harvesting of whole sugar cane, the key is how to accurately identify the sugar cane tail tip and complete the cut. The sugarcane tail breaking point refers to a tail stalk which contains little sugar below the growth point of the top end of the sugarcane stalk, and the sugarcane leaf comprises leaves and leaf sheaths. The sugarcane tail breaking point has important influence on the operation efficiency and quality of the sugarcane harvester, if the sugarcane tail breaking point is too long, useless energy consumption can be increased, the sugar yield can be reduced, a growing point possibly remains to influence the quality of raw material sugar, meanwhile, more impurities can be left in the harvested sugarcane, and if the sugarcane tail breaking point is too short, the loss of sugarcane farmers can be increased. Along with the development of technology, the integration of artificial intelligence technology and agriculture is more and more, and the artificial intelligence technology is introduced to detect the tail breaking point of the sugarcane, so that the sugarcane harvester can be helped to finish the intelligent tip cutting of the sugarcane, thereby greatly reducing the impurity content and enabling the sugarcane harvester to have more advantages. The object detection task is to find objects of interest in an image or video and to detect their position and size at the same time. Unlike image classification tasks, object detection not only solves classification problems, but also solves positioning problems. As one of the basic problems of computer vision, object detection forms the basis of many other visual tasks, such as example segmentation, image labeling and object tracking, and the like, and the development context of object detection can be divided into two periods, namely a period of a traditional object detection algorithm and a period of a deep learning-based object detection algorithm, and the deep learning-based object detection algorithm is developed into two technical routes, namely a region extraction-based method and a regression-based method. The region extraction-based method is to extract some regions (Region Proposal) possibly containing objects from the image through some manual design or learning algorithm, and then classify and locate each region, and the method comprises R-CNN, fast R-CNN, mask R-CNN and the like. The method has the advantages of high precision, low speed and large calculated amount. Regression-based methods predict the class and position of objects directly from images without extracting regions. Such methods include YOLO, SSD, retinaNet, etc., which have the advantage of small computational effort but lower accuracy. YOLO (You Only Look Once) is a typical regression-based object detection algorithm that divides the input image into S x S grid cells, each of which is responsible for predicting B bounding boxes and C class probabilities. Through the improvement and optimization of a plurality of versions, YOLO7 has more mature detection performance, but compared with a sugarcane harvester, the GPU calculation required by the YOLOv model is still higher, and is difficult to be deployed on embedded equipment of the sugarcane harvester. Disclosure of Invention The invention aims to provide a sugarcane tail breaking point target detection method based on light YOLOv, which can solve the technical problem that in the prior art, proper sugarcane tail breaking points cannot be accurately identified by mechanized harvesting of whole sugarcane, can enable YOLOv7 t