A crop row neighborhood oriented adaptive occlusion enhancement training method and system

CN122676508APending Publication Date: 2026-09-01HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610808249.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0005]本发明目的是为了解决现有技术中随机遮挡增强与农田作物行真实遮挡分布不匹配的问题,提出了一种面向作物行邻域的自适应遮挡增强训练方法及系统

Benefits of technology

本发明使训练遮挡集中于作物行邻域而非全图均匀区域,增强样本更符合叶片遮挡、杂草覆盖和局部缺株等真实农田场景;该方法无需改变检测网络结构,能够作为训练数据增强模块接入不同作物行检测模型,从而提高遮挡情况下的曲线恢复能力和几何对齐质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122676508A_ABST
    Figure CN122676508A_ABST
Patent Text Reader

Abstract

The application provides a crop row neighborhood-oriented adaptive occlusion enhancement training method and system. The method obtains training images with crop row annotations, divides the training images into a grid of image blocks, and projects the crop row annotations to the block coordinate system; performs dense sampling along the crop row annotations to obtain a set of sampling points; uses a limited support neighborhood decay function to superimpose a crop row neighborhood traction strength field with the sampling points as the traction center; normalizes the strength field into occlusion block sampling probabilities, and determines the number of occlusion blocks according to the occlusion rate; performs cumulative hierarchical residual sampling according to the occlusion block sampling probabilities to obtain a set of occlusion positions, generates a block-level occlusion mask and a pixel-level occlusion mask, and obtains an occlusion enhancement training image; and uses the occlusion enhancement training image and the original annotated training crop row to detect a model. The application makes the occlusion more concentrated in the crop row neighborhood, and can improve the robustness of the crop row detection model in the leaf occlusion, weed coverage and local missing plant scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of agricultural visual model training, data augmentation, and crop row detection technology, and particularly to an adaptive occlusion enhancement training method and system for crop row neighborhoods. Specifically, it relates to a method and system for constructing a crop row neighborhood traction intensity field based on labeled crop row neighborhoods, and using cumulative hierarchical residual sampling to generate occlusion blocks to train a crop row detection model. Background Technology

[0002] Crop row detection models are often affected by local occlusion caused by leaves, weeds, soil clods, shadows, and missing plants when applied in the field. To improve the robustness of the model, occlusion enhancement methods such as random occlusion, random erasure, or mask image modeling are usually added during the training phase.

[0003] General random occlusion enhancement typically samples occlusion locations uniformly across the entire image, while in real farmland, occlusion is often highly correlated with the area where the crop row is located. For example, leaf occlusion occurs continuously along the crop row, and weed and soil texture interference is concentrated near the crop roots. Uniform occlusion may apply extensively to the sky, distant background, or non-target areas, and cannot effectively simulate key failure modes in crop row detection.

[0004] Therefore, a training method for occlusion enhancement oriented towards crop row neighborhood is needed, so that occluded blocks fall near real crop rows with a higher probability under a given occlusion rate, thereby forcing the model to learn to recover the complete crop row structure from missing row segments and surrounding context. Summary of the Invention

[0005] The purpose of this invention is to solve the problem of mismatch between random occlusion enhancement and the actual occlusion distribution of crop rows in existing technologies, and to propose an adaptive occlusion enhancement training method and system oriented towards the crop row neighborhood.

[0006] This invention is achieved through the following technical solution: This invention proposes an adaptive occlusion enhancement training method oriented towards crop row neighborhood, the method comprising: Step 1: Obtain training images with crop row labels; divide the training images into image patch grids and project the crop row labels onto the image patch grids; perform dense sampling along the projected crop row labels to obtain a set of crop row sampling points located in the image patch grids; Step 2: Using the set of crop row sampling points as the traction center, a traction intensity field of the crop row neighborhood is formed by superimposing neighborhood attenuation functions with finite support; the intensity field is normalized to obtain the sampling probability of the occluded block, and the number of occluded blocks is determined according to the sampling probability of the occluded block; Step 3: Perform cumulative hierarchical residual sampling based on the sampling probability of the occlusion block and the number of occlusion blocks to obtain the set of occlusion positions, generate a block-level occlusion mask and upsample it to a pixel-level occlusion mask; Step 4: Generate occlusion enhancement training images using the pixel-level occlusion mask, and train the crop row detection model using the occlusion enhancement training images and the original crop row annotations.

[0007] Furthermore, the crop row labeling includes at least one of the following: crop row centerline, polyline, curve control point, or polynomial curve parameter.

[0008] Furthermore, the image block grid is determined by the block size B, the grid height is the rounded-up value of the ratio of the input image height to the block size B, and the grid width is the rounded-up value of the ratio of the input image width to the block size B.

[0009] Furthermore, constructing the traction intensity field in the neighborhood of crop rows includes: performing finite support attenuation calculations on the distance between the candidate occlusion block location and the crop row sampling point, and superimposing the traction responses generated by multiple crop row sampling points. The closer the candidate occlusion block location is to the crop row sampling point, the greater its intensity value.

[0010] Furthermore, generating occlusion-enhanced training images includes: multiplying a pixel-level occlusion mask element-wise with the original training image, and replacing the occluded areas with preset fill values, mean fill values, random noise, or blurred image patches.

[0011] Furthermore, when there are no valid crop row labels in the training image, the adaptive occlusion enhancement is skipped or uniform random occlusion enhancement is used.

[0012] Furthermore, the crop row detection model is a semantic segmentation model, a key point detection model, a curve regression model, or an end-to-end crop row detection model.

[0013] This invention also proposes an adaptive occlusion enhancement training system for crop row neighborhoods, the system comprising: Annotation reading module: used to read training images and their crop row annotations; Image block mesh partitioning module: used to establish a set of candidate occlusion locations according to block size; Crop row sampling point generation module: used to project and interpolate crop row labels into block coordinate system sampling points; Neighborhood traction intensity field construction module: used to generate spatial intensity distribution based on sampling points; Occlusion location sampling module: used to perform cumulative hierarchical residual sampling according to the normalized intensity field to determine occlusion blocks; Occlusion image generation module: used to generate occlusion enhancement training images; Model training module: Used to update crop row detection model parameters using enhanced images and original annotations.

[0014] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the adaptive occlusion enhancement training method for crop row neighborhood.

[0015] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the adaptive occlusion enhancement training method for crop row neighborhood.

[0016] The beneficial effects of this invention are: This invention focuses training on crop row neighborhoods rather than uniform regions across the entire image, making the augmented samples more consistent with real-world farmland scenarios such as leaf occlusion, weed cover, and localized missing plants. This method does not require changes to the detection network structure and can be integrated into different crop row detection models as a training data augmentation module, thereby improving curve recovery and geometric alignment quality under occlusion conditions. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 This is a flowchart of the adaptive occlusion enhancement training method described in this invention.

[0019] Figure 2 Example diagram for enhancing crop row neighborhood occlusion. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Specifically, in combination Figures 1-2 This invention proposes an adaptive occlusion enhancement training method for crop row neighborhoods, the method comprising: Step 1: Obtain training images with crop row labels; divide the training images into image patch grids and project the crop row labels onto the image patch grids; perform dense sampling along the projected crop row labels to obtain a set of crop row sampling points located in the image patch grids; Step 2: Using the set of crop row sampling points as the traction center, a traction intensity field of the crop row neighborhood is formed by superimposing neighborhood attenuation functions with finite support; the intensity field is normalized to obtain the sampling probability of the occluded block, and the number of occluded blocks is determined according to the sampling probability of the occluded block; Step 3: Perform cumulative hierarchical residual sampling based on the sampling probability of the occlusion block and the number of occlusion blocks to obtain the set of occlusion positions, generate a block-level occlusion mask and upsample it to a pixel-level occlusion mask; Step 4: Generate occlusion enhancement training images using the pixel-level occlusion mask, and train the crop row detection model using the occlusion enhancement training images and the original crop row annotations.

[0022] Furthermore, the crop row labeling includes at least one of the following: crop row centerline, polyline, curve control point, or polynomial curve parameter.

[0023] Furthermore, the image block grid is determined by the block size B, the grid height is the rounded-up value of the ratio of the input image height to the block size B, and the grid width is the rounded-up value of the ratio of the input image width to the block size B.

[0024] Furthermore, constructing the traction intensity field in the neighborhood of crop rows includes: performing finite support attenuation calculations on the distance between the candidate occlusion block location and the crop row sampling point, and superimposing the traction responses generated by multiple crop row sampling points. The closer the candidate occlusion block location is to the crop row sampling point, the greater its intensity value.

[0025] Furthermore, the number of occlusion blocks is determined by the occlusion rate, the image block grid height, and the image block grid width; preferably, the number of occlusion blocks... satisfy =max(1,round( )),in Indicates the occlusion rate. Indicates the height of the image patch grid. This indicates the width of the image block grid.

[0026] Furthermore, generating occlusion-enhanced training images includes: multiplying a pixel-level occlusion mask element-wise with the original training image, and replacing the occluded areas with preset fill values, mean fill values, random noise, or blurred image patches.

[0027] Furthermore, when there are no valid crop row labels in the training image, the adaptive occlusion enhancement is skipped or uniform random occlusion enhancement is used.

[0028] Furthermore, the crop row detection model is a semantic segmentation model, a key point detection model, a curve regression model, or an end-to-end crop row detection model.

[0029] This invention also proposes an adaptive occlusion enhancement training system for crop row neighborhoods, the system comprising: Annotation reading module: used to read training images and their crop row annotations; Image block mesh partitioning module: used to establish a set of candidate occlusion locations according to block size; Crop row sampling point generation module: used to project and interpolate crop row labels into block coordinate system sampling points; Neighborhood traction intensity field construction module: used to generate spatial intensity distribution based on sampling points; Occlusion location sampling module: used to perform cumulative hierarchical residual sampling according to the normalized intensity field to determine occlusion blocks; Occlusion image generation module: used to generate occlusion enhancement training images; Model training module: Used to update crop row detection model parameters using enhanced images and original annotations.

[0030] This invention proposes an adaptive occlusion enhancement training method and system for crop row neighborhoods, belonging to the field of agricultural visual model training and data augmentation technology. The method acquires training images with crop row annotations, divides the training images into image block grids, and projects the crop row annotations onto a block coordinate system; dense sampling is performed along the crop row annotations to obtain a set of sampling points; using the sampling points as traction centers, a traction intensity field for the crop row neighborhood is formed by superimposing neighborhood attenuation functions with finite support; the intensity field is normalized to the occlusion block sampling probability, and the number of occlusion blocks is determined based on the occlusion rate; cumulative hierarchical residual sampling is performed according to the occlusion block sampling probability to obtain a set of occlusion positions, generating block-level occlusion masks and pixel-level occlusion masks to obtain occlusion enhancement training images; the occlusion enhancement training images and the original annotations are used to train a crop row detection model. This invention concentrates occlusion more within the crop row neighborhood, improving the robustness of the crop row detection model in scenarios involving leaf occlusion, weed cover, and localized missing plants.

[0031] Example Combination Figure 1 This invention proposes an adaptive occlusion enhancement training method for crop row neighborhoods, comprising the following steps: Step 1: Crop image preprocessing.

[0032] (1) Let the training image be Image height is Width is The set of crop rows is labeled as :

[0033] (2) Divide the image into a grid of blocks. Divide the training image into blocks of size [size missing]. Image block grid:

[0034]

[0035] (3) Construct the set of crop row sampling points. Project all crop row labels onto the block coordinate system and perform dense interpolation along the crop rows to obtain the set of sampling points:

[0036] in, Represents training images; Indicates the height of the training image; Indicates the width of the training image; This represents the set of labeled crop rows; Indicates the first Row labeling for each crop; Indicates the total number of crop row labels; Indicates the side length of the image patch; This represents the set of candidate block coordinates in the image patch grid; Indicates the number of rows in the image patch grid; Indicates the number of columns in the image patch grid; Represents the set of crop row sampling points; Indicates the first Sampling points for each crop row; This indicates the total number of sampling points.

[0037] Step 2: Generating the occlusion mask.

[0038] (1) Construct the traction intensity field of the crop row neighborhood. For the image patch location Based on the crop row sampling point set For reference, the distance between the candidate location and each sampling point is calculated, and the occlusion intensity of the candidate location is obtained by superimposing the finite support traction response:

[0039] in, Indicates the location of candidate image patches The traction strength in the vicinity of the location; Indicates the coordinates of the current candidate image patch; Represents the set of crop row sampling points; Indicates the first Sampling points for each crop row; This represents the coordinates of any candidate image patch used for summation and normalization; This represents the background protection factor, used to reserve a small number of non-crop row areas from being shaded. Indicates candidate position With sampling points The Euclidean distance between them; Indicates the neighborhood radius; Indicates the decay order; Denotes the positive part function, i.e., when Take when greater than 0 Otherwise, take 0.

[0040] (2) Normalize the sampling probability and determine the number of occlusion blocks. Normalize the intensity field to obtain the sampling probability of the occlusion location:

[0041] The number of occluded blocks in each training image is directly constrained by the occlusion rate and determined by a rounding function:

[0042] in, Indicates candidate position The sampling probability of being selected as the center of the occlusion block; This indicates the number of occlusion blocks that need to be generated for the current training image; Indicates the occlusion rate; This represents the rounding function; This represents the maximum value function, used to ensure that at least one occlusion block is generated when occlusion enhancement is present.

[0043] (3) Perform cumulative layered residual sampling and generate occlusion masks. Arrange candidate image blocks in a fixed scanning order and calculate the cumulative probability. Select the position where the cumulative probability first exceeds the target threshold in each equal quality interval to form an occlusion position set. ;according to Generate block-level occlusion masks in an image patch grid. and will Upsampling is a pixel-level occlusion mask. The target threshold is:

[0044] in, Indicates the first Target thresholds for equal quality intervals; Indicates the interval index; This indicates the number of occlusion blocks that need to be generated for the current training image; This represents a perturbation factor between 0 and 1, which can be generated from training image numbers, batch numbers, or random numbers. This represents the final set of occlusion locations.

[0045] Step 3: Generate occlusion enhancement image. This is done using pixel-level occlusion masks. For training images Perform occlusion replacement to obtain occlusion enhancement training images. :

[0046] in, Indicates a block-level occlusion mask; Indicates by Pixel-level occlusion mask obtained by upsampling; This indicates occlusion enhancement training images; This represents element-wise multiplication; This indicates the occlusion fill value.

[0047] Preferably, Set to 0 in the normalized tensor space; occlusion enhancement application probability is 0.5, block size... 16 pixels, occlusion rate The neighborhood radius is 0.3. For 3 image patches, the attenuation order is... The background protection factor is 2. It is 0.05.

[0048] Step 4: Train the crop row detection model. Input the occlusion-enhanced training image and the original crop row annotations into the crop row detection model for training. This method does not require modification of the detection model structure and can be used for segmentation-based, keypoint-based, or end-to-end curve regression-based crop row detection models.

[0049] Furthermore, when there are no valid crop row labels in the training image, it can degenerate into uniform random occlusion sampling or skip the current occlusion enhancement.

[0050] Furthermore, the crop row labels can be manually labeled crop row centerlines, polylines, discrete key points, curve control points, or curve parameters fitted from the above labels. For polyline labels, linear interpolation can be performed first along adjacent label points, and then the interpolated points can be mapped to the block coordinate system; for polynomial curve labels, they can be uniformly sampled within the normalized curve parameter range and then mapped to the block coordinate system.

[0051] Furthermore, the crop row neighborhood traction intensity field is used to describe the non-uniform sampling probability of the occluded block in space, rather than directly modifying the crop row label. The larger values ​​of the intensity field are located near the crop row sampling point, and gradually decrease according to a finite support decay function as the distance between the candidate position and the crop row sampling point increases; when the distance exceeds the neighborhood radius, the sampling point no longer exerts a traction effect on the candidate position, thus making it more likely that the occluded block will fall in the crop row and its neighborhood.

[0052] Furthermore, the neighborhood radius R and attenuation order γ can be set according to the crop row width, image resolution, and block size. When the neighborhood radius is small, occlusion is more concentrated near the center line of the crop row; when the neighborhood radius is large, occlusion covers the canopy, weeds, and soil areas around the crop row; when the attenuation order is large, the weight of candidate locations far from the crop row decreases faster. This allows for the simulation of different growth stages and different occlusion sources.

[0053] Furthermore, the occlusion ratio ρ is used to control the desired occlusion ratio. If ρ is too small, the occlusion enhancement is insufficient, making it difficult to force the model to learn the ability to recover missing rows; if ρ is too large, it may cause excessive loss of crop row evidence in the training images. Preferably, the occlusion ratio can be set between 0.1 and 0.5 and adjusted according to the model convergence.

[0054] Furthermore, the occlusion fill value c can be set to a normalized zero value, the image mean, random noise, a blurred block, or a texture block sampled from other image regions. Using different fill values ​​can simulate various challenging scenarios such as leaf occlusion, soil occlusion, weed coverage, and local sensor defects.

[0055] Furthermore, the adaptive occlusion enhancement can be combined with conventional enhancements such as random affine transformation, color perturbation, motion blur, rain / snow simulation, and camera parameter perturbation. Preferably, geometric enhancement is first performed on the image and annotations, and then a traction intensity field of the crop row neighborhood is generated based on the enhanced crop row annotations to ensure that the occlusion position is consistent with the crop row annotations.

[0056] Furthermore, the method can dynamically generate occlusion masks in each batch during training, or it can pre-generate occlusion enhancement samples offline. The dynamic generation method can produce more occlusion combinations, while the offline generation method is suitable for training environments with limited computing resources.

[0057] Furthermore, this invention is applicable not only to crop row curve detection models, but also to crop row semantic segmentation, navigation line detection, and crop row keypoint detection tasks. For segmentation models, the original annotation can be pixel-level crop row regions; for keypoint models, the original annotation can be a sequence of crop row center points; for curve regression models, the original annotation can be curve parameters.

[0058] In one specific approach, the input image is divided into 16-pixel blocks. Adaptive occlusion enhancement is applied to the training image with a probability of 0.5, the occlusion rate is set to 0.3, the neighborhood radius is set to 3 blocks, the decay order is set to 2, and the background protection factor is set to 0.05. Under this setting, the occluded blocks are mainly distributed in the real crop rows and their neighborhoods, rather than in the sky, distant background, or other areas irrelevant to detection.

[0059] After training using the specific methods described above, the crop row detection model exhibits better curve completion capabilities in areas with localized missing plants, leaf occlusion, and weed cover. Compared to uniform random occlusion, the enhanced samples of this invention more closely resemble the actual failure modes of the crop row detection task, thereby improving the model's learning of crop row geometry.

[0060] This invention also proposes an adaptive occlusion enhancement training system for crop row neighborhoods. The system includes a label reading module, an image patch grid division module, a crop row sampling point generation module, a neighborhood traction intensity field construction module, an occlusion location sampling module, an occlusion image generation module, and a model training module.

[0061] The module includes: a label reading module for reading training images and their crop row labels; an image block grid partitioning module for establishing a set of candidate occlusion locations according to block size; a crop row sampling point generation module for projecting crop row labels and interpolating them as sampling points in the block coordinate system; a neighborhood traction intensity field construction module for generating a spatial intensity distribution based on the sampling points; an occlusion location sampling module for performing cumulative hierarchical residual sampling according to the normalized intensity field to determine occlusion blocks; an occlusion image generation module for forming occlusion enhancement training images; and a model training module for updating the crop row detection model parameters using the enhanced images and the original labels.

[0062] The present invention also proposes an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the adaptive occlusion enhancement training method for crop row neighborhood.

[0063] The present invention also proposes a computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the steps of the adaptive occlusion enhancement training method for crop row neighborhood.

[0064] The memory in this application embodiment can be volatile memory or non-volatile memory, or it can include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the methods described in this invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0065] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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 this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0066] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.

[0067] It should be noted that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiments can be completed by the integrated logic circuitry in the processor's hardware or by instructions in software form. The processor can be a general-purpose 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, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0068] The above provides a detailed description of the adaptive occlusion enhancement training method and system for crop row neighborhood proposed in this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. An adaptive occlusion enhancement training method for crop row neighborhoods, characterized in that, The method includes: Step 1: Obtain training images with crop row labels; divide the training images into image patch grids and project the crop row labels onto the image patch grids; perform dense sampling along the projected crop row labels to obtain a set of crop row sampling points located in the image patch grids; Step 2: Using the set of crop row sampling points as the traction center, a traction intensity field of the crop row neighborhood is formed by superimposing neighborhood attenuation functions with finite support; the intensity field is normalized to obtain the sampling probability of the occluded block, and the number of occluded blocks is determined according to the sampling probability of the occluded block; Step 3: Perform cumulative hierarchical residual sampling based on the sampling probability of the occlusion block and the number of occlusion blocks to obtain the set of occlusion positions, generate a block-level occlusion mask and upsample it to a pixel-level occlusion mask; Step 4: Generate occlusion enhancement training images using the pixel-level occlusion mask, and train the crop row detection model using the occlusion enhancement training images and the original crop row annotations.

2. The method according to claim 1, characterized in that, The crop row labeling includes at least one of the following: crop row centerline, polyline, curve control point, or polynomial curve parameter.

3. The method according to claim 1, characterized in that, The image block grid is determined by the block size B, the grid height is the rounded-up value of the ratio of the input image height to the block size B, and the grid width is the rounded-up value of the ratio of the input image width to the block size B.

4. The method according to claim 1, characterized in that, Constructing the traction intensity field in the neighborhood of crop rows includes: performing finite support attenuation calculations on the distance between the candidate occlusion block location and the crop row sampling point, and superimposing the traction responses generated by multiple crop row sampling points. The closer the candidate occlusion block location is to the crop row sampling point, the greater its intensity value.

5. The method according to claim 1, characterized in that, Generating occlusion-enhanced training images involves multiplying a pixel-level occlusion mask element-wise with the original training image and replacing the occluded regions with preset fill values, mean fill values, random noise, or blurred image patches.

6. The method according to claim 1, characterized in that, When there are no valid crop row labels in the training image, skip the adaptive occlusion enhancement or use uniform random occlusion enhancement.

7. The method according to claim 1, characterized in that, The crop row detection model can be a semantic segmentation model, a key point detection model, a curve regression model, or an end-to-end crop row detection model.

8. An adaptive occlusion enhancement training system for crop row neighborhoods, characterized in that, The system includes: Annotation reading module: used to read training images and their crop row annotations; Image block mesh partitioning module: used to establish a set of candidate occlusion locations according to block size; Crop row sampling point generation module: used to project and interpolate crop row labels into block coordinate system sampling points; Neighborhood traction intensity field construction module: used to generate spatial intensity distribution based on sampling points; Occlusion location sampling module: used to perform cumulative hierarchical residual sampling according to the normalized intensity field to determine occlusion blocks; Occlusion image generation module: used to generate occlusion enhancement training images; Model training module: Used to update the parameters of the crop row detection model using enhanced images and original annotations.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-7.