A portable sugarcane field yield measurement system

Through the portable sugarcane field yield measurement system, the improved YOLOv5 neural network model and edge computing equipment are used to solve the problems of low efficiency and poor accuracy of traditional sugarcane yield measurement, and achieve real-time and accurate sugarcane yield measurement in the field, which is suitable for a variety of applications. agricultural crops.

CN114743104BActive Publication Date: 2024-09-10SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210393815.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2024-09-10
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

Traditional sugarcane yield measurement relies on manual operation, which is inefficient and inaccurate. Existing machine vision methods have poor accuracy and stability in identifying sugarcane stem nodes and bifurcation points in complex outdoor backgrounds. They cannot achieve real-time online detection and are difficult to apply in field environments. .

Method used

A portable sugarcane field yield measurement system is designed. Based on the improved YOLOv5 neural network model, combined with edge computing equipment and binocular cameras, it identifies sugarcane stem nodes and bifurcation points through images, calculates plant height and diameter, and multiplies the bulk weight to Realizes sugarcane yield measurement and is suitable for real-time detection in the field.

Benefits of technology

It greatly improves the work efficiency and accuracy of sugarcane field yield measurement, realizes real-time detection in the field, reduces manual operations, system reliability and feasibility, and is suitable for a variety of complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114743104B
    Figure CN114743104B
Patent Text Reader

Abstract

The present invention discloses a portable sugarcane field yield measurement system, comprising: an edge computing device, a portable display screen, a binocular camera, a first portable power supply, a second portable power supply, a Bluetooth control keyboard, an image input module, an image processing module and an image recognition module; the binocular camera, the first portable power supply, the portable display screen and the Bluetooth control keyboard are all connected to the edge computing device, and the second portable power supply is connected to the portable display screen; the image input module collects images and videos of sugarcane, the image processing module analyzes and processes the images and videos, and the image recognition module is responsible for multi-scale measurement of the images and videos processed by the image processing module to achieve sugarcane yield measurement. The present invention can replace the traditional manual yield measurement method, improve the real-time yield measurement of agricultural and industrial fields, and improve work efficiency and reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning and sugarcane field yield measurement, and in particular to a portable sugarcane field yield measurement system. Background Art

[0002] Traditional sugarcane yield measurement still requires manual operation. It is necessary to manually measure the diameters of the plant at three points, the top, middle and bottom, and then take the average value to get the plant diameter. The height of the plant also needs to be measured manually, and 4-5 measurements are required each year. This not only reduces work efficiency but also affects accuracy.

[0003] In terms of agricultural yield measurement, traditional machine vision scholars use the threshold segmentation method to separate the sugarcane nodes and bifurcation points in the RGB color model from the background for the acquired images, and further analyze and identify the relationship between the number of nodes and bifurcation points and the yield. This operation is not only complicated but also inefficient. Most sugarcane is grown outdoors, and most of the related operations are also carried out outdoors. The background conditions are complex and affected by natural light, making identification difficult. If we use the traditional machine vision method, not only the accuracy and stability of sugarcane node and bifurcation point identification cannot be guaranteed, but the correlation coefficient between the number of identification and yield is also low, and the possibility of implementation is not great.

[0004] In the development of artificial intelligence in recent years, the development of deep learning and convolutional neural networks has brought about a qualitative leap in the direction of target detection and provided good results. However, at present, most of the visual-based target detection processes and detects a single image on the server side. For real-time, online target detection, it has little reference significance and cannot be transferred to field scenes for implementation. The feasibility of implementation is still not high. Summary of the invention

[0005] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art, and propose a portable sugarcane field yield measurement system. Based on the improved YOLOv5 neural network model, the volume is calculated by visually identifying the height and diameter of the sugarcane plant, and then multiplied by the bulk density of the sugarcane to obtain the weight of a single sugarcane plant. By quickly and massively collecting the weight of sugarcane plants, the sugarcane yield of a certain plot can be obtained. The system can replace the traditional manual yield measurement method and improve the real-time yield measurement of agricultural and industrial fields.

[0006] To achieve the above object, the technical solution provided by the present invention is: a portable sugarcane field yield measurement system, comprising:

[0007] The hardware part includes an edge computing device, a portable display screen, a binocular camera, a first portable power supply, a second portable power supply, and a Bluetooth control keyboard; wherein the binocular camera, the first portable power supply, the portable display screen, and the Bluetooth control keyboard are all connected to the edge computing device through specific data cables and interfaces, and the second portable power supply is connected to the portable display screen to provide power support;

[0008] The software part is loaded on the edge computing device, and includes an image input module, an image processing module and an image recognition module; wherein the image input module collects images and videos of sugarcane through a binocular camera, the image processing module is responsible for analyzing and processing the images and videos input by the image input module, and the image recognition module is responsible for performing multi-scale measurements on the images and videos processed by the image processing module, and identifying the sugarcane stem nodes and bifurcation points based on the improved YOLOv5 neural network model, thereby realizing the measurement of sugarcane yield, wherein the stem node refers to the node part raised on the surface of the sugarcane plant, and the bifurcation point refers to the intersection of the sugarcane plant and the sugarcane leaf;

[0009] Among them, the YOLOv5 neural network model was improved, including: ① using SGD optimization during training, adding a warmup strategy, and using a small learning rate at the beginning of model training, and then gradually increasing the learning rate to increase the learning speed; ② using the k-means clustering mean algorithm to obtain a priori boxes suitable for the characteristic size of sugarcane nodes and bifurcation points; ③ adding the CBAM attention module and the VarifocalNet module to improve the real-time detection accuracy of sugarcane nodes and bifurcation points under severe field occlusion.

[0010] Furthermore, the k-means clustering mean algorithm is used to obtain a priori boxes suitable for the characteristic sizes of sugarcane nodes and bifurcation points. The specific situation is as follows:

[0011] The k-means clustering mean algorithm first selects K clusters from all data samples. Clustering refers to dividing the samples in the data set into several non-overlapping subsets, each of which is called a "cluster". The mean of the data in the cluster represents the center, that is, the center of each cluster is used to describe the cluster, and the values ​​of each cluster are continuously regressed; in the continuous calculation process, all samples are divided into the cluster where the center with the smallest distance is located; in order to minimize the sum of squares of each cluster, the center must be kept unchanged during the sample selection process. The txt file generated after the labelimg tool annotates the sugarcane node features in the image contains the position information of the annotated sugarcane node features in the original image and the coordinates of the upper left corner of the annotation box (x, y) as well as the width w and height h of the annotation box; the k-means clustering mean algorithm is used to cluster the height and width of k priori boxes, calculate the intersection and union (IOU) of the priori box and each bounding box, and select the maximum value after evaluation; the calculation is continued until the priori box size that best suits the sugarcane node features is obtained;

[0012] Add the CBAM attention module, the details are as follows:

[0013] The CBAM attention module is composed of a channel attention module and a spatial attention module. For the input feature layer, the newly obtained attention map and the input feature layer are adaptively optimized by passing through the channel attention module and the spatial attention module in sequence. The sequential combination of the channel attention module and the spatial attention module simplifies the model structure and reduces the computational pressure.

[0014] The channel attention module performs the following operations: for a single input feature layer, global average pooling and global maximum pooling are performed respectively, and then the pooled results are processed using a shared fully connected layer, the two processed results are added, and the average of the results is taken to obtain the weight of each channel of the input feature layer, which is between 0 and 1. The weight is then multiplied by the original input feature layer to obtain the channel attention value;

[0015] The spatial attention module performs the following operations: for the input feature layer, take the maximum value and average value on the channel of each feature point, then stack the two results, adjust the number of channels using a convolution with a channel number of 1, take the average of the results, and get the weight of each feature point in the input feature layer. The weight is between 0 and 1, and then multiply the weight by the original input feature layer to get the spatial attention value;

[0016] Add the VarifocalNet module, the details are as follows:

[0017] The IOU-aware classification score IACS is an indicator used to indicate the confidence and positioning accuracy of an object, and has a more accurate ranking for the detection of dense objects. The Varifocal loss function uses the trained dense feature detector to predict IACS, combined with the star-shaped bounding box feature representation to estimate IACS and improve the rough bounding box, and uses FCOS+ATSS as the basic network, removing the Centerness branch to form the VarifocalNet module.

[0018] Furthermore, the image processing module selected multiple pictures crawled by Python web crawler, performed data enhancement on the existing sugarcane images, including adjusting brightness, contrast, color saturation and noise, and performing different degrees of cropping to construct an image data set, and then used the LambleImg image annotation tool to annotate the sugarcane nodes and bifurcation point targets in the images in the image data set, and divided the image data set into a training set, a validation set and a test set in proportion; wherein, the above training set is input into the improved YOLOv5 neural network model for training, and the weight file required for sugarcane node and bifurcation point detection can be obtained.

[0019] Furthermore, all the work of the image recognition module is completed on the edge computing device, as follows:

[0020] After the binocular camera captures the sugarcane image, the image is passed to the image recognition module, and the image is resized. The image is proportionally resized so that the long side of the image is 416. If the long side and the short side of the image are the same length, the image size is 416*416. If the short side is not 416, the short side is zero-filled so that the short side length is also 416, ensuring that the input image size is fixed to 416*416. Then the resized image is input into the improved YOLOv5 neural network model for detection: the feature information is transferred and fused into a feature map by upsampling, and the feature map is obtained for recognition. CSPdarknet is used as the main feature extraction network, and LeakyReLU and Sigmoid activation functions are used. Then, according to the Mosaic data enhancement and Focus modules, more effective and deeper feature information is obtained to enhance the model's fitting and improve the detection effect and speed, thereby improving the real-time recognition accuracy of sugarcane nodes and bifurcation points in the field.

[0021] Furthermore, the edge computing device is the control core of the yield measurement system, provides an operating system for the yield measurement system and an operating environment, computing platform and computing power support for the improved YOLOv5 neural network model, and realizes the input and output of conversion data; in the edge computing device, the improved YOLOv5 neural network model processes the images and videos collected by the binocular camera, identifies the positions of the sugarcane nodes and bifurcation points, calculates the height and diameter of the sugarcane plant, and then calculates the volume, and finally multiplies it by the bulk density of the sugarcane to obtain the weight of a single sugarcane plant.

[0022] Furthermore, the edge computing device environment is configured as Ubuntu 18.04, using a dual-core NVIDIA Denver 264-bit CPU and a quad-core -A57 MPCore complex processor, 8GB memory, and Pascal architecture GPU.

[0023] Furthermore, the first portable power supply is a 8400mAh 21V power supply.

[0024] Furthermore, the second portable power supply is a 9000mAh 5V power supply.

[0025] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0026] 1. The yield measurement system designed by the present invention has a faster working speed compared with the traditional yield measurement scheme, and can directly identify the parameters required for yield measurement. There is no need for manual measurement of single plants. The operator only needs to move the camera and record the data, which greatly reduces manual work and improves work efficiency.

[0027] 2. All devices of the system of the present invention are easy to carry and install, and can be used in various complex environments such as fields. It is not limited to identifying and detecting a single picture on the server side, and can realize real-time detection in the field, thereby improving the reliability of field yield measurement.

[0028] 3. The system of the present invention combines the target detection method based on machine vision and uses the improved YOLOv5 neural network model to automatically identify sugarcane nodes and bifurcation points, thereby improving the efficiency of yield measurement.

[0029] 4. The edge computing device and display of the system of the present invention are powered by portable power supplies of 8400mAh 21V and 9000mAh 5V respectively, which are safe to use and do not pose any safety hazard to electricity use.

[0030] In conclusion, the system of the present invention has broad application prospects. It can not only meet the real-time work in agricultural fields, but also can be widely used in other agricultural crops such as citrus and corn, as well as other technical fields such as medical treatment and education. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 The overall structure diagram of the portable sugarcane field yield measurement system provided in the embodiment;

[0032] Figure 2 A partial structural diagram of a portable sugarcane real-time yield measurement system provided in an embodiment;

[0033] In the attached figure, 1-edge computing device; 2-portable display screen; 3-binocular camera; 4-8400mAh 21V portable power supply; 5-Bluetooth control keyboard; 6-9000mAh 5V portable power supply; 11-adjustable speed cooling fan; 12-lead; 13-trip stand. DETAILED DESCRIPTION

[0034] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0035] See also Figure 1 and Figure 2 As shown, this embodiment provides a portable sugarcane field yield measurement system, whose hardware part includes an edge computing device 1 and a portable display screen 2 connected to the edge computing device 1; a binocular camera 3 is connected to the edge computing device 1; the edge computing device 1 uses an 8400mAh 21V portable power supply 4; the portable display screen 2 uses a 9000mAh 5V portable power supply 6; a Bluetooth control keyboard 5 transmits control commands to the system; the entire yield measurement system is composed of a plurality of detachable components, which is convenient to carry and simple to install.

[0036] Further, in Figure 1 In the embodiment, except for the Bluetooth control keyboard 5, each hardware device needs to be connected through the lead 12, wherein the whole system is powered by the 8400mAh 21V and 9000mAh 5V portable power supplies 4 and 5, which increases portability and operational safety. The binocular camera 3 is connected to the edge computing device 1 to realize the function of acquiring image information and transmitting it to the edge computing device, and the acquired image information is passed to the improved YOLOv5 neural network model for processing. The portable display screen 2 is connected to the edge computing device 1 to visualize the processed effect.

[0037] like Figure 2As shown, the edge computing device 1 is provided with an adjustable speed cooling fan 11 to ensure the heat dissipation effect of the system. Among them, the binocular camera comes with a tripod 13, which can ensure the stability of the system and the ease of operation. After the tripod 13 and the binocular camera 3 are assembled into a whole, the overall installation of the portable sugarcane field yield measurement system is completed.

[0038] Among them, in order to meet the reliability and practicality in various scenarios, LED display screens are preferred. Compared with LCD screens, they have no joints, high brightness, and are more suitable for outdoor use. The use of binocular cameras can not only meet the needs of collecting pictures or videos and realize the recognition of sugarcane stem nodes and bifurcation points, but also meet the requirements of distance measurement, enhance scalability and universality, so binocular cameras are preferred.

[0039] The edge computing device 1 is rich in functions, has strong computing power, integrates development and testing, is a tool, terminal, and system for software development, and can configure the environment, debug parameters, and carry the operation of the neural network model. Since the neural network model occupies a large amount of memory, it is difficult to transplant it to the edge computing device. Therefore, the improved YOLOv5 neural network model is used to reduce the calculation amount of the model and speed up the operation of the model, thereby improving the robustness of the model. The edge computing device provides an interface for at least two external components that can be connected to it, connecting the data transmission of the entire device in series, comprehensively enriching the integrity of the portable sugarcane field yield measurement system, and making the entire yield measurement system also have good scalability.

[0040] Furthermore, the main functions of the edge computing device are as follows:

[0041] Provides an operating system for the production measurement system, an operating environment for the improved YOLOv5 neural network model, a computing platform for the improved YOLOv5 neural network model, and computing power support for the improved YOLOv5 neural network model. It serves as the control core of the production measurement system and converts data input and output.

[0042] The edge computing device environment is configured as Ubuntu 18.04, using a dual-core NVIDIA Denver 2 64-bit CPU and a quad-core -A57 MPCore complex processor, 8GB memory, and Pascal architecture GPU.

[0043] In the edge computing device, the improved YOLOv5 neural network model processes the images and videos captured by the binocular camera, identifies the locations of the sugarcane nodes and bifurcation points, calculates the height and diameter of the sugarcane plant, and then calculates the volume, which is then multiplied by the bulk density of the sugarcane to obtain the weight of a single sugarcane plant.

[0044] In order to realize the real-time identification of sugarcane nodes and bifurcation points outdoors in the field, the present invention uses a portable and lightweight edge computing device and display, and uses 8400mAh 21V and 9000mAh 5V portable power supplies respectively, neither of which requires a special fixed power supply method, thereby meeting the portability and safety of real-time yield measurement equipment.

[0045] The portable sugarcane field yield measurement system provided in this embodiment is suitable for a variety of field environments. The binocular camera can be fixed by adjusting the tripod, and then the image or video of the sugarcane field can be acquired from various angles and transmitted to the improved YOLOv5 neural network model built into the edge computing device. The real-time shooting mode of the binocular camera can also be turned on to perform real-time detection of sugarcane stem nodes and bifurcation points within the shooting range. The software part built into the edge computing device is described in detail below, and the software part includes:

[0046] Image input module, responsible for collecting images and videos of sugarcane;

[0047] Image processing module, responsible for analyzing and processing input images and videos;

[0048] The image recognition module is responsible for performing multi-scale measurements on the images and videos processed by the image processing module. Based on the improved YOLOv5 neural network model, it identifies the sugarcane nodes and bifurcation points, thereby realizing the measurement of sugarcane yield. The node refers to the raised node part on the surface of the sugarcane plant, and the bifurcation point refers to the intersection of the sugarcane plant and the sugarcane leaf.

[0049] In the image input module, all acquired images are collected by a binocular camera.

[0050] The image processing module uses 1086 sugarcane images taken in the sugarcane fields of Leizhou City, Zhanjiang City, Guangdong Province, and 260 images were selected from the Python web crawler. In order to enhance the diversity of data and improve the robustness of samples, data enhancement is performed on the existing sugarcane images, including adjusting the brightness, contrast, color saturation and noise, and performing different degrees of cropping. A total of 1860 images are obtained to construct an image data set. The above sugarcane images are sorted, and the LambleImg image annotation tool is used to annotate the sugarcane nodes and bifurcation points in the image. There are 9307 annotated targets in total, and the data set is divided into 1302 training sets, 372 validation sets, and 186 test sets at a ratio of 70%, 20%, and 10%. Among them, the above-mentioned sorted training set is input into the improved YOLOv5 neural network model for training, and the weight file required for sugarcane node and bifurcation point detection can be obtained.

[0051] In the image recognition module, all work is completed on the edge computing device, as follows:

[0052] After the binocular camera captures the sugarcane image, it passes the image to the image recognition module, resizes the image, and resizes the image proportionally so that the long side of the image is 416. If the long side and the short side of the image are the same length, the image size is 416*416. If the short side is not 416, the short side is zero-filled so that the short side length is also 416. Ensure that the input image size is fixed to 416*416, and then input the resized image into the improved YOLOv5 neural network model for detection: The feature information is transferred and fused into a feature map through upsampling, and the feature map is obtained for recognition. CSPdarknet is used as the main feature extraction network. LeakyReLU and Sigmoid activation functions are used, which have the advantages of fast training and inference speeds with little impact on accuracy. Mosaic data enhancement and Focus modules are used to obtain more effective and deeper feature information, enhance the fitting of the model, improve the detection effect, and increase the detection speed, thereby improving the real-time recognition accuracy of sugarcane nodes and bifurcation points in the field.

[0053] The improved YOLOv5 neural network model used in the present invention needs to first obtain the sugarcane image with a binocular camera, unify it into a certain resolution of 416*416, and then send it to the image input module, and use CSPdarknet as the main feature extraction network; using LeakyReLU and Sigmoid activation functions, it has the advantages of fast training speed and fast inference speed under the condition of less impact on accuracy, and then according to the Mosaic data enhancement and Focus modules, more effective and deeper feature information is obtained, the model's fitting is enhanced, the detection effect is improved, and the detection speed is increased.

[0054] The technical core of this system is the improved YOLOv5 neural network model. The improvements to the YOLOv5 neural network model include: ① using SGD optimization during training, adding a warm up strategy, and using a small learning rate at the beginning of model training, and then gradually increasing the learning rate to increase the learning speed; ② using the k-means clustering mean algorithm to obtain a priori boxes suitable for the characteristic size of sugarcane nodes and bifurcation points; ③ adding the CBAM attention module and the VarifocalNet module to improve the real-time detection accuracy of sugarcane nodes and bifurcation points under severe field occlusion.

[0055] The k-means clustering mean algorithm is used to obtain a priori boxes suitable for the characteristic dimensions of sugarcane stem nodes and bifurcation points. The specific situation is as follows:

[0056] The k-means clustering mean algorithm first selects K clusters from all data samples. Clustering refers to dividing the samples in the data set into several non-overlapping subsets, each of which is called a "cluster". The mean of the data in the cluster represents the center, that is, the center of each cluster is used to describe the cluster, and the values ​​of each cluster are continuously regressed; in the continuous calculation process, all samples are divided into the cluster where the center with the smallest distance is located; in order to minimize the sum of squares of each cluster, the center must be kept unchanged during the sample selection process. The txt file generated after the labelimg tool is used to annotate the sugarcane stem node features in the image contains the position information of the annotated sugarcane stem node features in the original image and the coordinates of the upper left corner of the annotation box (x, y) as well as the width w and height h of the annotation box; the k-means clustering mean algorithm is used to cluster the height and width of k prior boxes, calculate the intersection and union (IOU) of the prior box and each bounding box, and select the maximum value after evaluation; the calculation is continued until the prior box size that best suits the sugarcane stem node features is obtained;

[0057] Add the CBAM attention module, the details are as follows:

[0058] The CBAM attention module is composed of a channel attention module and a spatial attention module. For the input feature layer, the newly obtained attention map and the input feature layer are adaptively optimized by passing through the channel attention module and the spatial attention module in sequence. The sequential combination of the channel attention module and the spatial attention module simplifies the model structure and reduces the computational pressure.

[0059] The channel attention module performs the following operations: for a single input feature layer, global average pooling and global maximum pooling are performed respectively, and then the pooled results are processed using a shared fully connected layer, the two processed results are added, and the average of the results is taken to obtain the weight of each channel of the input feature layer, which is between 0 and 1. The weight is then multiplied by the original input feature layer to obtain the channel attention value;

[0060] The spatial attention module performs the following operations: for the input feature layer, take the maximum value and average value on the channel of each feature point, then stack the two results, adjust the number of channels using a convolution with a channel number of 1, take the average of the results, and get the weight of each feature point in the input feature layer. The weight is between 0 and 1, and then multiply the weight by the original input feature layer to get the spatial attention value;

[0061] Add the VarifocalNet module, the details are as follows:

[0062] The IOU-aware classification score IACS is an indicator used to indicate the confidence and positioning accuracy of an object, and has a more accurate ranking for the detection of dense objects. The Varifocal loss function uses the trained dense feature detector to predict IACS, combined with the star-shaped bounding box feature representation to estimate IACS and improve the rough bounding box, and uses FCOS+ATSS as the basic network, removing the Centerness branch to form the VarifocalNet module.

[0063] Since there is a certain gap between the memory and video memory of the device and the server equipment, the running neural network model needs to have the characteristics of simple structure, fast operation and few parameters. Therefore, the existing YOLOv5 neural network model is improved.

[0064] Since the data in the self-made sugarcane dataset is relatively simple, optimization is made in the model training and data enhancement parts. When the model is just starting to train, each data point is relatively new to the neural network model. The model will quickly perform data correction and learn some inherent features that do not belong to the sugarcane nodes and bifurcation points, causing the model to overfit. In order to make the model training more stable, ensure that the model will not oscillate too much during deep training, and increase the stability of the model, SGD optimization is used during training, and a warm up strategy is added. A smaller learning rate is used at the beginning of model training to learn the model features in detail. When the loss tends to be stable, a larger learning rate is used to train the model normally, which can effectively reduce the potential overfitting phenomenon in the early stage of model training. In addition, the k-means clustering mean algorithm is used to obtain the prior box suitable for the feature size of the sugarcane nodes and bifurcation points, and the CBAM attention module and the VarifocalNet module are added to improve the real-time detection accuracy of the sugarcane nodes and bifurcation points under severe field occlusion. In order to make the model more robust, data enhancement operations such as data flipping and brightness adjustment are performed on the sugarcane dataset to improve the reliability of the training results.

[0065] The portable sugarcane field yield measurement system provided in this embodiment needs to first annotate the self-made sugarcane data set, train the optimized algorithm on the 1060 3GB server, and obtain the model weight file for detecting sugarcane nodes and bifurcation points; then transplant the trained model file to the Jetson TX2 development board and adjust the parameters and configure the environment; use the improved YOLOv5 neural network model to detect and identify sugarcane nodes and bifurcation points, which is divided into three cases: first, detect the video, read the video and identify it frame by frame; second, detect the image, read the picture and adjust the picture size, obtain the detection frame, perform non-maximum suppression, and obtain the final detection frame; third, detect the scene, call the external binocular camera, and perform real-scene detection of sugarcane nodes and bifurcation points.

[0066] The processing and evaluation process of sugarcane data is as follows:

[0067] The sugarcane images used in the network module training of the present invention were taken from sugarcane fields in Leizhou City, Zhanjiang City, Guangdong Province. A total of 1,086 images were taken, and 260 images were crawled by Python web crawlers. In order to enhance the diversity of data and improve the robustness of samples, data enhancement was performed on the existing sugarcane images, including adjusting brightness, contrast, color saturation, noise and other transformations, and performing different degrees of cropping, and a total of 1,860 images were obtained.

[0068] The above sugarcane images were sorted and the LambleImg image annotation tool was used to annotate the sugarcane nodes and bifurcation points in the images. There were 9307 annotated targets in total, and the data set was divided into 1302 training sets, 372 validation sets, and 186 test sets at a ratio of 70%, 20%, and 10%, respectively. The above sorted data set was put into the improved YOLOv5 neural network model for training, and the weight file required for sugarcane node and bifurcation point detection was obtained.

[0069] The present invention uses the pre-trained weights obtained by the improved YOLOv5 neural network model on the VOC dataset for transfer learning. During the training process, a warm up training strategy is used to improve the model's ability to recognize sugarcane images of different resolutions. The training speed on the GPU is significantly improved, and training can be done quickly on a single GPU, effectively reducing training time and resource usage. The evaluation indicators used are precision, speed of processing a single image, and speed of processing a video frame (FPS / s).

[0070] Data visualization shows:

[0071] The core algorithm processes the acquired sugarcane images and videos, and the processing effect will be visualized on the display screen (the display screen is connected to the embedded development board). At the same time, the sugarcane stem nodes and bifurcation points can also be detected in the real-time scene. In the absence of serious external interference, the sugarcane stem nodes and bifurcation points can be detected anytime and anywhere without other special equipment. It has good mobility and simple operation, and can more intuitively display the detection of sugarcane stem nodes and bifurcation points.

[0072] Guided by "smart agriculture + artificial intelligence", this paper proposes to transplant the neural network model to AI edge computing devices and use the YOLOv5 series of algorithms suitable for edge computing devices to ensure the real-time and accurate detection of sugarcane stem nodes and bifurcation points. It improves the reliability of sugarcane field yield measurement technology and the intelligence and portability of yield measurement equipment, further expands the application scope of artificial intelligence in the field of agricultural engineering, and thus promotes the efficiency, refinement and greenness of agriculture.

[0073] The portable sugarcane field yield measurement system provided by the present invention combines machine vision technology with edge computing equipment to measure the sugarcane yield of a certain plot of land, which is in line with the development direction of precision agriculture from mechanization to automation, informatization, and intelligence, and has good application value. It improves the efficiency of sugarcane field yield measurement, thereby improving the scientific and technological content of agricultural production, and providing reliable data support for the industrial chain between sugarcane fields and sugar factories.

[0074] The present invention combines edge computing devices and neural networks to perform target detection and algorithm transplantation of sugarcane nodes and bifurcation points, as well as optimization and acceleration of the algorithm on the front-end platform, to achieve algorithm compatibility and adaptability for identification and positioning of sugarcane nodes and bifurcation points. The improved algorithm detection in the edge computing device can achieve a test speed of 0.012s for a single image and a test rate of 14FPS / s for a video, meeting the practicality of a portable sugarcane field yield measurement system.

[0075] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A portable sugarcane field yield measurement system. It is characterized in that include: The hardware part includes an edge computing device, a portable display screen, a binocular camera, a first portable power supply, a second portable power supply, and a Bluetooth control keyboard; wherein the binocular camera, the first portable power supply, the portable display screen, and the Bluetooth control keyboard are all connected to the edge computing device through specific data cables and interfaces, and the second portable power supply is connected to the portable display screen to provide power support; The software part is loaded on the edge computing device, and includes an image input module, an image processing module and an image recognition module; wherein the image input module collects images and videos of sugarcane through a binocular camera, the image processing module is responsible for analyzing and processing the images and videos input by the image input module, and the image recognition module is responsible for performing multi-scale measurements on the images and videos processed by the image processing module, and identifying the sugarcane stem nodes and bifurcation points based on the improved YOLOv5 neural network model, thereby realizing the measurement of sugarcane yield, wherein the stem node refers to the node part raised on the surface of the sugarcane plant, and the bifurcation point refers to the intersection of the sugarcane plant and the sugarcane leaf; Among them, the YOLOv5 neural network model was improved, including: ① using SGD optimization during training, adding a warm up strategy, and using a small learning rate at the beginning of model training, and then gradually increasing the learning rate to increase the learning speed; ② using the k-means clustering mean algorithm to obtain a priori boxes suitable for the characteristic size of sugarcane nodes and bifurcation points; ③ adding the CBAM attention module and the VarifocalNet module to improve the real-time detection accuracy of sugarcane nodes and bifurcation points under severe field occlusion; The k-means clustering mean algorithm is used to obtain a priori boxes suitable for the characteristic dimensions of sugarcane stem nodes and bifurcation points. The specific situation is as follows: The k-means clustering mean algorithm first selects K clusters from all data samples. Clustering refers to dividing the samples in the data set into several non-overlapping subsets, each of which is called a "cluster". The mean of the data in the cluster represents the center, that is, the center of each cluster is used to describe the cluster, and the values ​​of each cluster are continuously regressed; in the continuous calculation process, all samples are divided into the cluster where the center with the smallest distance is located; in order to minimize the sum of squares of each cluster, the center must be kept unchanged during the sample selection process. The txt file generated after the labelimg tool annotates the sugarcane stem node features in the image contains the position information of the annotated sugarcane stem node features in the original image and the coordinates of the upper left corner of the annotation box (x, y) as well as the width w and height h of the annotation box; the k-means clustering mean algorithm is used to cluster the height and width of k priori boxes, calculate the intersection and union (IOU) of the priori box and each bounding box, and select the maximum value after evaluation; the calculation is continued until the priori box size that best suits the sugarcane stem node features is obtained; Add the CBAM attention module, the details are as follows: The CBAM attention module is composed of a channel attention module and a spatial attention module. For the input feature layer, the newly obtained attention map and the input feature layer are adaptively optimized by passing through the channel attention module and the spatial attention module in sequence. The sequential combination of the channel attention module and the spatial attention module simplifies the model structure and reduces the computational pressure. The channel attention module performs the following operations: for a single input feature layer, global average pooling and global maximum pooling are performed respectively, and then the pooled results are processed using a shared fully connected layer, the two processed results are added, and the average of the results is taken to obtain the weight of each channel of the input feature layer, which is between 0 and 1. The weight is then multiplied by the original input feature layer to obtain the channel attention value; The spatial attention module performs the following operations: for the input feature layer, take the maximum value and average value on the channel of each feature point, then stack the two results, adjust the number of channels using a convolution with a channel number of 1, take the average of the results, and get the weight of each feature point in the input feature layer. The weight is between 0 and 1, and then multiply the weight by the original input feature layer to get the spatial attention value; Add the VarifocalNet module, the details are as follows: The IOU-aware classification score IACS is an indicator used to indicate the confidence and positioning accuracy of an object, and has a more accurate ranking for the detection of dense objects. The Varifocal loss function uses the trained dense feature detector to predict IACS, combined with the star-shaped bounding box feature representation to estimate IACS and improve the rough bounding box, and uses FCOS+ATSS as the basic network, removing the Centerness branch to form the VarifocalNet module. All work of the image recognition module is completed on the edge computing device, as follows: After the binocular camera captures the sugarcane image, the image is passed to the image recognition module, and the image is resized. The image is proportionally resized so that the long side of the image is 416. If the long side and the short side of the image are the same length, the image size is 416*416. If the short side is not 416, the short side is zero-filled so that the short side length is also 416, ensuring that the input image size is fixed to 416*416. Then the resized image is input into the improved YOLOv5 neural network model for detection: the feature information is transferred and fused into a feature map by upsampling, and the feature map is obtained for recognition. CSPdarknet is used as the main feature extraction network, and LeakyReLU and Sigmoid activation functions are used. Then, according to the Mosaic data enhancement and Focus modules, more effective and deeper feature information is obtained to enhance the model's fitting and improve the detection effect and speed, thereby improving the real-time recognition accuracy of sugarcane nodes and bifurcation points in the field.

2. A portable sugarcane field yield measurement system according to claim 1, Features: The image processing module uses multiple images crawled by Python web crawlers to perform data enhancement on existing sugarcane images, including adjusting brightness, contrast, color saturation and noise, and performing different degrees of cropping to construct an image data set, and then uses the LambleImg image annotation tool to annotate the sugarcane nodes and bifurcation point targets in the images in the image data set, and divides the image data set into a training set, a validation set and a test set in proportion; wherein the above training set is input into the improved YOLOv5 neural network model for training, and the weight file required for sugarcane node and bifurcation point detection can be obtained.

3. A portable sugarcane field yield measurement system according to claim 1, It is characterized in that The edge computing device is the control core of the production measurement system, provides the operating system for the production measurement system, the operating environment, computing platform and computing power support of the improved YOLOv5 neural network model, and realizes the input and output of conversion data; In the edge computing device, the improved YOLOv5 neural network model processes the images and videos captured by the binocular camera, identifies the locations of sugarcane nodes and bifurcation points, calculates the height and diameter of the sugarcane plant, then calculates the volume, and finally multiplies it by the bulk density of the sugarcane to obtain the weight of a single sugarcane plant.

4. A portable sugarcane field yield measurement system as claimed in claim 1, It is characterized in that The edge computing device environment is configured as Ubuntu 18.04, using a dual-core NVIDIA Denver 2 64-bit CPU and a quad-core -A57MPCore complex processor, 8GB memory, and Pascal architecture GPU.

5. A portable sugarcane field yield measurement system as claimed in claim 1, It is characterized in that The first portable power supply is a 8400mAh 21V power supply.

6. A portable sugarcane field yield measurement system as claimed in claim 1, It is characterized in that The second portable power supply is a 9000mAh 5V power supply.

Citation Information

Patent Citations

  • Portable onlinecitrus yield measuring instrument

    CN112613438A

  • Sugarcane seedling automatic identification and counting method based on deep neural network

    CN113392775A

  • Orchard yield measuring system based on improved YOLOv3

    CN113763196A