Farmland residual film detection method and system based on multi-scale semantic segmentation, and storage medium
The farmland residual film detection system, which utilizes multi-scale semantic segmentation and employs dual cameras on a drone to acquire images, combined with a multi-module collaborative algorithm, solves the problems of low efficiency and poor accuracy in farmland residual film detection, achieving efficient and accurate residual film detection and full-process support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies for detecting residual plastic film in farmland are inefficient and have poor accuracy, making them difficult to adapt to complex farmland scenarios. Furthermore, they lack a collaborative architecture for the entire process, resulting in insufficient detection accuracy.
A farmland residual film detection system based on multi-scale semantic segmentation is adopted, which combines the hardware of dual-camera acquisition and preprocessing on the UAV, the collaborative work of multiple modules on the algorithm side, including multi-scale segmentation network, dynamic threshold segmentation and classification collaborative training, and the storage medium support on the data side to achieve seamless connection between image acquisition, processing and result output.
It improves the efficiency and accuracy of agricultural film residue detection, can identify large and small film fragments, provides comprehensive data support, and provides technical support for film residue recycling and pollution control.
Smart Images

Figure CN121811284A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural film residue detection technology, and in particular to a method, system and storage medium for agricultural film residue detection based on multi-scale semantic segmentation. Background Technology
[0002] With the advancement of agricultural modernization, plastic film mulching technology has been widely used in crop cultivation due to its ability to conserve moisture, increase temperature, improve quality, and increase yield. However, residual plastic film in farmland is difficult to degrade naturally, and long-term residue can damage soil structure, hinder crop root growth, and cause agricultural non-point source pollution, seriously restricting sustainable agricultural development. Therefore, accurate and efficient detection of residual plastic film in farmland is a prerequisite for residual film recycling and pollution control.
[0003] Current agricultural film residue detection technology has many limitations. Traditional manual inspection methods are inefficient, labor-intensive, and difficult to cover large areas of farmland. Moreover, the detection accuracy is easily affected by human factors. Existing automated detection systems mostly use a single device to collect image data and rely on single-modal image processing, which makes it difficult to cope with image quality problems caused by complex farmland scenarios.
[0004] Meanwhile, detection algorithms often focus on single-scale feature extraction or simple segmentation strategies, which cannot effectively adapt to the multi-morphological distribution characteristics of residual membranes, ranging from large intact membranes to tiny fragments, resulting in missed detection of small target residual membranes and insufficient segmentation accuracy.
[0005] In addition, the existing system lacks a unified multi-module collaborative architecture, and the data storage and processing processes are scattered, making it difficult to achieve efficient linkage throughout the entire process from data collection and processing to result output, and thus failing to provide accurate and comprehensive technical support for residual film treatment. Summary of the Invention
[0006] The purpose of this invention is to provide a method, system, and storage medium for detecting residual agricultural film based on multi-scale semantic segmentation, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a farmland residual film detection system based on multi-scale semantic segmentation, wherein the multi-scale semantic segmentation farmland residual film detection system includes a hardware end, an algorithm end, and a data end; The hardware includes an image acquisition module and a preprocessing module. The image acquisition module is used to acquire image data of farmland areas through a drone platform equipped with a multispectral camera and an RGB camera. The preprocessing module is used to optimize the acquired images by performing noise reduction, enhancement, and reflection correction. The algorithm includes a multi-scale segmentation network module, a dynamic threshold segmentation module, and a classification co-training module. The multi-scale segmentation network module is used to extract and fuse multi-scale features from the preprocessed image. The dynamic threshold segmentation module is used to perform adaptive threshold calculation and binarization segmentation based on the fused features. The classification co-training module is used to perform two-stage co-training and inference, which involves detection followed by segmentation. The data terminal includes a storage medium for storing system data, algorithm models, and processing results.
[0008] Preferably, the preprocessing module includes a wavelet denoising unit, a histogram equalization unit, and a reflection correction unit; The wavelet denoising unit is used to eliminate image noise based on wavelet transform technology; The histogram equalization unit is used to enhance image contrast through a histogram equalization algorithm; The reflection correction unit is used to correct reflective areas in the image based on multispectral information and a generative adversarial network. The calculation formula for the histogram equalization unit is: ; in, Original grayscale level grayscale The number of pixels, This represents the total number of pixels. To equalize the gray levels.
[0009] Preferably, the multi-scale segmentation network module includes an improved backbone network unit, a global attention feature extraction unit, a multi-scale fusion unit, and an upsampling optimization unit; The improved backbone network unit is used to extract basic features of the image, and the global attention feature extraction unit is used to enhance important channel and spatial features through channel attention and spatial attention mechanisms. The multi-scale fusion unit is used to integrate detailed features from the shallow layers of the network with semantic information from the deep layers. The upsampling optimization unit is used to recover and refine the spatial details of the feature map during the decoding process; The channel attention formula for the global attention feature extraction unit: ; in, This is a channel attention weight map. As an activation function, it maps the output to the 0-1 range. It is a multilayer perceptron used to perform nonlinear transformations on aggregated channel features. For input feature maps Perform global average pooling. For input feature maps Perform global max pooling. The input feature map; The spatial attention formula for the global attention feature extraction unit is as follows: ; in, This is a spatial attention weight map. These are convolutional layers, typically 3×3 convolutions, used for feature extraction and dimensionality compression of aggregated spatial features. For input feature maps Perform average pooling along the channel dimension. For the input feature map Perform max pooling along the channel dimension; The final feature formula of the global attention feature extraction unit is as follows: ; in, For the input feature map, For activation function, For element-wise multiplication; The multi-scale fusion unit formula is as follows: ; in, These are shallow detail features. For deep semantic features, The weights are used for training and learning.
[0010] Preferably, the improved backbone network unit includes a multi-branch dilated convolution subunit and an attention enhancement subunit; The multi-branch dilated convolution subunit is used to extract feature information of different sizes from the image simultaneously, and the attention enhancement subunit is used to automatically increase the weight of key features and suppress unimportant features.
[0011] Preferably, the dynamic threshold segmentation module executes an adaptive threshold calculation strategy that coordinates local and global thresholds, and integrates a differentiable binarization network for automatically optimizing key parameters in the threshold calculation process; The adaptive threshold formula of the dynamic threshold segmentation module is as follows: ; in, The final segmentation threshold, This is the global threshold. For local thresholds, The balance coefficient is 0.5-0.7.
[0012] Preferably, the classification collaborative training module includes a residual membrane target detection unit and an instance segmentation unit; The residual film target detection unit is used to quickly locate the possible location of residual film in the image, and the instance segmentation unit is used to perform pixel-level fine segmentation on the located area. The residual film target detection unit and the instance segmentation unit achieve collaborative training and optimization by sharing the feature maps extracted by the backbone network.
[0013] A method for detecting residual plastic film in farmland based on multi-scale semantic segmentation, the specific steps of which are as follows: Step 1: Acquire farmland images through the image acquisition module, and optimize image quality through the preprocessing module; Step 2: Input the optimized image into the multi-scale segmentation network module to complete multi-scale feature extraction, attention enhancement, feature fusion and detail restoration, and output a high-quality feature map; Step 3: Input the high-quality output feature map into the dynamic threshold segmentation module, and generate the final residual membrane binary segmentation mask through its adaptive threshold calculation and parameter optimization mechanism; Step 4: During the model training phase, enable the classification co-training module to jointly optimize model parameters through the collaborative operation of object detection and instance segmentation.
[0014] Preferably, in step two, the multi-scale segmentation network module extracts basic features through its improved backbone network unit and focuses on key features using its internal attention enhancement subunit; the global attention feature extraction unit further filters important features and integrates semantic information at different levels through the multi-scale fusion unit.
[0015] Preferably, in step three, the dynamic threshold segmentation module calculates the segmentation threshold using a weighted combination of global and local thresholds, and automatically learns the weighting coefficients and local window size through backpropagation using an integrated differentiable binarization network.
[0016] A computer-readable storage medium, wherein when the computer program is executed by a processor, the steps of a method for detecting residual agricultural film based on multi-scale semantic segmentation are disclosed.
[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention effectively solves the problems of low efficiency and poor accuracy in traditional farmland residual film detection. Through hardware-side dual-camera acquisition and preprocessing optimization by drones, high-quality farmland images can be quickly acquired. Combined with the collaborative work of multiple modules on the algorithm side, it avoids the drawbacks of manual detection and breaks through the limitations of single equipment and simple algorithms, making residual film detection more efficient and accurate, and meeting the detection needs of large-area farmland.
[0018] 2. This invention can extract and fuse features at different levels through a multi-scale segmentation network module, enhance key features of residual film through a global attention mechanism, and adaptively adjust parameters through dynamic threshold segmentation. Whether it is a large piece of residual film or a tiny fragment, it can be accurately identified and segmented, effectively expanding the detection range and improving the comprehensiveness and accuracy of detection.
[0019] 3. This invention constructs a collaborative system architecture encompassing hardware, algorithms, and data. From image acquisition and preprocessing to feature extraction, segmentation and detection, and data storage and output, each stage is seamlessly integrated. Simultaneously, the classification and collaborative training module continuously optimizes the model, ensuring long-term stable operation of the system. This provides accurate and comprehensive data support for subsequent residual film recycling and pollution control, contributing to sustainable agricultural development. Attached Figure Description
[0020] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0021] Figure 1 This is a system structure diagram of the present invention; Figure 2 This is a diagram of the algorithm-side structure of the present invention; Figure 3 This is a hardware structure diagram of the present invention; Figure 4 This is a structural diagram of the multi-scale segmentation network module of the present invention. Detailed Implementation
[0022] 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.
[0023] Please see Figures 1 to 4 The present invention provides a technical solution: Example 1, please refer to Figure 1 As shown, the farmland residual film detection system based on multi-scale semantic segmentation includes hardware, algorithm and data components. The hardware includes an image acquisition module and a preprocessing module. The image acquisition module is used to collect image data of farmland areas through a drone platform equipped with a multispectral camera and an RGB camera. The preprocessing module is used to optimize the acquired images by performing noise reduction, enhancement, and reflection correction. The algorithm includes a multi-scale segmentation network module, a dynamic threshold segmentation module, and a classification co-training module. The multi-scale segmentation network module is used to extract and fuse multi-scale features from the preprocessed image. The dynamic threshold segmentation module is used to perform adaptive threshold calculation and binarization segmentation based on the fused features. The classification co-training module is used to perform two-stage co-training and inference, which involves detection followed by segmentation. The data side includes storage media used to store system data, algorithm models, and processing results.
[0024] The drone platform used is the DJI M300RTK for agricultural applications, with a flight altitude of 3-10 meters, a speed of 2-5 meters per second, a forward overlap rate of ≥80%, and a lateral overlap rate of ≥60%.
[0025] Multispectral cameras have a wavelength range of 450-950nm and a resolution of ≥2 million pixels, while RGB cameras have a resolution of ≥12 million pixels.
[0026] The storage medium adopts a dual storage mode of 128GB high-speed SD card + Alibaba Cloud OSS. The system data includes acquired images and parameter configurations, the algorithm model includes trained network weights and parameters, and the processing results include residual membrane segmentation mask, location coordinates, and confidence data.
[0027] Example 2, please refer to Figures 1 to 4 As shown, the preprocessing module includes a wavelet denoising unit, a histogram equalization unit, and a reflection correction unit; The wavelet denoising unit is used to eliminate image noise based on wavelet transform technology; The wavelet denoising unit uses the db4 wavelet basis, decomposes into 3-5 layers, and employs soft thresholding to effectively eliminate salt-and-pepper noise and Gaussian noise in farmland images.
[0028] Histogram equalization units are used to enhance image contrast through histogram equalization algorithms; Histogram equalization algorithm enhances contrast by stretching the dynamic range of image grayscale, thus increasing the grayscale difference between residual film and soil and crops. It stretches the concentrated grayscale range of residual film (200-220) to 220-255 and the concentrated grayscale range of soil (50-80) to 30-70, thereby improving the visibility of residual film details.
[0029] The reflection correction unit uses multispectral information and a generative adversarial network to correct reflective areas in an image. The formula for calculating the histogram equalization unit is: ; in, Original grayscale level grayscale The number of pixels, This represents the total number of pixels. To equalize the gray levels.
[0030] The generator in the generative adversarial network adopts the U-Net architecture, and the discriminator consists of 3 convolutional layers and 1 fully connected layer. The training dataset contains 1000+ farmland images with reflective areas, which can accurately correct image distortion areas caused by metal residue reflection, light reflection, etc.
[0031] Furthermore, in the formula middle The value range is 0-255. This is obtained by counting the number of pixels at corresponding gray levels in the image. Given the total number of pixels in the image, grayscale mapping is achieved by calculating the cumulative pixel percentage, making the grayscale distribution of the image more uniform and enhancing the overall sense of depth in the image.
[0032] The multi-scale segmentation network module includes an improved backbone network unit, a global attention feature extraction unit, a multi-scale fusion unit, and an upsampling optimization unit; The improved backbone network unit is used to extract basic image features, and the global attention feature extraction unit is used to enhance important channel and spatial features through channel attention and spatial attention mechanisms. The basic features include low-level information such as the image's edges, texture, and color, specifically the irregular edges of the residual film and the texture of the plastic material. Important channel features refer to the near-infrared channels in the multispectral image that are effective for identifying the residual film, and important spatial features refer to the image region where the residual film is located. The weight of these features is increased through an attention mechanism to suppress interference from background features such as soil and crops.
[0033] Multi-scale fusion units are used to integrate detailed features from shallow layers of the network with semantic information from deeper layers. The shallow detail features come from layers 2 and 3 of the network, corresponding to fine-grained information such as the edge contour and texture details of the residual film.
[0034] Deep semantic information comes from layers 4 and 5 of the network, corresponding to macroscopic information such as the category attributes and overall outline of the residual membrane. The two are fused through weighted splicing to ensure feature integrity.
[0035] The upsampling optimization unit is used to recover and refine the spatial details of the feature map during the decoding process; Upsampling employs a combination of transposed convolution and bilinear interpolation. Transposed convolution improves resolution, while bilinear interpolation optimizes pixel smoothness. Additionally, a boundary awareness module is added, which uses the Sobel operator to calculate pixel gradients to locate residual film boundaries, fine-tunes boundary pixel values to enhance contrast with the background, and improves the detail clarity of small residual films.
[0036] Global attention feature extraction unit channel attention formula: ; in, This is a channel attention weight map, used to calibrate the weights along the channel dimensions of the input feature map. As an activation function, it maps the output to the 0-1 interval, thereby normalizing the channel weights. It is a multilayer perceptron used to perform nonlinear transformations on aggregated channel features. For input feature maps Perform global average pooling to capture global information along the channel dimension. For input feature maps Perform global max pooling to capture salient features along the channel dimension. The input feature map; Global attention feature extraction unit spatial attention formula: ; in, This is a spatial attention weight map, used to calibrate the spatial dimensions of the input feature map. These are convolutional layers, typically 3×3 convolutions, used for feature extraction and dimensionality compression of aggregated spatial features. For input feature maps Perform average pooling along the channel dimension to capture global information along the spatial dimension. For the input feature map Perform max pooling along the channel dimension to capture salient features along the spatial dimension. The input feature map; The final feature formula for the global attention feature extraction unit: ; in, For the input feature map, For activation function, For element-wise multiplication; Multi-scale fusion unit formula: ; in, These are shallow detail features. For deep semantic features, The weights are used for training and learning.
[0037] The improved backbone network units include multi-branch dilated convolutional subunits and attention-enhancing subunits; Multi-branch dilated convolutional subunits are used to extract feature information of different sizes from the image simultaneously, while attention enhancement subunits are used to automatically increase the weight of key features and suppress unimportant features.
[0038] The multi-branch dilated convolutional subunit contains three branches with dilation rates of 1, 3, and 5, respectively. It can simultaneously extract feature information in the range of 1×1, 3×3, and 5×5, adapting to different sizes of residual membranes from fragments to complete membranes. The attention enhancement subunit determines the weights by calculating the feature information entropy. The weights of residual membrane features with high information entropy are increased, while the weights of low information entropy features such as soil and crops are suppressed.
[0039] The dynamic threshold segmentation module implements an adaptive threshold calculation strategy that combines local and global thresholds, and integrates a differentiable binarization network to automatically optimize key parameters in the threshold calculation process. Adaptive threshold formula for dynamic threshold segmentation module: ; in, The final segmentation threshold, This is the global threshold. For local thresholds, The balance coefficient is 0.5-0.7.
[0040] Through formula The global threshold T is calculated using the Otsu method or the Otsu algorithm, and is suitable for analyzing the overall brightness distribution of the entire image. Local threshold... This employs a sliding window technique, calculating values such as the mean or Gaussian weighted average based on pixel neighborhood statistics within a local image region. Balance coefficient. By dynamically adjusting the differentiable binarization network, the network is optimized using gradient descent. The threshold is combined with the segmentation loss function for end-to-end training to ensure that the threshold adapts to different lighting and background changes, thereby improving the accurate segmentation effect of residual membrane edges.
[0041] In addition, in the residual film detection process, the dynamic threshold segmentation module first applies this threshold strategy to the feature map to generate a binary mask, then removes noise through morphological operations, and finally outputs a residual film region with high confidence.
[0042] The classification collaborative training module includes a residual membrane target detection unit and an instance segmentation unit; The residual film target detection unit is used to quickly locate the possible location of residual film in the image, and the instance segmentation unit is used to perform pixel-level fine segmentation on the located region. The residual film target detection unit uses the lightweight version of YOLOv5, which can quickly output the bounding box of the residual film candidate region in the image and filter more than 90% of the background area.
[0043] The instance segmentation unit is based on a multi-scale segmentation network to perform pixel-level segmentation of candidate regions, accurately label the pixel range of residual film, and distinguish residual film from background impurities.
[0044] The residual film target detection unit and the instance segmentation unit achieve collaborative training and optimization by sharing the feature maps extracted by the backbone network.
[0045] Example 3, please refer to Figures 1 to 4 As shown, the method for detecting residual plastic film in farmland based on multi-scale semantic segmentation has the following specific steps: Step 1: Acquire farmland images through the image acquisition module, and optimize image quality through the preprocessing module; Step 2: Input the optimized image into the multi-scale segmentation network module to complete multi-scale feature extraction, attention enhancement, feature fusion and detail restoration, and output a high-quality feature map; Step 3: Input the high-quality output feature map into the dynamic threshold segmentation module, and generate the final residual membrane binary segmentation mask through its adaptive threshold calculation and parameter optimization mechanism. Step 4: During the model training phase, enable the classification co-training module to jointly optimize model parameters through the collaborative operation of object detection and instance segmentation.
[0046] In step two, the multi-scale segmentation network module extracts basic features through its improved backbone network units and focuses on key features using its internal attention enhancement subunits; the global attention feature extraction unit further filters important features and integrates semantic information from different levels through the multi-scale fusion unit.
[0047] In step three, the dynamic threshold segmentation module calculates the segmentation threshold by using a weighted combination of global and local thresholds, and automatically learns the weighting coefficients and local window size through backpropagation using an integrated differentiable binarization network.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A farmland residual film detection system based on multi-scale semantic segmentation, characterized in that: The multi-scale semantic segmentation system for detecting residual agricultural film includes a hardware component, an algorithm component, and a data component. The hardware includes an image acquisition module and a preprocessing module. The image acquisition module is used to acquire image data of farmland areas through a drone platform equipped with a multispectral camera and an RGB camera. The preprocessing module is used to optimize the acquired images by performing noise reduction, enhancement, and reflection correction. The algorithm includes a multi-scale segmentation network module, a dynamic threshold segmentation module, and a classification co-training module. The multi-scale segmentation network module is used to extract and fuse multi-scale features from the preprocessed image. The dynamic threshold segmentation module is used to perform adaptive threshold calculation and binarization segmentation based on the fused features. The classification co-training module is used to perform two-stage co-training and inference, which involves detection followed by segmentation. The data terminal includes a storage medium for storing system data, algorithm models, and processing results.
2. The farmland residual film detection system based on multi-scale semantic segmentation according to claim 1, characterized in that: The preprocessing module includes a wavelet denoising unit, a histogram equalization unit, and a reflection correction unit; The wavelet denoising unit is used to eliminate image noise based on wavelet transform technology; The histogram equalization unit is used to enhance image contrast through a histogram equalization algorithm; The reflection correction unit is used to correct reflective areas in the image based on multispectral information and a generative adversarial network. The calculation formula for the histogram equalization unit is: ; in, Original grayscale level grayscale The number of pixels, This represents the total number of pixels. To equalize the gray levels.
3. The farmland residual film detection system based on multi-scale semantic segmentation according to claim 1, characterized in that: The multi-scale segmentation network module includes an improved backbone network unit, a global attention feature extraction unit, a multi-scale fusion unit, and an upsampling optimization unit; The improved backbone network unit is used to extract basic features of the image, and the global attention feature extraction unit is used to enhance important channel and spatial features through channel attention and spatial attention mechanisms. The multi-scale fusion unit is used to integrate detailed features from the shallow layers of the network with semantic information from the deep layers. The upsampling optimization unit is used to recover and refine the spatial details of the feature map during the decoding process; The channel attention formula for the global attention feature extraction unit: ; in, This is a channel attention weight map. As an activation function, it maps the output to the 0-1 range. It is a multilayer perceptron used to perform nonlinear transformations on aggregated channel features. For input feature maps Perform global average pooling. For input feature maps Perform global max pooling. The input feature map; The spatial attention formula for the global attention feature extraction unit is as follows: ; in, This is a spatial attention weight map. These are convolutional layers, typically 3×3 convolutions, used for feature extraction and dimensionality compression of aggregated spatial features. For input feature maps Perform average pooling along the channel dimension. For the input feature map Perform max pooling along the channel dimension; The final feature formula of the global attention feature extraction unit is as follows: ; in, For the input feature map, For activation function, For element-wise multiplication; The multi-scale fusion unit formula is as follows: ; in, These are shallow detail features. For deep semantic features, The weights are used for training and learning.
4. The farmland residual film detection system based on multi-scale semantic segmentation according to claim 3, characterized in that: The improved backbone network unit includes a multi-branch dilated convolution subunit and an attention-enhancing subunit; The multi-branch dilated convolution subunit is used to extract feature information of different sizes from the image simultaneously, and the attention enhancement subunit is used to automatically increase the weight of key features and suppress unimportant features.
5. The farmland residual film detection system based on multi-scale semantic segmentation according to claim 1, characterized in that: The dynamic threshold segmentation module executes an adaptive threshold calculation strategy that combines local and global thresholds, and integrates a differentiable binarization network to automatically optimize key parameters in the threshold calculation process. The adaptive threshold formula of the dynamic threshold segmentation module is as follows: ; in, The final segmentation threshold, This is the global threshold. For local thresholds, The balance coefficient is 0.5-0.
7.
6. The farmland residual film detection system based on multi-scale semantic segmentation according to claim 1, characterized in that: The classification collaborative training module includes a residual membrane target detection unit and an instance segmentation unit; The residual film target detection unit is used to quickly locate the possible location of residual film in the image, and the instance segmentation unit is used to perform pixel-level fine segmentation on the located area. The residual film target detection unit and the instance segmentation unit achieve collaborative training and optimization by sharing the feature maps extracted by the backbone network.
7. A method for detecting residual plastic film in farmland based on multi-scale semantic segmentation, the system for detecting residual plastic film in farmland based on multi-scale semantic segmentation according to any one of claims 1-6, characterized in that: The specific steps of the method for detecting residual plastic film in farmland are as follows: Step 1: Acquire farmland images through the image acquisition module, and optimize image quality through the preprocessing module; Step 2: Input the optimized image into the multi-scale segmentation network module to complete multi-scale feature extraction, attention enhancement, feature fusion and detail restoration, and output a high-quality feature map; Step 3: Input the high-quality output feature map into the dynamic threshold segmentation module, and generate the final residual membrane binary segmentation mask through its adaptive threshold calculation and parameter optimization mechanism; Step 4: During the model training phase, enable the classification co-training module to jointly optimize model parameters through the collaborative operation of object detection and instance segmentation.
8. The method for detecting residual agricultural film based on multi-scale semantic segmentation according to claim 7, characterized in that: In step two, the multi-scale segmentation network module extracts basic features through its improved backbone network unit and focuses on key features using its internal attention enhancement subunit; the global attention feature extraction unit further filters important features and integrates semantic information at different levels through the multi-scale fusion unit.
9. The method for detecting residual agricultural film based on multi-scale semantic segmentation according to claim 7, characterized in that: In step three, the dynamic threshold segmentation module calculates the segmentation threshold by using a weighted combination of global and local thresholds, and automatically learns the weighting coefficients and local window size through backpropagation using an integrated differentiable binarization network.
10. A computer-readable storage medium, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for detecting residual agricultural film based on multi-scale semantic segmentation as described in any one of claims 7 to 9.
Citation Information
Patent Citations
Farmland residual film residue detection and early warning method and system based on deep learning
CN112581301A
Small farmland image segmentation method and device based on double attention mechanism
CN115797929A
Multi-layer multi-scale segmentation agricultural greenhouse type information extraction method and system
CN115953685A
Multispectral unmanned aerial vehicle remote sensing image crop segmentation method
CN116503590A