Anchors-based convolutional neural network method for extracting agricultural navigation lines

By using an anchor-based convolutional neural network and the least squares method, the problem of accuracy in extracting navigation lines for agricultural machinery in complex environments was solved, enabling autonomous navigation of agricultural machinery under different crops and environments.

CN119863516BActive Publication Date: 2025-11-07HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411868877.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-11-07
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

When there are multiple rows of crops in the frontal images acquired by agricultural machinery, it is difficult to accurately locate the middle crop and extract the navigation line in complex environments. Especially in the case of a large amount of weeds, existing methods are unable to effectively remove the influence of weeds, resulting in inaccurate navigation of agricultural machinery.

Method used

An anchor-based convolutional neural network is used to acquire information about crops in the field from a camera, extract navigation lines using the anchor point positions, and fit the position and skew angle of the navigation lines using the least squares method. By combining the main framework module, fully connected layer module, and distributed focus module of the convolutional neural network, the navigation lines can be automatically identified and adjusted.

Benefits of technology

It can accurately identify navigation lines in complex environments, avoid the impact of obstruction and crop row interruption, and is applicable to different crops and environments, enabling autonomous navigation of agricultural machinery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863516B_ABST
    Figure CN119863516B_ABST
Patent Text Reader

Abstract

The application provides an agricultural navigation line extraction method based on an anchor point convolutional neural network. The method directly finds the position of the navigation line at each anchor point in the picture by using the anchor point convolutional neural network, and then fits the direction and position of the navigation line by using a least square method to guide the adjustment of the posture and direction of the agricultural machine. Since the anchor point position is preset, the network must predict the position of the navigation line at the anchor point, so the method is not affected by shielding and crop row interruption. Meanwhile, the method does not set the type of crops, and relies on the high similarity of the agricultural crop planting mode, so the method can directly deal with various crops and environments.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, deep neural network learning, and convolutional neural network, and particularly relates to an agricultural navigation line extraction method based on an anchor point convolutional neural network. BACKGROUND

[0002] Image processing technology is a technology that uses computers to process acquired images. It mainly includes image segmentation, image recognition, image enhancement, and restoration. Using image processing technology, machines can obtain "eyes" and acquire important visual information, making it easier and more accurate to control machines. Image processing technology is mainly used to extract valuable information from image data. Common image processing steps include image preprocessing, feature extraction, image segmentation, and edge detection. In agricultural automation, image processing is often used to obtain environmental information to help automated equipment make decisions. For example, image preprocessing techniques such as noise reduction and grayscale conversion can reduce interference information in images, improving the accuracy of subsequent analysis. In field environments, image processing technology is often used for crop recognition, soil analysis, and inter-row navigation line extraction. Inter-row navigation line extraction is one of the key technologies in precision agriculture, which can guide agricultural equipment to automatically work along crop rows.

[0003] Deep learning is a neural network-based machine learning method that simulates the working mechanism of human brain neurons to process complex data. Deep learning can automatically learn features from large amounts of data and has achieved remarkable results in image recognition, speech recognition, and other fields. In the agricultural field, deep learning is widely used in precision agriculture, such as crop disease detection, fruit maturity assessment, and soil composition analysis. The advantage of deep learning technology is that it can automatically extract complex features in images through a large amount of training data, avoiding the complexity of manual feature extraction. Therefore, in the task of inter-row navigation line extraction, deep learning can effectively cope with challenges such as different light, weather, and soil types.

[0004] Convolutional Neural Network (CNN) is a neural network model in deep learning specifically designed for image processing. CNN can extract local features of images through multiple convolution operations, reduce computational complexity through pooling layers, and complete the final classification or regression task through fully connected layers.

[0005] A key feature of CNNs is their ability to automatically extract features from raw images without requiring manually designed feature extraction algorithms. This is particularly important in the complex environments of agriculture, where factors such as background, lighting, and crop morphology in farmland images can vary. CNNs can robustly identify these variations. For tasks involving field navigation line extraction, CNNs can learn the "row" features in images through training, automatically recognizing navigation lines between crop rows in farmland. Especially in complex field environments, CNNs can effectively identify irregular row lines and potential obstructions (such as weeds and soil cracks). Summary of the Invention

[0006] This invention addresses the challenge of accurately identifying the central crop in an image containing multiple rows of crops, which is crucial for guiding the agricultural machinery in adjusting its posture and direction. However, in complex environments such as those with abundant weeds, there isn't a simple and effective strategy to remove the weeds' influence, accurately locate the central crop, and extract the navigation line. Therefore, this invention proposes an agricultural navigation line extraction method based on an anchor-point convolutional neural network. This method enables the robot to autonomously fit a navigation line based on the position of the crops in the field, without human intervention, thus helping the agricultural machinery navigate along the crop line.

[0007] This invention is achieved through the following technical solution: This invention proposes a method for extracting agricultural navigation lines based on a convolutional neural network with anchor points, the method comprising the following steps:

[0008] Step 1: Use a camera to photograph the area in front of the agricultural machinery to obtain information about the location of crops in the field ahead;

[0009] Step 2: Process the image using an anchor-based convolutional neural network to output the position of the navigation line corresponding to each anchor point;

[0010] Step 3: Finally, based on all the anchor point positions, the least squares method is used to extract the position, deflection angle, and offset of the navigation line to help the robot adjust its walking posture and direction in the field.

[0011] Further, the anchor-based convolutional neural network is used to process images and obtain coordinate positions of navigation lines at each anchor point; the convolutional neural network comprises three modules, namely a main framework module, a fully connected layer module, and a distributed focus module; the main framework module comprises a convolution module, a residual module, a pyramid pooling module, and a residual block; the main framework module input is a 256x256x3 color picture, which is first subjected to a convolution operation with parameters k=7, s=2, p=3, and c=8; then subjected to a maximum pooling operation using the function nn.maxpool() with parameters k=3, s=2, and p=1; then subjected to a residual block that is not used for downsampling with parameters downsampling=Fasle and c=16; then subjected to a second residual block that is used for downsampling with parameters downsampling=True and c=24; then subjected to a third residual block that is used for downsampling with parameters downsampling=True and c=36; then subjected to a fourth residual block that is used for downsampling with parameters downsampling=True and c=48; and finally output is a 48x8x8 tensor.

[0012] Further, the fully connected layer module receives the output of the main framework module, first flattens the 48x8x8 tensor into 1x3072, then uses the function nn.Linear() to pass through a first fully connected layer to output an intermediate layer with a size of 1x4096, and then uses the function nn.Linear() to pass through a second fully connected layer to output a one-dimensional vector with a size of 1x(Nx256), where N represents the number of set anchor points.

[0013] Further, the distributed focus module receives the output of the fully connected layer module, first deforms the 1x(Nx256) vector into a two-dimensional vector Nx256, i.e., N rows and 256 columns, with each row representing an anchor point; then uses the function nn.softmax() to perform operations on each row to obtain scores of 256 values in each row; and finally uses formula (1) to perform weighted averaging on each row to obtain the horizontal position of the navigation line corresponding to each anchor point in the picture; wherein score(i) represents the score of the ith value.

[0014]

[0015] Further, the convolution module is composed of a convolution operation Conv2d, a normalization operation BatchNorm2d and an activation operation GELU; the convolution operation uses the function nn.Conv2d(), in which k, s, p and c represent the parameters in the function: the convolution kernel size, the step, the padding and the output channel number; the normalization operation selects the function nn.BatchNorm2d(); and the activation operation selects the function nn.GELU().

[0016] Further, the residual module includes two branches; the left branch first passes through a convolution module with parameters set as k=3, s=1 and p=1, and then passes through another convolution module with parameters set as k=3, s=x and p=1; the right branch passes through a convolution module with parameters set as k=1 and s=x; if the residual module is used for downsampling, i.e., downsample=True, then x=2; otherwise, downsample=False, and x=1; finally, the results of the two branches are added to obtain the output result of the residual module.

[0017] Further, the pyramid pooling module specifically includes: first, four branches are executed, and each branch performs a convolution operation; the first branch has parameters set as k=3, s=1, p=4 and d=2; the second branch has parameters set as k=3, s=1, p=6 and d=4; the third branch has parameters set as k=3, s=1, p=8 and d=6; and the fourth branch has parameters set as k=3, s=1, p=10 and d=8; finally, the results of the four branches are spliced by using the function nn.concat(), and then a convolution operation is performed with parameters set as k=1 and s=1 to obtain the output of the pyramid pooling module.

[0018] Further, the residual block is composed of two residual modules and a pyramid pooling module; if the residual block is used for downsampling, the first residual module has the parameter downsample set as True, otherwise as False; then a pyramid pooling module is passed through; and the second residual module has the parameter downsample always set as False.

[0019] The application further provides an electronic device including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the agricultural navigation line extraction method based on the anchor point-based convolutional neural network when executing the computer program.

[0020] The application further provides a computer readable storage medium for storing computer instructions, and the computer instructions implement the steps of the agricultural navigation line extraction method based on the anchor point-based convolutional neural network when executed by a processor.

[0021] The beneficial effects of the present application are:

[0022] The method of the present application directly finds the position of the navigation line at each anchor point in the picture by using an anchor point-based convolutional neural network, and then uses the least square method to fit the direction and position of the navigation line to guide the adjustment of the posture and direction of the agricultural machine. Since the anchor point position is preset, the network must predict the position of the navigation line at the anchor point, so the method is not affected by occlusion, crop row interruption, etc. At the same time, the method does not set the type of crops, but relies on the high similarity of agricultural crop planting patterns, so the method can directly deal with various crops and environments. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0024] Figure 1 is a convolution module structure diagram;

[0025] Figure 2 is a residual module structure diagram;

[0026] Figure 3 is a pyramid pooling module structure diagram;

[0027] Figure 4 is a residual block structure diagram;

[0028] Figure 5 is a main body framework module structure diagram;

[0029] Figure 6 is a fully connected layer module structure diagram;

[0030] Figure 7 is a distributed focus module structure diagram;

[0031] Figure 8 is an anchor point-based convolutional neural network structure diagram;

[0032] Figure 9 is a network output effect diagram; wherein (a) is the navigation line position prediction result in various different environments, and (b) is the navigation line position prediction result in the case of occlusion and crop row interruption. DETAILED DESCRIPTION

[0033] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of the present application.

[0034] In combination with Figures 1-9 , the present application proposes an agricultural navigation line extraction method based on an anchor point convolutional neural network, which comprises the following steps:

[0035] Step one, use a camera to shoot the front area of the agricultural machinery to obtain the crop position information in the front field;

[0036] Step two, use an anchor point-based convolutional neural network to process the image to output the position of the navigation line corresponding to each anchor point;

[0037] Step three, finally, according to the positions of all anchor points, use the least square method to extract the position, deflection angle and offset of the navigation line to help the robot adjust the walking posture and direction in the field.

[0038] The anchor point-based convolutional neural network is used to process images to obtain the coordinate positions of the navigation lines at each anchor point; the convolutional neural network comprises three modules, namely a main framework module, a fully connected layer module and a distributed focus module; the main framework module comprises a convolution module (ConvModule), a residual module (ResModule), a pyramid pooling module (ASPPModule) and a residual block (Resbottle); the input of the main framework module is a 256x256x3 color picture, as shown in Figure 5 The first convolution operation has parameters k=7, s=2, p=3 and c=8; then a maximum pooling operation (Maxpooling) is performed, which uses the function nn.maxpool() and the parameters k=3, s=2 and p=1; then a residual block is used, which is not used for downsampling and has the parameters downsampling=Fasle and c=16; a second residual block is used, which is used for downsampling and has the parameters downsampling=True and c=24; a third residual block is used, which is used for downsampling and has the parameters downsampling=True and c=36; a fourth residual block is used, which is used for downsampling and has the parameters downsampling=True and c=48; and finally, the output is a 48x8x8 tensor.

[0039] As Figure 6As shown, the full connection layer module receives the output of the body frame module, first flattens the 48x8x8 tensor into 1x3072, and then passes it through the first full connection layer using the function nn.Linear(), to output an intermediate layer with a size of 1x4096. Then, the output is passed through the second full connection layer to output a one-dimensional vector with a size of 1x(Nx256), where N represents the number of anchor points set.

[0040] As shown in FIG. 4, the distribution focus module receives the output of the full connection layer module, first reshapes the vector with a size of 1x(Nx256) into a two-dimensional vector with a size of Nx256, i.e., N rows and 256 columns, where each row represents an anchor point. Then, the function nn.softmax() is used to perform operations on each row to obtain the scores of the 256 values in each row. Finally, the weighted average of each row is obtained using formula (1) to obtain the horizontal position of the navigation line corresponding to each anchor point in the picture. Where score(i) represents the score of the ith value. Figure 7

[0041] As shown in FIG. 4, the distribution focus module receives the output of the full connection layer module, first reshapes the vector with a size of 1x(Nx256) into a two-dimensional vector with a size of Nx256, i.e., N rows and 256 columns, where each row represents an anchor point. Then, the function nn.softmax() is used to perform operations on each row to obtain the scores of the 256 values in each row. Finally, the weighted average of each row is obtained using formula (1) to obtain the horizontal position of the navigation line corresponding to each anchor point in the picture. Where score(i) represents the score of the ith value.

[0042] Figure 1 As shown in FIG. 4, the convolution module is composed of a convolution operation Conv2d, a normalization operation BatchNorm2d, and an activation operation GELU. The convolution operation uses the function nn.Conv2d(), where k, s, p, and c represent the parameters in the function: kernel size, stride, padding, and output channel number. The normalization operation selects the function nn.BatchNorm2d(). The activation operation selects the function nn.GELU().

[0043] As shown in FIG. 4, the residual module includes two branches. The left branch first passes through a convolution module with parameters set as k=3, s=1, and p=1, and then passes through another convolution module with parameters set as k=3, s=x, and p=1. The right branch passes through a convolution module with parameters set as k=1 and s=x. If the residual module is used for downsampling, i.e., downsample=True, then x=2. Otherwise, downsample=False, and x=1. Finally, the results of the two branches are added to obtain the output result of the residual module. Figure 2 As shown in FIG. 4, the residual module includes two branches. The left branch first passes through a convolution module with parameters set as k=3, s=1, and p=1, and then passes through another convolution module with parameters set as k=3, s=x, and p=1. The right branch passes through a convolution module with parameters set as k=1 and s=x. If the residual module is used for downsampling, i.e., downsample=True, then x=2. Otherwise, downsample=False, and x=1. Finally, the results of the two branches are added to obtain the output result of the residual module.

[0044] Figure 3 ​​As shown, the pyramid pooling module is specifically: first through four branches, each branch performs a convolution operation, the first branch is set to k=3, s=1, p=4, d=2; the second branch is set to k=3, s=1, p=6, d=4; the third branch is set to k=3, s=1, p=8, d=6; the fourth branch is set to k=3, s=1, p=10, d=8; finally, the results of the four branches are spliced using the function nn.concat(), and then a convolution operation is performed, with the parameters set to k=1, s=1, to obtain the output of the pyramid pooling module.

[0045] As shown in Figure 4 The residual block is composed of two residual modules and a pyramid pooling module; if the residual block is used for downsampling, the parameter downsample of the first residual module is True, otherwise it is False; then a pyramid pooling module is passed; the parameter downsample of the second residual module is always False.

[0046] The above is the anchor point-based convolutional neural network, and the overall network framework structure is as shown in Figure 8 . Figure 9 The network output effect diagram; wherein (a) is the navigation line position prediction result in various different environments, (b) is the navigation line position prediction result in the case of occlusion and crop row interruption.

[0047] Embodiment

[0048] The present application proposes an anchor point-based convolutional neural network agricultural navigation line extraction method, which comprises two parts of an anchor point-based convolutional neural network and a straight line fitting algorithm.

[0049] The anchor point-based convolutional neural network is as shown in Figure 8 The main function of the convolutional neural network is mainly realized by the following steps:

[0050] Step one, set the input picture size to 256x256x3, representing length, width and channel number respectively, set the anchor point number to N, divide the picture into N rows evenly, then the vertical position of the navigation line corresponding to the i-th anchor point in the picture can be calculated by formula (2);

[0051]

[0052] Step two, the input picture is processed by the main framework to obtain a 48x8x8 tensor output;

[0053] Step three, the 48x8x8 tensor output by the main body framework is input into the full connection layer module to obtain a one-dimensional vector of 1x(Nx256);

[0054] Step four, the one-dimensional vector of 1x(Nx256) obtained by the full connection layer module is input into the distributed focus module to obtain the horizontal positions of the N anchor points in the picture, which correspond to the vertical positions one by one, and N point coordinates can be obtained, wherein the vertical position is the horizontal coordinate and the horizontal position is the vertical coordinate.

[0055] The straight line fitting part uses the least square method, and the direction and position of the navigation line are calculated by using the N coordinate points.

[0056] The application further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the agricultural navigation line extraction method based on the anchor point-based convolutional neural network when executing the computer program.

[0057] The application further provides a computer readable storage medium for storing computer instructions, wherein the computer instructions implement the steps of the agricultural navigation line extraction method based on the anchor point-based convolutional neural network when executed by a processor.

[0058] The memory in the embodiments of the present application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). It is noted that the memory of the methods described herein is intended to include, but not be limited to, these and any other suitable types of memory.

[0059] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as high-density digital video disc (DVD)), or semiconductor media (such as solid state disc (SSD)), etc.

[0060] In the implementation process, each step of the above method can be completed by integrated logic circuit of hardware in the processor or instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution, or executed by combination of hardware and software modules in the processor. The software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.

[0061] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with a signal processing capability. In the implementation process, each step of the method embodiments can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor. The processor mentioned above can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random access memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.

[0062] The agricultural navigation line extraction method based on the anchor point convolutional neural network is described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above embodiment is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description should not be understood as the limitation of the present application.

Claims

1. An anchor point based convolutional neural network based agricultural navigation line extraction method, characterized in that, The method comprises the following steps: Step one, use the camera to shoot the front area of the agricultural machinery, and obtain the crop image in the front field; Step two, use the anchor point-based convolutional neural network to process the image, and output the coordinate position of the navigation line corresponding to each anchor point; the convolutional neural network comprises a main framework module, a fully connected layer module and a distributed focus module; The anchor point-based convolutional neural network refers to setting the number of anchor points N, dividing the image into N rows according to the number of anchor points, calculating the vertical position of the navigation line corresponding to the i-th anchor point in the image, inputting the image into the anchor point-based convolutional neural network to process the image, obtaining the horizontal position of the navigation line corresponding to the N anchor points in the image, the horizontal position and the vertical position one-to-one, and obtaining the coordinate position of the N anchor points according to the horizontal position and the vertical position; Step three, finally, according to the coordinate positions of all anchor points, using the least square method, fitting the navigation line, and extracting the position, deflection angle and offset of the navigation line to help the robot adjust the posture and direction of walking in the field.

2. The method of claim 1, wherein, The anchor point-based convolutional neural network is used to process the image and obtain the coordinate position of the navigation line at each anchor point; the main framework module comprises a convolution module, a residual module, a pyramid pooling module and a residual block; the input of the main framework module is a 256x256x3 color picture, which is first subjected to a convolution operation, and the parameters of the convolution operation are k=7, s=2, p=3 and c=8; then subjected to a maximum pooling operation, and the maximum pooling operation uses the function nn.maxpool(), and the parameters used are k=3, s=2 and p=1; then subjected to a residual block, and the residual block is not used for downsampling, and the parameters are downsampling=Fasle and c=16; subjected to a second residual block, and the second residual block is used for downsampling, and the parameters are downsampling=True and c=24; subjected to a third residual block, and the third residual block is used for downsampling, and the parameters are downsampling=True and c=36; subjected to a fourth residual block, and the fourth residual block is used for downsampling, and the parameters are downsampling=True and c=48; and finally the output is a 48x8x8 tensor.

3. The method of claim 2, wherein, The fully connected layer module receives the output of the main framework module, first flattens the 48x8x8 tensor into 1x3072, then uses the function nn.Linear() to pass through the first fully connected layer, the output intermediate layer size is 1x4096, and then passes through the second fully connected layer, and the output size is a one-dimensional vector of 1xNx256, wherein N represents the number of set anchor points.

4. The method of claim 2, wherein, The distributed focus module receives the output of the full connection layer module, first deforms the 1xNx256 one-dimensional vector into an Nx256 two-dimensional vector, each row representing an anchor point; then uses the function nn.softmax() to perform operations on each row to obtain the score of 256 values in each row, and finally uses formula (1) to perform weighted averaging on each row to obtain the horizontal position of the navigation line corresponding to each anchor point in the picture; wherein represents the score of the first i value.

5. The method of claim 2, wherein, The convolution module is composed of a convolution operation Conv2d, a normalization operation BatchNorm2d and an activation operation GELU; the convolution operation uses the function nn.Conv2d(), in which k, s, p and c represent the parameters in the function: the convolution kernel size, the step, the padding and the output channel number; the normalization operation selects the function nn.BatchNorm2d(); and the activation operation selects the function nn.GELU().

6. The method of claim 2, wherein, The residual module includes two branches; the left branch first passes through a convolution module with parameters set as k=3, s=1 and p=1, and then passes through another convolution module with parameters set as k=3, s=x and p=1; the right branch passes through a convolution module with parameters set as k=1 and s=x; if the residual module is used for down sampling, i.e., downsample=True, then x=2; otherwise, downsample=False, x=1; finally, the results of the two branches are added to obtain the output result of the residual module.

7. The method of claim 2, wherein, The pyramid pooling module specifically includes: first, four branches each perform a convolution operation; the first branch has parameters set as k=3, s=1, p=4 and d=2; the second branch has parameters set as k=3, s=1, p=6 and d=4; the third branch has parameters set as k=3, s=1, p=8 and d=6; and the fourth branch has parameters set as k=3, s=1, p=10 and d=8; finally, the results of the four branches are spliced using the function nn.concat(), and then a convolution operation is performed with parameters set as k=1 and s=1 to obtain the output of the pyramid pooling module.

8. The method of claim 2, wherein, The residual block is composed of two residual modules and a pyramid pooling module; if the residual block is used for down sampling, then the parameter downsample of the first residual module is True, otherwise it is False; then a pyramid pooling module is passed through; the parameter downsample of the second residual module is always False. 9.An electronic device comprising a memory and a processor, the memory storing a computer program, wherein, The processor executes the computer program to realize the steps of the method of any one of claims 1-8.

10. A computer readable storage medium for storing computer instructions, characterized in that, The computer instructions are executed by the processor to realize the steps of the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Accurate lane line detection method for enhancing curve perception

    CN116129390A

  • Paddy field navigation datum line detection method, system and equipment

    CN117372327A