Search

CN-121982550-A - Light-weight field weed detection method, light-weight field weed detection device, computer equipment, storage medium and program product

CN121982550ACN 121982550 ACN121982550 ACN 121982550ACN-121982550-A

Abstract

The application discloses a light-weight field weed detection method, a light-weight field weed detection device, computer equipment, a storage medium and a program product, and relates to the field of computer vision. The weed detection method comprises the steps of constructing a weed detection model, including a backbone network, a neck network and a detection head, introducing a dynamic sampling enhancement module into the backbone network for adaptively adjusting the sampling position of a convolution kernel in the backbone network, introducing a cross-layer guiding aggregation module into the neck network for carrying out explicit guiding on low-layer details in bottom layer characteristics by utilizing high-layer semantics in the high-layer characteristics based on two-way input of the high-layer characteristics and the low-layer characteristics, fusing the high-layer characteristics and the low-layer characteristics by utilizing differential information between the high-layer characteristics and the bottom layer characteristics, inputting image data of a farmland scene into the weed detection model, and identifying and outputting weed types. The scheme realizes effective balance between light weight and high performance, and can provide stable, rapid and accurate weed detection results in complex farmland scenes.

Inventors

  • YAN HUI
  • XU XIAOQING
  • YU PING
  • LONG YUNXIN
  • Long Duo
  • LI MINGXIN

Assignees

  • 宿迁学院

Dates

Publication Date
20260505
Application Date
20260206

Claims (10)

  1. 1. A method for lightweight field weed detection, the method comprising: acquiring image data in a farmland environment; The weed detection model is constructed and comprises a backbone network, a neck network and a detection head, wherein a dynamic sampling enhancement module is introduced into the backbone network and used for adaptively adjusting the sampling position of a convolution kernel in the backbone network, a cross-layer guiding aggregation module is introduced into the neck network and used for carrying out explicit guiding on low-layer details in the bottom layer characteristics by utilizing high-layer semantics in the high-layer characteristics and carrying out fusion on the high-layer characteristics and the low-layer characteristics by utilizing difference information between the high-layer characteristics and the bottom layer characteristics based on two-way input of the high-layer characteristics and the low-layer characteristics; And inputting the image data into the weed detection model, and identifying and outputting weed types.
  2. 2. The method of claim 1, wherein the dynamic sampling enhancement module comprises parallel dynamic sampling branches, standard convolution branches; When the dynamic sampling enhancement module receives an input feature, the dynamic sampling branch predicts a two-dimensional offset and a modulation coefficient corresponding to each sampling point on the input feature through a lightweight convolution block, and obtains a modulation output of the input feature according to the two-dimensional offset and the modulation coefficient; The standard convolution branch acquires standard output of the input feature through a standard convolution block; and the dynamic sampling model carries out residual fusion on the modulation output and the standard output and then outputs the result.
  3. 3. The method of claim 1, wherein the processing of the high-level features and the low-level features by the cross-layer boot aggregation module comprises: carrying out global tie pooling treatment on the high-level features, and extracting global semantic vectors; mapping the semantic vector by adopting a double-layer fully-connected network to generate channel-level guide weights; carrying out channel recalibration on the low-level features by using the guide weights to obtain semantically enhanced low-level features; acquiring cross-layer differential characteristics between the semantically enhanced low-layer characteristics and the high-layer characteristics; And fusing the low-level features, the high-level features, the semantically enhanced low-level features and the cross-layer differential features in a channel dimension and outputting the fused low-level features, the high-level features, the semantically enhanced low-level features and the cross-layer differential features.
  4. 4. The method of claim 1, wherein the processing of the image data by the weed detection model after the image data is input to the weed detection model comprises: The backbone network extracts multi-scale features from the image data, and the multi-scale features are processed by the dynamic sampling enhancement module to obtain multi-scale enhancement features; the neck network performs feature fusion on the multi-scale enhancement features through the cross-layer guide aggregation module to obtain fusion features; the detection head acquires fusion characteristics, and identifies and outputs weed types.
  5. 5. The method of claim 1, wherein the weed detection model is constructed based on YOLOv-n frames.
  6. 6. The method according to claim 5, wherein: The backbone network comprises four layers of C3K2 modules, SPPF modules and C2PSA modules which are sequentially connected, a convolution module is arranged in front of each C3K2 module, and the dynamic sampling enhancement modules are embedded in the third and fourth layers of C3K2 modules; The neck network comprises four layers of C3K2 modules which are sequentially connected, wherein the front parts of the first layer of C3K2 module and the second layer of C3K2 module respectively comprise an up-sampling module and a splicing module, the front parts of the third layer of C3K2 module and the fourth layer of C3K2 module respectively comprise a convolution module and a splicing module, the second layer of C3K2 module in the backbone network and the second layer of C3K2 module in the neck network are connected to the first layer of cross-layer guiding aggregation module, the third layer of C3K2 module in the backbone network and the third layer of C3K2 module in the neck network are connected to the second layer of cross-layer guiding aggregation module, and the fourth layer of C3K2 module in the backbone network and the third layer of C3K2 module in the neck network are connected to the third layer of cross-layer guiding aggregation module; All the cross-layer guiding aggregation modules are connected to the corresponding detection heads.
  7. 7. A lightweight field weed detection device, the device comprising: The data acquisition module is used for acquiring image data in a farmland environment; The weed detection model comprises a backbone network, a neck network and a detection head, wherein a dynamic sampling enhancement module is introduced into the backbone network and used for adaptively adjusting the sampling position of a convolution kernel in the backbone network, a cross-layer guiding aggregation module is introduced into the neck network and used for carrying out explicit guiding on low-layer details in the bottom layer characteristics by utilizing high-layer semantics in the high-layer characteristics and carrying out fusion on the high-layer characteristics and the low-layer characteristics by utilizing difference information between the high-layer characteristics and the bottom layer characteristics based on two-way input of the high-layer characteristics and the low-layer characteristics; and the prediction output module is used for inputting the image data into the pre-trained weed detection model, and identifying and outputting weed types.
  8. 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
  9. 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
  10. 10. A program product comprising a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps of the method according to any one of claims 1 to 6.

Description

Light-weight field weed detection method, light-weight field weed detection device, computer equipment, storage medium and program product Technical Field The application relates to the technical field of computer vision, in particular to a light-weight field weed detection method, a light-weight field weed detection device, computer equipment, a storage medium and a program product. Background With the advanced integration of information technology and agricultural production, intelligent agriculture has become an important direction of modern agricultural development. The cooperative application of new generation information technologies such as the Internet of things, big data, edge computing, cloud computing, artificial intelligence and the like promotes the farmland environment perception, operation decision and execution process to be developed to automation and intellectualization. Under the background, the target detection technology based on computer vision plays a key role in tasks such as crop identification, weed monitoring, intelligent agricultural machinery navigation and the like, and the detection precision and the real-time performance of the target detection technology are directly related to the operation efficiency and the operation reliability of agricultural intelligent equipment. However, field weed detection faces challenges such as complex background, large target scale variation, similarity of weed and crop appearance, and the like, and the weed leaves commonly have non-rigid characteristics such as bending, shielding, irregular morphology and the like, so that higher requirements are put on the expression capacity of model characteristics. Although single-stage detection models represented by YOLO series have advantages in terms of reasoning efficiency, their parameter scale and computational complexity increase as the models deepen, limiting deployment on resource-constrained edge devices. Along with the continuous deepening of the application of edge calculation in intelligent agriculture, the target detection model needs to be high in precision, robustness and instantaneity under the conditions of limited calculation power and energy consumption, and the light-weight and high-efficiency weed detection algorithm becomes a key direction of breakthrough of the current technology. Disclosure of Invention Based on the above, it is necessary to provide a light-weight field weed detection method, device, computer equipment, storage medium and program product, which can improve the perceptibility of the model to small-scale and deformation targets, and provide a more universal and efficient solution for intelligent weed detection tasks. In a first aspect, the present application provides a lightweight field weed detection method. The method comprises the following steps: acquiring image data in a farmland environment; the weed detection model comprises a backbone network, a neck network and a detection head, wherein a dynamic sampling enhancement module is introduced into the backbone network and used for adaptively adjusting the sampling position of a convolution kernel in the backbone network, a cross-layer guiding aggregation module is introduced into the neck network and used for carrying out explicit guiding on low-layer details in bottom layer characteristics by utilizing high-layer semantics in the high-layer characteristics and carrying out fusion on the high-layer characteristics and the low-layer characteristics by utilizing difference information between the high-layer characteristics and the bottom layer characteristics based on two-way input of the high-layer characteristics and the low-layer characteristics; the image data is input into the weed detection model, and the weed species is identified and output. In one embodiment, the dynamic sampling enhancement module comprises parallel dynamic sampling branches, standard convolution branches; when the dynamic sampling enhancement module receives an input feature, the dynamic sampling branch predicts a two-dimensional offset and a modulation coefficient corresponding to each sampling point on the input feature through a lightweight convolution block, and obtains a modulation output of the input feature according to the two-dimensional offset and the modulation coefficient; standard convolution branches acquire standard output of input features through a standard convolution block; and the dynamic sampling model carries out residual fusion on the modulation output and the standard output and then outputs the result. In one embodiment, the processing of the high-level features and the low-level features by the cross-layer boot aggregation module includes: carrying out global tie pooling treatment on the high-level features, and extracting global semantic vectors; mapping the semantic vector by adopting a double-layer fully-connected network to generate channel-level guide weights; channel weight calibration is carried out on