Method for detecting the impurity rate of cane segments in a road transport vehicle
By improving the YOLOv8 network and the natural angle of repose calculation, the accuracy problem of detecting the impurity content of sugarcane segments on sugarcane transport vehicles was solved, achieving high-precision and real-time detection of the impurity content of sugarcane segments, thereby improving the efficiency and economic benefits of sugarcane harvesting mechanization.
Patent Information
- Application Number
- CN202410660401.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-05-27
AI Technical Summary
In existing technologies, the detection of impurity content in sugarcane segments on sugarcane transport vehicles suffers from inaccurate counting and difficulty in detecting impurities, leading to disputes between sugarcane farmers and sugar mills and affecting the mechanization of sugarcane harvesting.
An improved YOLOV8 network is used for sugarcane segment detection. The detection accuracy is improved by using the convnextv2 backbone network and the TripletAttention mechanism. The impurity content of the sugarcane segments is calculated in real time by combining QR code tags and industrial cameras. The number of stacked sugarcane segments is calculated by using the natural angle of repose, thus achieving high-precision and real-time detection.
It enables accurate detection of impurity content in sugarcane segments on sugarcane transport vehicles, reduces the cost of manual estimation, resolves disputes between sugarcane farmers and sugar factories, and promotes the mechanization and intelligentization of sugarcane planting management.
Smart Images

Figure CN118470709B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of sugarcane segment detection on road transport vehicles, and particularly to a detection method for the impurity content of sugarcane segments harvested by a road transport vehicle. BACKGROUND
[0002] In order to improve the harvesting efficiency and economic benefits of sugarcane planting, mechanical harvesting of sugarcane is being vigorously promoted in many places. However, disputes often arise between sugarcane farmers and sugar mills due to the impurity content of sugarcane segments on the transport vehicle, which delays the process of harvesting sugarcane segments, reduces the economic value of sugarcane, and hinders the progress of mechanical harvesting of sugarcane. The impurity content of sugarcane segments refers to the percentage of impurities (sugarcane tops, sand, soil, leaves of sugarcane stems, and green leaves of sugarcane tops) in the total mass of harvested sugarcane segments, of which the main impurities are sugarcane leaves and soil. The impurity content of sugarcane segments provided to sugar mills for sugar production is estimated by quality inspectors of the sugar mills after inspecting the transport vehicle carrying the sugarcane segments based on years of experience, or is calculated by separately weighing the sugar cane segments and the solid substances attached and mixed thereto according to the provisions of GB / T 10499. The estimation method by visual inspection of the quality inspectors is highly subjective, and strict calculation according to the provisions may not conform to the real-time changes in the impurity content, which may lead to differences in the determination of the impurity content between sugarcane farmers and sugar mills, and delay the application of sugarcane segments, which has a negative impact on the development of the sugarcane segment industry.
[0003] In view of the above, it is of high value to invent a method for detecting the impurity content of sugarcane segments harvested by a road transport vehicle with a machine, which is convenient, fast, and highly accurate. SUMMARY
[0004] The present application aims to overcome the shortcomings and deficiencies of the prior art and provides a detection method for the impurity content of sugarcane segments harvested by a road transport vehicle with a machine, which effectively solves the problems of inaccurate counting of sugarcane segments on the transport vehicle and difficulty in detecting impurities in the sugarcane segments, improves the accuracy of detecting sugarcane segments, effectively solves the problems of stacking and overlapping of sugarcane segments and small targets, and missed detection, and ensures real-time requirements while achieving high accuracy.
[0005] To achieve the above-mentioned purpose, the technical solution provided by the present application is as follows: a detection method for the impurity content of sugarcane segments harvested by a road transport vehicle with a machine, comprising the following steps:
[0006] 1) obtaining sugarcane segment image data for preprocessing to obtain sugarcane segment local enlarged images of uniform size, and obtaining an enhanced data set after data enhancement of the sugarcane segment local enlarged images;
[0007] 2) input the enhanced data set into the improved YOLOV8 network which has been trained, identify the cane segments in the transport vehicle and count, and obtain the number of cane segments in the transport vehicle; wherein the specific improvements of the improved YOLOV8 network include: replacing the original CSPDarkNet53 backbone network with a convnextv2 backbone network, which is used to improve the detection accuracy of the network when detecting cane segments of different sizes and the recognition accuracy of the network in distinguishing cane segments, cane roots and cane tips, while adding a TripletAttention attention mechanism at the end of the convnextv2 backbone network, which is used to improve the detection accuracy of the network when facing overlapping and crossing cane segments, and replacing the original detection head with an EfficientHead lightweight detection head, which is used to reduce the network detection time;
[0008] 3) according to the obtained number of cane segments, the weight of the cane segments is calculated, and the impurity content of the transport vehicle is calculated.
[0009] Further, in step 1), in order to collect the data set, a visual algorithm feature recognition detection is provided to better distinguish cane segments, cane tips and cane roots in the transport vehicle. First, the features of cane segments, cane tips and cane roots are defined, which are: (1) cane segment: the cane segment cut by the cane segment harvester, the color is between dark green and light yellow, the length is 35cm-38cm, and the width is 5cm-6cm; (2) cane tip: composed of slender and tender green leaves, the leaves show soft and tender texture, and the edges are wavy or serrated; (3) cane root: it is born on the root point of each node of the stem, the cane segment root is cylindrical, the surface is smooth, the color is light yellow to light brown, with fine root hairs, and the texture is tough and flexible; according to the above features, cane segments, cane tips and cane roots are distinguished, so as to meet the feature recognition and classification requirements of the improved YOLOV8 network.
[0010] Further, in step 1), a random function is used to generate the region coordinates of the upper left corner and the lower left corner of the cane segment image, and the region coordinates of the upper right corner and the lower right corner of the cane segment image are generated according to the image size, and then the cane segment image is cropped to obtain a fixed size of 416*416 cane segment local enlarged image, which improves the recognition accuracy of the improved YOLOV8 network, solves the problem of small and overlapping cane segments in the captured image, and obtains the enhanced data set after data enhancement of the obtained cane segment local enlarged image.
[0011] Further, the improved YOLOV8 network comprises three parts of Backbone, Neck and Head; the Backbone serves as a feature extraction network, and its role is to extract information in the image for use by the subsequent network; the improved YOLOV8 network replaces the original CSPDarkNet53 backbone network of the Backbone with a convnextv2 backbone network, which is specially designed for self-supervised learning, and enhances feature recognition by designing a new global response normalization layer; the convnextv2 backbone network can capture channel features to improve the detection accuracy of the network when detecting sugarcane segments of different sizes and the recognition accuracy of the network in distinguishing sugarcane segments, roots and shoots; at the same time, the TripletAttention attention mechanism is added at the end of the convnextv2 backbone network, which uses a three-branch structure to capture cross-dimensional interactions between input data to calculate attention weights, and it can build interdependence between input channels or spatial positions to improve the detection accuracy of the network when facing overlapping and crossing sugarcane segments; the Neck is placed between the Backbone and the Head, and adopts the PANet structure, which uses the features extracted by the Backbone to play a role in feature fusion; the Head uses the features extracted in the front to make recognition, and in this part, the original Head is replaced with an EfficientHead lightweight detection head to reduce network parameters and computational complexity, thereby reducing the network detection time.
[0012] Further, in step 2), the improved YOLOV8 network is used to process the images and videos collected by the industrial camera to identify the sugarcane segments and count the number of sugarcane segments in the current scanning layer; the current scanning layer refers to the case where the industrial camera captures the surface of the sugarcane segments in the truck bed, and the number of sugarcane segments in the whole vehicle is calculated according to the following formula:
[0013]
[0014] In the formula, N1 represents the number of sugarcane segments counted in the scanning layer, N is the number of shooting points of the panoramic sugarcane segment image, K is the index of the shooting point, which represents the sugarcane segment image of the Kth shooting point, M is the number of images after segmentation of each shooting point, P is the index of the segmented image, which represents the Pth segmented image, and X KP represents the number of sugarcane segments in the Pth segmented image of the Kth shooting point.
[0015] The above formula indicates that after each original image of N shooting points is segmented into M images, the number of sugarcane segments in the segmented images is accumulated to obtain the total number of sugarcane segments N1 of all shooting points.
[0016] Furthermore, when a curved layer appears in the scanning layer, its volume is divided into the volume of an accumulated cone and the volume of a cuboid. When sugarcane segments are stacked, the volume of the cone in the stack is calculated based on the angle of repose and the height of the stacked sugarcane segments. The angle of repose represents the angle between the hypotenuse and the base of the cone. After calculating the volume, the number of sugarcane segments is obtained by conversion, as follows:
[0017] The formula for calculating the volume of sugarcane segments piled up in the transport vehicle is:
[0018]
[0019] In the formula: v is the volume of the sugarcane stack, π is pi, h is the height of the sugarcane stack, and θ is the angle of repose.
[0020] The formula for calculating the quantity of sugarcane segments piled up in the transport vehicle is:
[0021]
[0022] In the formula: N2 is the number of stacked sugarcane segments, D is the average diameter of the sugarcane segments, and L is the average length of the sugarcane segments.
[0023] Furthermore, in step 3), the total mass of the sugarcane segment is calculated according to the following formula, as follows:
[0024] The formula for calculating the weight of sugarcane segments in the transport vehicle is:
[0025]
[0026] Where: M ZD ρ is the weight of the sugarcane segment, N1 is the average density, N2 is the number of sugarcane segments counted in the scanned layer, D is the average diameter of the sugarcane segment, L is the average length of the sugarcane segment, and π is pi.
[0027] Furthermore, the transport vehicle is affixed with a QR code label. The QR code label on the vehicle is linked to the edge computing device to obtain the quantity information of the sugarcane segments inside the vehicle. When the transport vehicle arrives at the sugar mill's weighbridge and the total weight of the entire vehicle is measured, the QR code label on the vehicle is scanned by the scanning segment, and the QR code label is linked to the total weight of the transport vehicle and the impurity content information of the sugarcane segments. The quantity information of the sugarcane segments inside the vehicle includes the quantity information of the sugarcane segments obtained after scanning by the industrial camera and the quantity information of the sugarcane segments calculated by converting the natural angle of repose and the height of the sugarcane segments in the curved layer.
[0028] The formula for calculating the total weight of sugarcane segments and impurities in the transport vehicle is:
[0029] M A =M C -M K
[0030] Where: M AQ is the total weight of the cane segment and impurities, M C Q is the total weight of the transport vehicle, M K Q is the total weight of the empty transport vehicle;
[0031] The calculation formula of the impurity weight in the transport vehicle is:
[0032] M Z = M A - M ZD
[0033] In the formula: M Z Q is the impurity weight, M ZD Q is the weight of the cane segment;
[0034] The calculation formula of the impurity rate of the cane segment in the transport vehicle is:
[0035]
[0036] In the formula: Q is the impurity rate.
[0037] Compared with the prior art, the present application has the following advantages and beneficial effects:
[0038] 1. The present application uses a random function to generate the coordinates of the upper left corner and the lower left corner of the initial photographed cane segment image, and then obtains a local magnified image of the cane segment, solving the problem of small detection targets and overlapping.
[0039] 2. The present application replaces the original Backbone CSPDarkNet53 backbone network of YOLOV8 with a convnextv2 backbone network. In the face of a large number of randomly distributed cane segments, the convnextv2 backbone network is specially designed for self-supervised learning, covering a wider range of complexity. By designing a new global response normalization layer, the feature recognition is enhanced, the channel features can be captured, the detection accuracy of the network when detecting cane segments of different sizes is improved, and the recognition accuracy of the improved YOLOV8 network in distinguishing cane segments, cane roots and cane tips is improved.
[0040] 3. A TripletAttention attention mechanism is added at the end of the convnextv2 backbone network. The basic principle of the TripletAttention attention mechanism is to use a three-branch structure to capture the cross-dimensional interaction between input data, so as to calculate the attention weight. It can effectively build the mutual dependence between input channels or spatial positions, and can improve the accuracy of the recognition algorithm with relatively small calculation cost, and improve the detection accuracy of the network when facing overlapping and crossing of cane segments.
[0041] 4. The original YOLOV8 network head is replaced by an EfficientHead lightweight detection head, which generates more features with fewer parameters, consumes less computing resources, and reduces network detection time.
[0042] 5. The application can solve the problem of the curved layer of cane segments in the transport vehicle by intelligently calculating the number of cane segments using the cone volume formula based on the natural angle of repose and the height of the cane segment accumulation.
[0043] 6. Through the information transmission between the device and the two-dimensional code, the detection information can be associated with the two-dimensional code in real time, and the data can be transmitted to the two-dimensional code after the transport vehicle is weighed by the sugar mill, so that the impurity content of the cane segments in the vehicle can be calculated directly without wasting manpower and time for estimation.
[0044] 7. The application can effectively solve the problem of impurity content of cane segments in the transport vehicle, greatly saving the labor cost and time cost of manual estimation of impurity content, and scientifically calculating the impurity content, which has important significance for promoting the mechanization and intelligentization of the whole process of sugarcane planting management. BRIEF DESCRIPTION OF DRAWINGS
[0045] Figure 1 The figure is a schematic diagram of the logical flow of the method of the application.
[0046] Figure 2 The figure is a structure diagram of the convnextv2 backbone network; in the figure, Input is the input data, Dconv is the depth separable convolution, LayerNorm is the normalization layer, Conv1 is the convolution operation on the image after the normalization layer, Conv2 is the convolution operation on the image after the response normalization layer, GELU is the activation function, GRN is the global response normalization layer, and Output is the output data.
[0047] Figure 3 The figure is a flowchart of the TripletAttention attention mechanism; in the figure, Input Tensor is the input data, W and H are spatial dimensions, C is the channel dimension, Z-Pool is the pooling layer, Conv is the convolution operation, Sigmoid is the activation function, Avg is the average aggregation operation, and Permutation is the output permutation operation. DETAILED DESCRIPTION
[0048] The application will be described in further detail below in conjunction with the embodiments and the accompanying drawings, but the embodiments of the application are not limited thereto.
[0049] As Figure 1As shown, the embodiment discloses a method for detecting the impurity content of cut sugarcane segments in a sugarcane segment transport vehicle, which comprises the following steps:
[0050] Step one: The experimental data in this experiment were collected in a sugarcane planting base in Suixi County, Zhanjiang City, Guangdong Province, and were shot by an industrial camera of Hikvision. In order to collect the data set and provide visual algorithm feature recognition detection, the sugarcane segments, sugarcane tops and sugarcane roots in the sugarcane segment transport vehicle were distinguished. First, the features of the detected objects were defined. Sugarcane segment: the sugarcane segment cut by the sugarcane segment harvester, the color is between dark green and light yellow, the length is 35cm-38cm, and the width is 5cm-6cm. Sugarcane top: composed of slender green leaves, the leaves have soft and tender texture, and the edges are wavy or serrated. Sugarcane root: it is born on the root point of each node of the stem, the root of the sugarcane segment is cylindrical, the surface is smooth, the color is light yellow to light brown, with fine root hairs, and the texture is tough and flexible. According to the above characteristics, the sugarcane segment, sugarcane top and sugarcane root were distinguished.
[0051] Step two: The images shot by the industrial camera were preprocessed, and the initial shot sugarcane segment image was randomly cropped into a local enlarged image with an image size of 416*416 pixels resolution. First, a random function was used to generate the region coordinates of the upper left corner and the lower left corner of the initial shot sugarcane segment image, then the region coordinates of the upper right corner and the lower right corner of the sugarcane segment image were generated according to the image size, and finally the initial sugarcane segment image was cropped to obtain the sugarcane segment local enlarged image according to the generated region coordinates. Then the training set was manually labeled and the boundary box was drawn for the sugarcane segment using LabelImg software. In order to ensure the robustness and accuracy of the improved YOLOV8 network in different environments, MixUp data enhancement was performed, and Numpy scientific calculation tool was used to rotate, scale, flip, motion blur, Gaussian noise, random brightness and other operations on the data, so that the original 200 images were expanded to 1500 images.
[0052] Step three: The enhanced data set was input into the improved YOLOV8 network which had been trained. The improved YOLOV8 network mainly consists of three parts: Backbone, Neck and Head. Backbone is a feature extraction network, its role is to extract the information in the image for the use of the following network. The improved YOLOV8 network replaces the original CSPDarkNet53 backbone network of Backbone with a convnextv2 backbone network. The network structure of the convnextv2 backbone network is as follows: Figure 2, first input the image into the Dconv module, under the same amount of calculation, the Dconv module can make the neural network deeper, enhance the perception ability of features. Through LayerNorm normalization to improve the training effect and generalization ability of the backbone network, and then through Conv1 to extract the information in the input image. Then through the GELU activation function, this activation function helps the backbone network to improve the convergence speed and performance in the training process. GRN global response normalization layer is conducive to image feature extraction, and then through Conv2 again to extract the information in the input image output. The Convnextv2 backbone network is specially designed for self-supervised learning, by designing a new global response normalization layer, enhancing feature recognition, this backbone network can capture channel features, improve the detection accuracy of the network when detecting sugarcane segments of different sizes, and improve the recognition accuracy of YOLOV8 network in distinguishing sugarcane segments, sugarcane roots and sugarcane shoots.
[0053] Add TripletAttention attention mechanism at the end of the Convnextv2 backbone network, the basic principle of TripletAttention attention mechanism is to use a three-branch structure to capture the cross-dimensional interaction between input data, so as to calculate the attention weight, which can build the mutual dependence between input channels or spatial positions, as shown in Figure 3 The input data is first processed through three branches, where the upper branch is responsible for calculating the spatial dimension W and the channel dimension C, then the data is Z-Pool pooled, and a Conv convolution operation and a Sigmoid activation function are used to generate the attention weight. The middle branch is responsible for capturing the relationship between the channel dimension C and the spatial dimension W and the spatial dimension H, and the operations after it are the same as the upper branch, that is, Z-Pool pooling, Conv convolution and Sigmoid activation function to generate attention weight file, the lower branch is responsible for capturing the dependence between spatial dimensions. This branch maintains the identity of the input, after Z-Pool pooling and Conv convolution operation, it also uses Sigmoid function to generate attention weight. After each branch generates attention weight, Permutation is used for output permutation operation, then the outputs of the three branches are averaged to aggregate, and finally the triple attention output is obtained. So as to improve the detection accuracy of the network when facing overlapping and crossing sugarcane segments.
[0054] Neck is placed between Backbone and Head, which uses the PANet structure to utilize the features extracted by Backbone and plays a role in feature fusion. Head is used to make recognition using the features extracted in the previous step. In this part, the original YOLOV8 network Head is replaced by EfficientHead lightweight detection head to reduce network parameters and computational complexity, and reduce network detection time. The improved YOLOV8 network has an average precision of 87.2%, which is 12.5% higher than the original YOLOV8 network, with a size of 15.9MB and a detection time of 8.3ms.
[0055] Step four: improve the YOLOV8 network to process the images and videos collected by the industrial camera, identify the cane segments and count the number of cane segments in the current scanning layer. The current scanning layer refers to the situation that the industrial camera shoots the surface of the cane segments in the truck box. The number of cane segments in the whole vehicle is calculated according to the following formula, as follows:
[0056]
[0057] In the formula: N1 represents the number of cane segments counted in the scanning layer. N is the number of shooting points for shooting the panoramic cane segment image in the truck. K is the shooting point index, which represents the number of cane segment images in the Kth shooting point. M is the number of images after image segmentation of each shooting point. P is the image segmentation index, which represents the Pth segmented image. X KP represents the number of cane segments in the Pth segmented image in the Kth shooting point.
[0058] This formula indicates that after each original image of N shooting points is segmented into M images, the number of cane segments in the segmented images is accumulated, so as to obtain the total number of cane segments N1 in all shooting points.
[0059] Step five: when the scanning layer appears as a curved layer, the volume of the curved layer is divided into the volume of the accumulated cone and the volume of the cuboid. When the cane segments are stacked, the volume of the accumulated cone is calculated according to the natural angle of repose and the height of the cane segment stacking, and the number of cane segments is calculated after conversion, as follows:
[0060] The volume calculation formula of the stacked cane segments in the truck is:
[0061]
[0062] In the formula: v is the volume of the stacked cane segments, π is the circular constant, h is the height of the stacked cane segments, and θ is the natural angle of repose.
[0063] The number calculation formula of the stacked cane segments in the truck is:
[0064]
[0065] In the formula: N2 is the number of stacked cane segments, v is the volume of the stacked cane segments, π is the circular constant, D is the average diameter of the cane segments, and L is the average length of the cane segments.
[0066] Step six: Calculate the total mass of the cane segments according to the following formula:
[0067] The formula for calculating the weight of the cane segments in the transport vehicle is:
[0068]
[0069] In the formula: M ZD is the weight of the cane segments, ρ is the average density, N1 is the number of scanned cane segments, N2 is the number of stacked cane segments, D is the average diameter of the cane segments, L is the average length of the cane segments, and π is the circular constant.
[0070] The transport vehicle is attached with a two-dimensional code label, and the two-dimensional code label on the vehicle is associated with the edge computing device to obtain the number information of the cane segments in the vehicle. When the transport vehicle arrives at the sugar factory and the total weight of the vehicle is measured by the platform scale, the two-dimensional code label on the vehicle is scanned, and the two-dimensional code label is associated with the total weight of the transport vehicle and the impurity content information of the cane segments. The number information of the cane segments in the vehicle includes the number information of the scanned cane segments in the scanning layer obtained after scanning by the industrial camera and the number information of the cane segments in the curved layer converted through the natural stop angle and the height of the stacked cane segments.
[0071] The formula for calculating the total weight of the cane segments and impurities in the transport vehicle is:
[0072] M A = M C - M K
[0073] In the formula: M A is the total weight of the cane segments and impurities, M C is the total weight of the transport vehicle, and M K is the total weight of the empty transport vehicle.
[0074] The formula for calculating the weight of the impurities in the transport vehicle is:
[0075] M Z = M A - M ZD
[0076] In the formula: M Z is the weight of the impurities, M A is the total weight of the cane segments and impurities, and M ZD is the weight of the cane segments.
[0077] The formula for calculating the impurity content of the cane segments in the transport vehicle is:
[0078]
[0079] wherein: Q is the impurity content, M A is the total weight of the sugar segment and impurities, M Z is the weight of the impurities.
[0080] The above examples are the preferred embodiments of the present application, but the embodiments of the present application are not limited to the above examples, and any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present application are equivalent replacement methods and are included in the protection scope of the present application.
Claims
1. A method for detecting the impurity content of a cut cane segment in a road transport vehicle, characterized in that, The method comprises the following steps: 1) Obtain cane segment image data for preprocessing to obtain uniform size local magnification images of cane segments, and obtain an enhanced data set after data enhancement of the local magnification images of the cane segments; 2) Input the enhanced data set into an improved YOLOV8 network that has been trained, identify and count the cane segments in the transport vehicle, and obtain the number of cane segments in the transport vehicle; wherein the specific improvements of the improved YOLOV8 network include: replacing the original CSPDarkNet53 backbone network with a convnextv2 backbone network to improve the detection accuracy of the network when detecting cane segments of different sizes and the recognition accuracy of the network in distinguishing cane segments, cane roots and cane tips, while adding a TripletAttention attention mechanism at the end of the convnextv2 backbone network to improve the detection accuracy of the network when facing overlapping and crossing cane segments, and replacing the original detection head with an EfficientHead lightweight detection head to reduce the network detection time; The improved YOLOV8 network comprises three parts: Backbone, Neck and Head; Backbone is a feature extraction network, its role is to extract information in the image for use by the subsequent network; the improved YOLOV8 network replaces the original CSPDarkNet53 backbone network of Backbone with a convnextv2 backbone network, which is specially designed for self-supervised learning, and enhances feature recognition by designing a new global response normalization layer, the convnextv2 backbone network can capture channel features to improve the detection accuracy of the network when detecting cane segments of different sizes and the recognition accuracy of the network in distinguishing cane segments, cane roots and cane tips; at the same time, a TripletAttention attention mechanism is added at the end of the convnextv2 backbone network, the TripletAttention attention mechanism uses a three-branch structure to capture cross-dimensional interactions between input data to calculate attention weights, which can build interdependence between input channels or spatial positions to improve the detection accuracy of the network when facing overlapping and crossing cane segments; Neck is placed between Backbone and Head, and adopts a PANet structure, which uses the features extracted by Backbone to play a role in feature fusion; Head uses the features extracted in the front to make identification, and in this part, the original Head is replaced with an EfficientHead lightweight detection head to reduce network parameters and computational complexity, thereby reducing network detection time; 3) Calculate the weight of the cane segments according to the number of cane segments obtained, and calculate the impurity content of the cane segments in the transport vehicle.
2. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 1, characterized in that, In step 1), in order to collect the data set, the visual algorithm feature recognition detection is provided to better distinguish the cane segments, cane tops and cane roots in the transport vehicle. First, the characteristics of cane segments, cane tops and cane roots are defined, including: ① cane segments: the cane segments cut by the cane segment harvester, with a color between dark green and light yellow, a length of 35-38 cm, and a width of 5-6 cm; ② cane tops: composed of slender green leaves, with soft and tender texture, and wavy or serrated edges; ③ cane roots: born on the root points of each node of the stem, with a cylindrical shape, smooth surface, light yellow to light brown color, and small root hairs, tough and flexible texture; according to the above characteristics, the cane segments, cane tops and cane roots are distinguished, so as to meet the requirements of feature recognition and classification of the improved YOLOV8 network.
3. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 1, characterized in that, In step 1), the region coordinates of the upper left corner and the lower left corner of the cane segment image are generated using a random function, the region coordinates of the upper right corner and the lower right corner of the cane segment image are generated according to the image size, and then the cane segment image is cropped according to the generated region coordinates to obtain a fixed size of 416*416 cane segment local enlarged image, so as to improve the recognition accuracy of the improved YOLOV8 network, solve the problem of small and overlapping cane segments in the captured image, and obtain the enhanced data set after data enhancement of the obtained cane segment local enlarged image.
4. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 1, characterized in that, In step 2), the images and videos collected by the industrial camera are processed by the improved YOLOV8 network to identify the cane segments and count the number of cane segments in the current scanning layer; the current scanning layer refers to the case that the industrial camera captures the surface of the cane segments in the transport vehicle cargo box, and the number of cane segments in the whole vehicle is calculated according to the following formula, as follows: In the formula: N1 represents the number of segments in the scanning layer statistics, N is the number of shooting points for shooting the panoramic segment image in the vehicle, K is the shooting point index, indicating the segment image of the Kth shooting point, M is the number of images after segmenting each shooting point, P is the image segmentation index, indicating the Pth segmented image, X KP represents the number of segments in the Pth segmented image in the Kth shooting point; The above formula represents that after each original image of N shooting points is divided into M images, the number of cane segments in the divided images is accumulated, so as to obtain the total number of cane segments N1 of all shooting points.
5. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 4, characterized in that, When the scanning layer appears as a curved layer, the volume of the curved layer is divided into the volume of the accumulated cone and the volume of the cuboid, and when the cane segments are accumulated, the volume of the accumulated cone is calculated according to the natural angle of repose and the height of the cane segment accumulation, wherein the natural angle of repose represents the included angle between the hypotenuse and the base of the cone, and the number of cane segments is calculated after the volume is converted, as follows: The volume calculation formula of the accumulated cane segments in the transport vehicle is: In the formula, v is the volume of the accumulated cane segments, π is the circular constant, h is the height of the accumulated cane segments, and θ is the natural angle of repose. The number calculation formula of the accumulated cane segments in the transport vehicle is: In the formula, N2 is the number of accumulated cane segments, D is the average diameter of the cane segments, and L is the average length of the cane segments.
6. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 5, characterized in that, In step 3), the total mass of the cane segments is calculated according to the following formula, as follows: The weight calculation formula of the cane segments in the transport vehicle is: where M ZD is the weight of the cane segment, p is the average density, N1 is the number of cane segments counted by the scanning layer, N2 is the number of cane segments in the pile, D is the average diameter of the cane segment, L is the average length of the cane segment, and p is the circular constant.
7. The method for detecting the foreign matter content of a cut cane segment in a road transport vehicle according to claim 6, characterized in that, The transport vehicle is attached with a two-dimensional code label, and the two-dimensional code label on the vehicle is associated with the edge computing device to obtain the number information of the cane segments in the vehicle. When the transport vehicle arrives at the sugar factory and the total weight of the vehicle is measured by the weighbridge, the two-dimensional code label on the vehicle is scanned, and the two-dimensional code label is associated with the total weight of the transport vehicle and the impurity content information of the cane segments. The number information of the cane segments in the vehicle includes the number information of the scanned layer of the cane segments obtained after the industrial camera scanning and the number information of the cane segments in the curved layer converted through the natural angle of repose and the height of the stacked cane segments. The calculation formula of the total weight of the cane segments and impurities in the transport vehicle is: M A = M C - M K wherein: M A is the total weight of the sugar segment and impurities, M C is the total weight of the transport vehicle, M K is the total weight of the transport vehicle empty The calculation formula of the weight of the impurities in the transport vehicle is: M Z = M A - M ZD wherein: M Z is the weight of impurities, M ZD is the weight of cane segment; The calculation formula of the impurity content of the cane segments in the transport vehicle is: In the formula, Q is the impurity content.
Citation Information
Patent Citations
Method, device and equipment for determining impurity rate in crops, and computer storage medium
CN113469007A
Sugarcane seedling missing detection and positioning method based on improved YOLOV7
CN116883718A