A method, system and device for detecting paddy field navigation reference line

By using deep learning technology that integrates semantic segmentation network and ghost network in paddy field navigation, combined with point clustering and random sampling consistency algorithm, the navigation baseline is extracted, which solves the problem of poor navigation line extraction accuracy in paddy field navigation and realizes agricultural machinery High-precision automatic navigation and turn path planning.

CN117372327BActive Publication Date: 2024-09-03ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310826126.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2024-09-03
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

The existing automatic navigation technology based on satellite positioning in paddy field navigation has problems such as signal interference, positioning accuracy deviation and poor path planning adaptability. Moreover, a single satellite positioning sensor cannot meet the needs of agricultural intelligence. Visual navigation technology has not yet been widely used in rice transplanters. .

Method used

The deep learning network G-STDC, which combines the semantic segmentation network STDC and the ghost network GhostNet, is used, combined with images of paddy field rice transplanting operations at small pitch angles, to extract the navigation baseline through semantic segmentation and point clustering algorithms, and fit it using a random sampling consistency algorithm. Field boundary lines and auxiliary navigation lines realize automatic navigation and turning path planning of agricultural machinery.

Benefits of technology

It improves the accuracy and robustness of navigation baseline identification, provides real-time reference lines, provides precise navigation support for agricultural machinery automatic navigation and turning path planning, and meets the needs of high-precision navigation in paddy field environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117372327B
    Figure CN117372327B
Patent Text Reader

Abstract

The present invention provides a method, system and equipment for detecting a navigation baseline of a paddy field, and relates to the field of automatic navigation of agricultural machinery. The method comprises: obtaining a paddy field transplanting operation image at a small pitch angle; inputting the paddy field transplanting operation image into a deep learning network G-STDC integrating a semantic segmentation network and a ghost network, and segmenting each region in the paddy field transplanting operation image; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the optimized G-STDC blocks; according to each region, extracting a navigation baseline using a point clustering algorithm based on a central axis and a random sampling consistency algorithm; and planning automatic navigation and turning paths for agricultural machinery according to the navigation baseline. The present invention can accurately segment the transplanted area, the untransplanted area and the ridge area, and accurately extract the navigation baseline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of automatic navigation of agricultural machinery, and in particular to a method, system and equipment for detecting a paddy field navigation baseline. Background Art

[0002] In recent years, China's agricultural machinery automatic navigation technology has flourished. Among the existing automatic navigation technologies, the automatic navigation technology based on satellite positioning is relatively mature, can work all-weather, and is widely used in dryland agricultural machinery. Satellite positioning is easily interfered by surrounding buildings or trees in China's complex farmland environment, resulting in signal loss and offset. In paddy field environments, automatic navigation based on satellite positioning also has problems such as positioning accuracy deviation caused by vehicle body bumps, poor path planning adaptability caused by vehicle sideslip, and positioning failure caused by multipath effects. In addition, the ordinary single-point positioning accuracy of the current mainstream satellite positioning and navigation system is far from meeting the accuracy requirements of agriculture (for example, the horizontal positioning accuracy of the Beidou-3 basic system is better than 3m), and the satellite positioning and navigation system using high-precision positioning technology such as differential positioning technology is expensive. From the perspective of agricultural machinery intelligence, automatic navigation technology based on satellite positioning cannot independently achieve obstacle avoidance, nor can it simultaneously complete other tasks such as field information collection.

[0003] Considering the inherent defects of satellite positioning, a single satellite positioning sensor can no longer meet the performance requirements of agricultural production for the comprehensive intelligence of agricultural machinery. Studies have shown that vision has the advantages of low price and high precision, which can effectively make up for the defects of satellite navigation in paddy field navigation. However, there is no pure vision-based automatic navigation system for rice transplanters on the market. Therefore, the present invention studies the vision-based autonomous navigation technology for rice transplanters based on the working characteristics of rice transplanters.

[0004] The effect of navigation baseline extraction (path recognition) will directly affect the accuracy and robustness of visual navigation. Therefore, navigation baseline extraction is a key step in the visual navigation of the rice transplanter. The extraction of navigation baseline involves the three-dimensional information between the seedlings and the rice transplanter related to depth. The depth information extraction of the scene can be achieved through a variety of methods. At present, the more mature methods mainly include those based on structured light, time of flight (ToF), monocular, binocular and other methods. Among them, the method based on monocular camera only needs one camera and the cost is relatively low. The scene depth acquisition method based on monocular vision can be divided into motion method, shading method, focusing method, defocus method and so on.

[0005] Most of the existing navigation line extraction methods are based on machine vision and clustering algorithms. These methods have achieved certain results under specific conditions, but they are generally seriously affected by the environment such as lighting. With the development of artificial intelligence technology, the powerful generalization ability of deep learning has been increasingly recognized by people. In recent years, there have been studies on paddy field visual navigation line extraction based on deep learning. The research on combining deep learning with visual navigation of rice transplanters is not yet mature. In existing studies, researchers usually set a large pitch angle for the camera (even facing the ground), which is conducive to the target detection of seedlings. However, a large pitch angle will limit the camera's field of view, making it impossible to accurately identify different area types in the image and extract navigation lines for precise navigation. It is not conducive to the rice transplanter to respond quickly to changes in the surrounding environment when moving at high speed, and it is difficult to meet other tasks such as visual obstacle avoidance and field turning. Summary of the invention

[0006] The purpose of the present invention is to provide a paddy field navigation reference line detection method, system and device to solve the problem of low recognition accuracy of different area types in an image and poor navigation line extraction accuracy.

[0007] To achieve the above object, the present invention provides the following solutions:

[0008] A paddy field navigation baseline detection method, comprising:

[0009] Acquire a paddy field rice transplanting operation image at a small pitch angle; the small pitch angle is a pitch angle lower than a set pitch angle threshold;

[0010] The paddy field transplanting operation image is input into the deep learning network G-STDC which integrates the semantic segmentation network STDC and the ghost network GhostNet, and each area in the paddy field transplanting operation image is segmented; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by the optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step size of 2 and a G-STDC module with a step size of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the area includes the transplanted area, the untransplanted area and the ridge area;

[0011] According to each of the areas, a navigation reference line is extracted using a point clustering algorithm based on a central axis and a random sampling consistency algorithm; the navigation reference line includes a ridge boundary line and an auxiliary navigation line;

[0012] The agricultural machinery is automatically navigated and the turning path is planned according to the navigation baseline.

[0013] Optionally, the training process of the deep learning network G-STDC specifically includes:

[0014] Collect multiple videos of rice planting operations in paddy fields at different times, select a variety of environmental noise scenes, and generate image datasets;

[0015] Preprocessing the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chromaticity adjustment, random saturation adjustment and Z-Score standardization;

[0016] Performing data annotation on the preprocessed image according to a computer vision automatic annotation tool to generate a grayscale image containing annotated true labels; the annotated true labels include a transplanted area, an untransplanted area, and a ridge area;

[0017] The deep learning network G-STDC is trained according to the grayscale image.

[0018] Optionally, according to each of the areas, a navigation baseline is extracted using a central axis-based point clustering algorithm and a random sampling consistency algorithm, specifically including:

[0019] Taking the ridge area as the foreground and the transplanted area and the untransplanted area as the background, a binary image of the ridge is generated;

[0020] Using morphological opening operation on the binary image of the field ridge to remove isolated noise points, so as to generate a processed binary image of the field ridge;

[0021] Use the findcontours function to return the outer contour of the ridge area, generate the contour of the ridge area and the number of each contour, and retain the longest contour;

[0022] Based on the outer contour of the ridge area, using a central axis-based point clustering algorithm, traverse each column of the processed ridge binary image from the horizontal central axis of the processed ridge binary image to the upper and lower sides, and select the contour point closest to the horizontal central axis as the clustering point;

[0023] According to the cluster points, the field ridge boundary line is fitted and generated by using a random sampling consensus algorithm.

[0024] Optionally, according to each of the areas, a navigation baseline is extracted using a central axis-based point clustering algorithm and a random sampling consistency algorithm, specifically including:

[0025] Taking the transplanted rice area as the foreground and the ridge area and the untransplanted rice area as the background, a transplanted rice binary image is generated;

[0026] Using morphological opening operation on the transplanted rice binary image to remove isolated noise points, so as to generate a processed transplanted rice binary image;

[0027] Using the findcontours function to return the outer contour of the transplanted area, generate the contour of the ridge area and the number of each contour, and retain the longest contour;

[0028] Based on the outer contour of the transplanted area, using a central axis-based point clustering algorithm, traverse each column of the processed transplanted binary image from the horizontal central axis of the processed transplanted binary image to the upper and lower sides, and select the contour point closest to the horizontal central axis as the clustering point;

[0029] According to the cluster points, an auxiliary navigation line is generated by fitting using a random sampling consistency algorithm.

[0030] A paddy field navigation baseline detection system, comprising:

[0031] A paddy field transplanting operation image acquisition module is used to acquire paddy field transplanting operation images at a small pitch angle; the small pitch angle is a pitch angle lower than a set pitch angle threshold;

[0032] A region segmentation module is used to input the paddy field transplanting operation image into a deep learning network G-STDC that integrates a semantic segmentation network STDC and a ghost network GhostNet, and segment out various regions in the paddy field transplanting operation image; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step length of 2 and a G-STDC module with a step length of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the regions include transplanted regions, untransplanted regions and ridge regions;

[0033] A navigation reference line module is used to extract a navigation reference line according to each of the areas by using a point clustering algorithm based on a central axis and a random sampling consistency algorithm; the navigation reference line includes a ridge boundary line and an auxiliary navigation line;

[0034] The automatic navigation and turning path planning module is used for automatic navigation and turning path planning of the agricultural machinery according to the navigation reference line.

[0035] Optionally, the training process of the deep learning network G-STDC specifically includes:

[0036] The image dataset generation module is used to collect multiple videos of rice planting operations in paddy fields at different times, select multiple environmental noise scenes, and generate image datasets;

[0037] A preprocessing module, used to preprocess the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chroma adjustment, random saturation adjustment and Z-Score standardization;

[0038] A data labeling module is used to label the preprocessed image according to a computer vision automatic labeling tool to generate a grayscale image containing the labeled real labels; the labeled real labels include the transplanted area, the untransplanted area and the ridge area;

[0039] A training module is used to train the deep learning network G-STDC according to the grayscale image.

[0040] Optionally, the navigation reference line extraction module specifically includes:

[0041] A ridge binary image generating unit is used to generate a ridge binary image with the ridge area as the foreground and the transplanted area and the untransplanted area as the background;

[0042] A processed field ridge binary image generating unit is used to remove isolated noise points from the field ridge binary image by using morphological opening operation to generate a processed field ridge binary image;

[0043] The outer contour returning unit of the ridge area is used to use the findcontours function to return the outer contour of the ridge area, generate the contour of the ridge area and the number of each contour, and retain the longest contour;

[0044] A first cluster point selection unit is used to traverse each column of the processed ridge binary image from the horizontal center axis of the processed ridge binary image to the upper and lower sides based on the external contour of the ridge area and use a point clustering algorithm based on the central axis to select the contour point closest to the horizontal center axis as the cluster point;

[0045] The ridge boundary line generation unit is used to generate the ridge boundary line by fitting according to the cluster points using a random sampling consensus algorithm.

[0046] Optionally, the navigation reference line extraction module specifically includes:

[0047] A rice transplanting binary image generating unit is used to generate a rice transplanting binary image with the rice transplanting area as the foreground and the ridge area and the un-planted area as the background;

[0048] A processed rice transplanting binary image generating unit is used to remove isolated noise points from the rice transplanting binary image by using morphological opening operation to generate a processed rice transplanting binary image;

[0049] An external contour generating unit of the transplanted area is used to use a findcontours function to return the external contour of the transplanted area, generate the contour of the ridge area and the number of each contour, and retain the longest contour;

[0050] A second cluster point selection unit is used to traverse each column of the processed transplanted rice seedlings binary image from the horizontal center axis of the processed transplanted rice seedlings binary image to the upper and lower sides based on the outer contour of the transplanted rice seedlings area and use a point clustering algorithm based on the central axis to select the contour point closest to the horizontal center axis as the cluster point;

[0051] The auxiliary navigation line generating unit is used to generate the auxiliary navigation line by fitting according to the cluster points using a random sampling consistency algorithm.

[0052] An electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the paddy field navigation baseline detection method.

[0053] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the paddy field navigation baseline detection method is implemented.

[0054] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the present invention provides a paddy field navigation baseline detection method, system and equipment. First, the present invention integrates the semantic segmentation network STDC and the ghost network GhostNet to generate a deep learning network G-STDC, which accurately segments the transplanted area, the untransplanted area and the ridge area; secondly, the present invention accurately extracts the navigation baseline based on the central axis point clustering algorithm and the random sampling consistency algorithm, providing a real-time reference line for automatic navigation and turning path planning of agricultural machinery. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0056] Figure 1 A flow chart of the paddy field navigation baseline detection method provided by the present invention;

[0057] Figure 2 This is a structural diagram of the GM module provided by the present invention;

[0058] Figure 3 The G-STDC block structure diagram provided by the present invention;

[0059] Figure 4 The G-STDC network framework diagram provided by the present invention;

[0060] Figure 5 This is a schematic diagram of the field ridge boundary line fitting provided by the present invention; wherein, Figure 5 (a) is a schematic diagram of a binary image of a ridge; Figure 5 (b) is a schematic diagram of the outer contour of the ridge area; Figure 5 (c) is a schematic diagram of traversal of the binary image of the ridge based on the horizontal central axis; Figure 5 (d) is a schematic diagram of the field boundary line;

[0061] Figure 6 This is a schematic diagram of the auxiliary navigation line fitting provided by the present invention; wherein, Figure 6 (a) is a schematic diagram of a transplanted rice seedling binary image; Figure 6 (b) is a schematic diagram of the outer contour of the transplanted area; Figure 6 (c) is a schematic diagram of traversal of the transplanted binary image based on the horizontal center axis; Figure 6 (d) is a schematic diagram of the auxiliary navigation line;

[0062] Figure 7 The overall schematic diagram of the algorithm of the paddy field navigation baseline detection method provided by the present invention;

[0063] Figure 8 This is a schematic diagram of the baseline extraction evaluation index provided by the present invention. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] The purpose of the present invention is to provide a paddy field navigation baseline detection method, system and equipment, which can accurately segment the transplanted area, the untransplanted area and the ridge area and accurately extract the navigation baseline, so as to provide a real-time reference line for the automatic navigation and turning path planning of agricultural machinery.

[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0067] Embodiment 1

[0068] like Figure 1 As shown, the present invention provides a paddy field navigation baseline detection method, comprising:

[0069] Step 101: Acquire a paddy field rice transplanting operation image at a small pitch angle; the small pitch angle is a pitch angle lower than a set pitch angle threshold.

[0070] Step 102: Input the paddy field transplanting operation image into the deep learning network G-STDC that integrates the semantic segmentation network STDC and the ghost network GhostNet, and segment the various regions in the paddy field transplanting operation image; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step size of 2 and a G-STDC module with a step size of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the regions include transplanted regions, untransplanted regions and ridge regions.

[0071] In practical applications, the training process of the deep learning network G-STDC specifically includes: collecting multiple videos of different paddy field transplanting operations at different times, selecting multiple environmental noise scenes, and generating an image data set; preprocessing the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chromaticity adjustment, random saturation adjustment, and Z-Score standardization; data annotation is performed on the preprocessed images according to a computer vision automatic annotation tool to generate a grayscale image containing annotated real labels; the annotated real labels include a transplanted area, an untransplanted area, and a ridge area; and the deep learning network G-STDC is trained according to the grayscale image.

[0072] Furthermore, the training process of the deep learning network G-STDC is as follows:

[0073] 1) Image acquisition process.

[0074] The dataset used in the present invention contains multiple videos collected during different paddy field transplanting operations at different times. Various environmental noise scenes are selected, such as multiple wheel textures, high exposure, high turbidity, multiple shadows, multiple weeds and other noises. The original video resolution is 1280×1024 and the frame rate is 30FPS. The specific data sources are shown in Table 1, and this group of data is named PlantSeg dataset.

[0075] Table 1 Basic information of the dataset

[0076]

[0077] 2) Image standardization process.

[0078] Good image preprocessing methods can significantly improve the segmentation results of convolutional neural networks. Through image preprocessing, the data set can be enhanced while ensuring uniform data distribution and reducing overfitting.

[0079] For each input image, random flipping, random brightness adjustment, random contrast adjustment, random chromaticity adjustment, random saturation adjustment and Z-Score standardization are performed. Among them, Z-Score standardization is a common method for data standardization. After processing, the mean of the data is 0 and the standard deviation is 1. The formula is:

[0080]

[0081] Among them, x is the input data, z is the standardized data, μ is the data mean, and δ is the data standard deviation.

[0082] The present invention randomly samples 500 pictures in the data set, and calculates the mean and standard deviation of the pixels by color channel. The obtained parameters are shown in Table 2.

[0083] Table 2 Z-Score standardization parameters

[0084]

[0085] 3) Image labeling process.

[0086] For supervised learning networks, data needs to be annotated in advance. Data annotation is performed using the Computer Vision Annotation Tool (CVAT). After CVAT is set up on the server, the web terminal of CVAT is accessed through a browser, and online annotation of data can be completed on the web page. The image segmentation task in the present invention is to separate the transplanted area, the untransplanted area, and the ridge area, that is, the annotated true label is a grayscale image containing three values.

[0087] 4) Image training parameter process.

[0088] The network training process is carried out in the local base station. The base station operating system is Win10, and the graphics processing unit (GPU) is NVIDIA GeForce RTX 3090, which has 10496 CUDA cores and 24GB video memory. During training, 60% of the images in the dataset are randomly selected as training sets, 20% as test sets, and 20% as validation sets.

[0089] Furthermore, in the process of applying deep neural networks to mobile devices, how to ensure that the performance is not reduced and the amount of calculation is reduced has become one of the research focuses. Common methods include pruning, quantization, distillation, and designing some efficient and lightweight neural networks. At present, many classic and efficient lightweight convolutional neural networks have emerged, such as MobileNet, ShuffleNet, GhostNet, etc. Among them, GhostNet is the most efficient. Its core idea is to use simple linear operations to replace expensive convolution operations, that is, to reduce network parameters and calculations while ensuring network accuracy, thereby improving calculation speed and reducing latency.

[0090] The core of GhostNet is the Ghost Module (GM), which is implemented in three steps: conventional convolution, ghost feature generation, and feature map concatenation. Figure 2 shown.

[0091] use represents the input feature map, where c is the number of channels of the input feature map, h and w are the height and width of the input feature map respectively, and the number of channels of the target output feature map is n.

[0092] First, use conventional convolution (conv) to get the intrinsic feature map Y intrinsic , the number of channels is n / s, see formula (2).

[0093] Then Y intrinsic The feature map of each channel uses linear operations to generate the ghost feature map Y ghost , the number of channels is (s-1)×n / s. Φ is a linear operation, which here represents a depthwise separable convolution, see formula (3).

[0094] Finally, the intrinsic feature map obtained in the first step and the ghost feature map obtained in the second step are concatenated to obtain the final feature map Y, with the number of channels being n, as shown in formula (4).

[0095] Y intrinsic =Conv(X) (2)

[0096] Y ghost =Φ(Y intrinsic) (3)

[0097] Y = Concat(Y intrinsic +Y ghost ) (4)

[0098] Here, s represents the acceleration ratio compared with conventional convolution, that is, the computational complexity and parameter amount of a single GM module are reduced to 1 / s times of a single-layer conventional convolution.

[0099] The present invention introduces a ghost module (GM) for the original STDC module to obtain a G-STDC module, and replaces all convolution modules in the original STDC module with ghost modules. In order to reduce the computational cost, each G-STDC block contains a G-STDC module with a step size of 2 and a G-STDC module with a step size of 1 to deepen the feature extraction network, such as Figure 3 shown.

[0100] Among them, G-STDC Block is the G-STDC block, G-STDC Module is the STDC module, stride is the stride, Avg-Pooling3x3 is the global average pooling operation with a kernel size of 3×3, Cat is the splicing operation, and N is the number of channels.

[0101] The optimized G-STDC block is integrated into the original STDC network framework, as Figure 4 As shown in Figure 1, the 3rd, 4th, and 5th convolutional blocks of the backbone network in the original STDC network framework are replaced by the original STDC blocks with the optimized G-STDC blocks.

[0102] Figure 4 In it, GAP (Global Average Pooling) represents the global average pooling operation, ARM (Attention Refine Module) represents the attention refinement module, which is used to measure the importance of each channel on the feature map, FFM (Feature Fusion Module) represents the feature fusion module, Seg Head represents the auxiliary segmentation head, Seg Loss represents the segmentation loss function, Edge Head represents the auxiliary head of the detail aggregation module, Edge Loss represents the loss function of the detail aggregation module, and c represents the number of output channels of each layer.

[0103] Figure 4The solid line frame in the middle is the backbone network, which contains five convolution blocks, two regular convolution blocks and three G-STDC blocks, which participate in both training and reasoning stages. The feature maps output by the fourth and fifth convolution blocks contain more semantic information after ARM, forming semantic features. The feature maps output by the first three convolution blocks contain more image detail information, forming detail features. After the semantic features and detail features are fused through FFM, the nearest neighbor interpolation upsampling is used to output the final segmentation map, that is, the prediction result.

[0104] Among them, the dotted boxes are two auxiliary networks, which only participate in the training stage, can enhance the feature representation in the training stage, and do not increase the computational cost of the reasoning stage. The feature map after FFM and the two feature maps after ARM are compared with the true label through SegHead to calculate Seg Loss. The network uses the detail aggregation module to train the third-layer convolution block to improve the ability of low-level feature maps to extract image detail information. The feature map output by the third convolution block is passed through the Edge Head to obtain the output and compare it with the true value of the edge to calculate Edge Loss. It is worth noting that the final number of channels output by the Seg Head is the number of segmented categories. The present invention is divided into three categories, so the number of channels here is 3; and the number of channels output by the Edge Head is 1, which is the confidence of the edge.

[0105] In addition, the present invention also designs some micro models, which lighten the network model by changing the number of channels c in each layer, and analyzes and obtains the optimal network model.

[0106] Step 103: extracting navigation reference lines according to each of the areas using a central axis-based point clustering algorithm and a random sampling consistency algorithm; the navigation reference lines include ridge boundary lines and auxiliary navigation lines.

[0107] In practical applications, the step 103 specifically includes: taking the ridge area as the foreground and the transplanted area and the untransplanted area as the background, generating a ridge binary image; using a morphological opening operation to remove isolated noise points from the ridge binary image to generate a processed ridge binary image; using a findcontours function to return the outer contour of the ridge area, generating the contour of the ridge area and the number of each contour, and retaining the longest contour; based on the outer contour of the ridge area, using a central axis-based point clustering algorithm, traversing each column of the processed ridge binary image from the horizontal center axis of the processed ridge binary image to the upper and lower sides, and selecting the contour point closest to the horizontal center axis as the clustering point; according to the clustering point, using a random sampling consistency algorithm to fit and generate the ridge boundary line.

[0108] In practical applications, the step 103 specifically includes: taking the transplanted area as the foreground and the ridge area and the unplanted area as the background, generating a transplanted binary image; using a morphological opening operation to remove isolated noise points from the transplanted binary image to generate a processed transplanted binary image; using a findcontours function to return the outer contour of the transplanted area, generating the contour of the ridge area and the number of each contour, and retaining the longest contour; based on the outer contour of the transplanted area, using a central axis-based point clustering algorithm, traversing each column of the processed transplanted binary image from the horizontal center axis of the processed transplanted binary image to the upper and lower sides, and selecting the contour point closest to the horizontal center axis as the clustering point; according to the clustering point, using a random sampling consistency algorithm to fit and generate an auxiliary navigation line.

[0109] Step 104: Automatically navigate the agricultural machinery and plan a turning path according to the navigation baseline.

[0110] Furthermore, the target navigation reference line of the present invention has two conditions, namely, the ridge boundary line and the auxiliary navigation line (ie, the rice seedling boundary line).

[0111] Since it is a three-classification problem, the output value of the convolutional neural network in the previous section is a grayscale image of (0, 1, 2), where pixels with a value of 0 represent unplanted areas, pixels with a value of 1 represent planted areas, and pixels with a value of 2 represent ridge areas.

[0112] The transplanted area and the ridge area are used as the foreground for image segmentation. The baseline is extracted using the central axis-based point clustering algorithm and the random sample consensus (RANSAC) algorithm. When the ridge area is used as the foreground, the ridge boundary line is extracted; when the transplanted area is used as the foreground, the auxiliary navigation line is extracted.

[0113] The specific process when the ridge area is used as the foreground is as follows: (1) Both the planted area and the unplanted area are used as the background, and a binary image of the ridge is obtained, such as Figure 5 (a) in the figure; (2) the morphological opening operation is used to remove small isolated noise points on the binary image of the ridge, and then the findcontours function is used to return the outer contour of the ridge area, and the contour of the ridge area and the number of each contour are obtained, and the longest contour is retained, as shown in Figure 5 (b) in (3) traverse each column of the image from the horizontal central axis of the image to the upper and lower sides, and select the contour point closest to the horizontal central axis as the cluster point, as shown in Figure 5 (c) in Figure 4; (4) Finally, the RANSAC (RANdom SAmple Consensus) algorithm is used to fit the straight line to obtain the predicted ridge boundary line, as shown in Figure 4. Figure 5 As shown in (d) in .

[0114] The specific process when the transplanted area is used as the foreground is as follows: (1) The ridge area and the untransplanted area are both the background, and the transplanted binary image is obtained, such as Figure 6 (a) in the figure; (2) the morphological opening operation is used to remove tiny isolated noise points on the transplanted binary image, and then the findcontours function is used to return the outer contour of the transplanted area, and the contour of the transplanted area and the number of each contour are obtained, and the longest contour is retained, as shown in Figure 6 (b) in (3) traverse each row of the image from the longitudinal center axis to the left and right sides, and select the contour point closest to the longitudinal center axis as the cluster point, as shown in Figure 6 (c) in (4); Finally, the straight line is fitted using the RANSAC (random sampling consensus) algorithm to obtain the predicted auxiliary navigation line, as shown in Figure 6 As shown in (d) in .

[0115] The principle of the RANSAC algorithm is as follows: (1) randomly select two points from the cluster point set; (2) fit a straight line to the two points to obtain the slope and intercept of the straight line, which are recorded as the initial model; (3) calculate the distance from other points to the initial model. If the distance is less than a threshold, the point is regarded as an inlier and the number of inliers is counted; (4) repeat M times and select the model with the most inliers; (5) refit the straight line using all inliers. In the present invention, M is set to 20 times.

[0116] In summary, the overall process of the present invention is: (1) inputting the original image into the deep learning network G-STDC that integrates the STDC network and GhostNet to obtain a grayscale image, and realizing accurate and effective segmentation of the transplanted area, the untransplanted area and the ridge area; (2) extracting auxiliary navigation lines and ridge boundary lines from the grayscale image using a multi-line detection method that integrates the central axis-based point clustering algorithm and the RANSAC algorithm, which can provide real-time reference lines for automatic navigation and turning path planning of agricultural machinery. Figure 7 shown.

[0117] In practical applications, the evaluation indicators of the deep learning network G-STDC are as follows:

[0118] The performance indicators for measuring the segmentation accuracy of the deep learning network G-STDC are:

[0119]

[0120] Among them, TP is a true positive example, FN is a false negative example, FP is a false positive example, and mIoU reflects the intersection-over-union ratio between the true value prediction values ​​in each category.

[0121] In addition to the segmentation accuracy index, the processing costs in memory, computing, and time are reflected in the weights (Weights, millions of units), floating-point operations (FLOPs, giga units), and inference time (FPS). The lower the weights and floating-point operations, the better, indicating that the network is more lightweight, with low hardware requirements, and more conducive to model deployment on low-end hardware. The higher the FPS index, the better, indicating that the network runs faster and is more real-time.

[0122] In practical applications, the baseline extraction evaluation indicators are as follows:

[0123] The present invention selects attitude error and distance error as evaluation indicators for evaluating the accuracy of boundary line detection. The attitude error is the angle between the real baseline and the predicted baseline, denoted by θ. The predicted baseline is vertically projected onto the real baseline at two intersection points on the image boundary, and two distance values ​​are obtained, denoted by d1 and d2 respectively. The distance error is defined as the average of d1 and d2, denoted by d. Figure 8 The average of the pose error and distance error of all images is used to evaluate the performance of the model.

[0124] 1) Experimental results.

[0125] Benchmark model selection:

[0126] Five classic semantic segmentation networks are trained and evaluated on the PlantSeg dataset with an input image size of 512x640, as shown in Table 3.

[0127] Table 3 Performance of existing models on PlantSeg

[0128]

[0129] The first two models (PSPNet, DANet) focus on high precision, and the latter two models (MobileNetV3, BiseNetV2) focus on lightweight. Compared with the first two high-precision models, STDC has little difference in accuracy, but significantly higher FPS, and significantly lower Weights and FLOPs; compared with the latter two lightweight models, STDC has slightly higher Weights and FLOPs than the MobileNetV3 network, and its FPS is also slightly different, but its accuracy is significantly higher than these two lightweight models. In summary, the present invention selects the STDC model as the benchmark model and optimizes and improves it on this basis.

[0130] 2) Analysis of experimental results.

[0131] In order to explore the potential of the Ghost module in the proposed G-STDC module, the acceleration ratio s is selected to find the most suitable ratio. When the number of channels is 1024, s = 0, 2, and 4 are trained respectively. The input image size is 512x640, and the following results are obtained.

[0132] Table 4 Network performance table with different acceleration ratios

[0133]

[0134]

[0135] As shown in Table 4, as the speedup ratio s increases, the number of network weights and floating-point operations continue to decrease. It is not difficult to reduce the size of the network. The key is how to maintain satisfactory accuracy while processing quickly. The Ghost module uses a simple linear transformation of groups, where group convolution can be seen as a decoupling of the original convolution operation, improving the sparsity between filters in the original convolution operation, and playing a regularization role to a certain extent. This is also the reason why G_STDC performs better than STDC.

[0136] In addition, it is noted that when s=2, the accuracy of the G-STDC module increases to 95.23%, the Weights and FLOPs are significantly reduced, and the FPS also increases accordingly. Each indicator is more optimized than the original STDC. However, when s=4, although the FPS, Weights and FLOPs of the G-STDC model are optimized, the accuracy decreases significantly. This is because although a large s value can reduce the computational cost, it will cause instability due to the lack of cross-channel information fusion. Therefore, the present invention selects an acceleration ratio of 2.

[0137] The more channels a network has, the better it is. This is because the more channels a network has, the more computation it will require, which will affect the operating efficiency. We know that for a model, shallow features are very important, so the number of channels in the shallow layer of the network is a very sensitive factor. In order to explore the potential of different numbers of channels in the proposed G-STDC module, different numbers of channels are selected, such as Figure 3As shown in the figure, the number of output channels of each layer in the backbone network is marked as a multiple of c, where c represents the number of channels when the last G-STDC block is input to GAP. We design four groups of optional values ​​of c from high to low, namely 1024, 512, 256, and 128. When c = 1024, the number of channels on the corresponding backbone network changes to (32, 64, 256, 512, 1024); when c = 512, the number of channels on the corresponding backbone network changes to (16, 32, 64, 256, 512); when c = 256, the number of channels on the corresponding backbone network changes to (8, 16, 64, 128, 256); when c = 256, the number of channels on the corresponding backbone network changes to (8, 16, 32, 64, 128).

[0138] Table 5 Network performance table with different channel numbers

[0139]

[0140]

[0141] As shown in Table 5, the proposed model is faster than the original model. When the number of channels of the model is reduced from 1024 to 128, the weights and FLOPs are significantly reduced, the speed is also significantly increased, and the accuracy decreases as expected. This is because the reduction in the number of channels makes it more difficult for each layer to learn richer features, which in turn affects the accuracy. Note that G-STDC s=2c=128 has the least weights and FLOPs, with only 1.98M parameters, which is likely to provide real-time computing and be deployed on edge devices. At the same time, its running speed is also the highest, reaching 57.9FPS, and the mIoU on the test set is about 93.61%, which is slightly better than the original model STDC c=1024 and within the acceptable accuracy range. Therefore, it can be concluded that when pursuing high accuracy, the network G-STDC s=2c=1024 is selected; when pursuing lightweight and speed, the model G-STDC s=2c=128 is selected.

[0142] 3) Analysis of baseline extraction effect.

[0143] The accuracy of baseline extraction was analyzed for the test set in the PlantSeg dataset. A three-classification mask was obtained through a deep learning network, and then the auxiliary navigation line and the ridge boundary line were extracted using a multi-line detection method based on a central axis point clustering algorithm and a random sample consistency (RANSAC) algorithm. The average values ​​of the attitude error and distance error of all images were calculated, as shown in the figure below. The attitude error of the ridge boundary line is 0.024°, and the distance error is 7.738 pixels; the attitude error of the auxiliary navigation line is 0.03°, and the distance error is 8.562 pixels. In summary, the average attitude error of the baseline extraction obtained by the present invention is 0.027°, and the average distance error is 8.15 pixels, indicating that the actual baseline can be accurately fitted to meet the accuracy requirements of agricultural machinery navigation. In addition, it has been experimentally verified that the paddy field navigation baseline detection method based on the improved STDC network designed by the present invention has an overall detection speed of 12.5FPS, which can provide real-time reference lines for automatic navigation and turning path planning of agricultural machinery.

[0144] Table 6 Network performance table with different channel numbers

[0145]

[0146]

[0147] Embodiment 2

[0148] In order to execute the method corresponding to the above-mentioned embodiment 1 to achieve corresponding functions and technical effects, a paddy field navigation baseline detection system is provided below.

[0149] A paddy field navigation baseline detection system, comprising:

[0150] The paddy field transplanting operation image acquisition module is used to acquire paddy field transplanting operation images at a small pitch angle; the small pitch angle is a pitch angle lower than a set pitch angle threshold.

[0151] A region segmentation module is used to input the paddy field transplanting operation image into a deep learning network G-STDC that integrates a semantic segmentation network STDC and a ghost network GhostNet, and segment out various regions in the paddy field transplanting operation image; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step size of 2 and a G-STDC module with a step size of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the regions include transplanted regions, untransplanted regions and ridge regions.

[0152] The navigation reference line module is used to extract the navigation reference line according to each of the areas by using a point clustering algorithm based on a central axis and a random sampling consistency algorithm; the navigation reference line includes a ridge boundary line and an auxiliary navigation line.

[0153] The automatic navigation and turning path planning module is used for automatic navigation and turning path planning of the agricultural machinery according to the navigation reference line.

[0154] In practical applications, the training process of the deep learning network G-STDC specifically includes: an image data set generation module, which is used to collect multiple videos of different paddy field transplanting operations at different periods, select multiple environmental noise scenes, and generate an image data set; a preprocessing module, which is used to preprocess the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chromaticity adjustment, random saturation adjustment and Z-Score standardization; a data annotation module, which is used to perform data annotation on the preprocessed images according to a computer vision automatic annotation tool to generate a grayscale image containing annotated real labels; the annotated real labels include transplanted areas, unplanted areas and ridge areas; a training module, which is used to train the deep learning network G-STDC according to the grayscale image.

[0155] In practical applications, the navigation baseline extraction module specifically includes: a ridge binary image generation unit, which is used to generate a ridge binary image with the ridge area as the foreground and the transplanted area and the untransplanted area as the background; a processed ridge binary image generation unit, which is used to use a morphological opening operation to remove isolated noise points from the ridge binary image to generate a processed ridge binary image; and a ridge area external contour return unit, which is used to use a findcontours function to return the external contour of the ridge area. An external contour is used to generate the contour of the ridge area and the number of each contour, and the longest contour is retained; a first clustering point selection unit is used to traverse each column of the processed ridge binary image from the horizontal center axis of the processed ridge binary image to the upper and lower sides based on the external contour of the ridge area, using a point clustering algorithm based on the central axis, and select the contour point closest to the horizontal center axis as the clustering point; a ridge boundary line generation unit is used to fit and generate the ridge boundary line according to the clustering points using a random sampling consistency algorithm.

[0156] In practical applications, the navigation reference line extraction module specifically includes: a transplanted rice binary image generation unit, which is used to generate a transplanted rice binary image with the transplanted rice area as the foreground and the ridge area and the unplanted rice area as the background; a processed transplanted rice binary image generation unit, which is used to remove isolated noise points from the transplanted rice binary image by using a morphological opening operation to generate a processed transplanted rice binary image; an external contour generation unit of the transplanted rice area, which is used to use a findcontours function to return the external contour of the transplanted rice area, generate the contour of the ridge area and the number of each contour, and retain the longest contour; a second clustering point selection unit, which is used to traverse each column of the processed transplanted rice binary image from the horizontal center axis of the processed transplanted rice binary image to the upper and lower sides based on the external contour of the transplanted rice area, and select the contour point closest to the horizontal center axis as the clustering point; an auxiliary navigation line generation unit, which is used to fit and generate an auxiliary navigation line based on the clustering point by using a random sampling consistency algorithm.

[0157] Embodiment 3

[0158] An embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the paddy field navigation baseline detection method provided in the first embodiment.

[0159] In practical applications, the above electronic device may be a server.

[0160] In practical applications, an electronic device includes: at least one processor, a memory, a bus and a communications interface.

[0161] Wherein: the processor, the communication interface, and the memory communicate with each other via a communication bus.

[0162] Communication interface, used to communicate with other devices.

[0163] The processor is used to execute the program, and specifically can execute the method described in the above embodiment.

[0164] Specifically, the program may include program codes including computer operation instructions.

[0165] The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0166] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.

[0167] Based on the description of the above embodiments, the embodiments of the present application provide a storage medium on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method described in any embodiment.

[0168] The paddy field navigation baseline detection system provided in the embodiment of the present application exists in various forms, including but not limited to:

[0169] (1) Mobile communication devices: These devices are characterized by having mobile communication functions and providing voice and data communications as their main purpose. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

[0170] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access capabilities. These terminals include: PDA, MID and UMPC devices, such as iPad.

[0171] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0172] (4) Other electronic devices with data interaction functions.

[0173] Thus far, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired results. Additionally, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing may be advantageous.

[0174] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0175] For the convenience of description, the above device is described by being divided into various units according to their functions and described separately. Of course, when implementing the present application, the functions of each unit can be implemented in the same one or more software and / or hardware. It should be understood by those skilled in the art that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0176] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0177] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0178] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0179] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0180] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0181] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM),

[0182] Digital Versatile Disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices

[0183] Or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0184] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0185] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific transactions or implement specific abstract data types. The present application may also be practiced in distributed computing environments where transactions are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0186] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0187] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for detecting a paddy field navigation baseline, characterized in that: include: Acquire paddy field rice transplanting operation images at small pitch angles; The small pitch angle is a pitch angle lower than a set pitch angle threshold; The paddy field transplanting operation image is input into the deep learning network G-STDC which integrates the semantic segmentation network STDC and the ghost network GhostNet, and each area in the paddy field transplanting operation image is segmented; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by the optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step size of 2 and a G-STDC module with a step size of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the area includes the transplanted area, the untransplanted area and the ridge area; According to each of the areas, a navigation baseline is extracted using a point clustering algorithm based on a central axis and a random sampling consistency algorithm; the navigation baseline includes a ridge boundary line and an auxiliary navigation line; the specific process when the ridge area is used as the foreground is as follows: (1) both the transplanted area and the untransplanted area are used as the background to obtain a binary image of the ridge; (2) the morphological opening operation is used to remove tiny isolated noise points from the binary image of the ridge, and then the findcontours function is used to return the outer contour of the ridge area, to obtain the contour of the ridge area and the number of each contour, and the longest contour is retained; (3) each column of the image is traversed from the horizontal central axis of the image to the upper and lower sides, and the contour point closest to the horizontal central axis is selected as the clustering point; (4) finally, the straight line is fitted using the random sampling consistency algorithm to obtain the predicted ridge boundary line; The specific process when the transplanted area is used as the foreground is as follows: (1) The ridge area and the untransplanted area are both used as the background, and a transplanted binary image is obtained; (2) The morphological opening operation is used on the transplanted binary image to remove tiny isolated noise points, and then the findcontours function is used to return the outer contour of the transplanted area, and the contour of the transplanted area and the number of each contour are obtained, and the longest contour is retained; (3) From the longitudinal center axis of the image to the left and right sides, each row of the image is traversed, and the contour point closest to the longitudinal center axis is selected as the clustering point; (4) Finally, the random sampling consistency algorithm is used to fit the straight line to obtain the predicted auxiliary navigation line; The agricultural machinery is automatically navigated and the turning path is planned according to the navigation baseline.

2. The paddy field navigation baseline detection method according to claim 1, characterized in that: The training process of the deep learning network G-STDC specifically includes: Collect multiple videos of rice planting operations in paddy fields at different times, select a variety of environmental noise scenes, and generate image datasets; Preprocessing the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chromaticity adjustment, random saturation adjustment and Z-Score standardization; Performing data annotation on the preprocessed image according to a computer vision automatic annotation tool to generate a grayscale image containing annotated true labels; the annotated true labels include a transplanted area, an untransplanted area, and a ridge area; The deep learning network G-STDC is trained according to the grayscale image.

3. A paddy field navigation baseline detection system, characterized in that: include: The paddy field transplanting operation image acquisition module is used to acquire paddy field transplanting operation images at a small pitch angle; The small pitch angle is a pitch angle lower than a set pitch angle threshold; A region segmentation module is used to input the paddy field transplanting operation image into a deep learning network G-STDC that integrates a semantic segmentation network STDC and a ghost network GhostNet, and segment out various regions in the paddy field transplanting operation image; the deep learning network G-STDC is formed by replacing the 3rd, 4th and 5th convolution blocks of the backbone network in the original STDC network framework with the original STDC blocks by optimized G-STDC blocks; each of the optimized G-STDC blocks includes a G-STDC module with a step length of 2 and a G-STDC module with a step length of 1, and the optimized G-STDC module is formed by replacing all convolution modules in the original STDC module with ghost modules; the regions include transplanted regions, untransplanted regions and ridge regions; The navigation reference line module is used to extract the navigation reference line according to each of the areas by using a point clustering algorithm based on the central axis and a random sampling consistency algorithm; the navigation reference line includes a ridge boundary line and an auxiliary navigation line; the specific process when the ridge area is used as the foreground is as follows: (1) both the transplanted area and the untransplanted area are used as the background to obtain a binary image of the ridge; (2) the morphological opening operation is used to remove tiny isolated noise points from the binary image of the ridge, and then the findcontours function is used to return the outer contour of the ridge area, to obtain the contour of the ridge area and the number of each contour, and the longest contour is retained; (3) each column of the image is traversed from the horizontal central axis of the image to the upper and lower sides, and the contour point closest to the horizontal central axis is selected as the clustering point; (4) finally, the straight line is fitted using the random sampling consistency algorithm to obtain the predicted ridge boundary line; The specific process when the transplanted area is used as the foreground is as follows: (1) The ridge area and the untransplanted area are both used as the background, and a transplanted binary image is obtained; (2) The morphological opening operation is used on the transplanted binary image to remove tiny isolated noise points, and then the findcontours function is used to return the outer contour of the transplanted area, and the contour of the transplanted area and the number of each contour are obtained, and the longest contour is retained; (3) From the longitudinal center axis of the image to the left and right sides, each row of the image is traversed, and the contour point closest to the longitudinal center axis is selected as the clustering point; (4) Finally, the random sampling consistency algorithm is used to fit the straight line to obtain the predicted auxiliary navigation line; The automatic navigation and turning path planning module is used for automatic navigation and turning path planning of the agricultural machinery according to the navigation reference line.

4. The paddy field navigation baseline detection system according to claim 3, characterized in that: The training process of the deep learning network G-STDC specifically includes: The image dataset generation module is used to collect multiple videos of rice planting operations in paddy fields at different times, select multiple environmental noise scenes, and generate image datasets; A preprocessing module, used to preprocess the images in the image data set to generate preprocessed images; the preprocessing includes random flipping, random brightness adjustment, random contrast adjustment, random chroma adjustment, random saturation adjustment and Z-Score standardization; A data labeling module is used to label the preprocessed image according to a computer vision automatic labeling tool to generate a grayscale image containing the labeled real labels; the labeled real labels include the transplanted area, the untransplanted area and the ridge area; A training module is used to train the deep learning network G-STDC according to the grayscale image.

5. An electronic device, characterized in that: It comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the paddy field navigation baseline detection method as described in any one of claims 1-2.

6. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, the paddy field navigation baseline detection method as described in any one of claims 1-2 is implemented.