Insect detection method and system under complex background based on deep learning feature enhancement

By designing the S-Insect-Det network structure in insect detection, combining EfficientViT and bidirectional multi-scale fusion architecture, the problem of insect detection in complex background is solved, efficient identification of small target insects is achieved, and the accuracy of detection is improved. robustness.

CN119229476APending Publication Date: 2024-12-31WUXI UNIV

Patent Information

Application Number
CN202411718475.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Agricultural insect detection lacks the dynamically captured insect images in real scenes, especially small-target insect detection, and the prior art is difficult to accurately identify in complex contexts.

Method used

A complex background insect detection method based on deep learning feature enhancement was designed, using the S-Insect-Det network structure, including backbone network (EfficientViT based on Transformer), neck network (bidirectional multi-scale fusion architecture) and detection head. Improve the accuracy and robustness of insect detection through multi-scale feature fusion and deformable gradient flow module.

Benefits of technology

In complex background, the accuracy and resolution ability of insect detection are significantly improved, especially the detection performance of small-target insects has been greatly improved, reducing computational redundancy, and achieving more efficient insect recognition results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229476A_ABST
    Figure CN119229476A_ABST
Patent Text Reader

Abstract

The invention discloses an insect detection method and system under a complex background based on deep learning feature enhancement, and relates to the field of small target detection. The problem that agricultural insect detection lacks insect images dynamically captured in a real scene is solved. The method comprises the following steps: acquiring an image, and preprocessing the image; the method comprises the following steps: constructing an S-Insert-Det network structure, wherein the S-Insert-Det network structure comprises a backbone network, a neck network and a detection head; the backbone network is an OfficientViT network based on a Transform, and the backbone network is an EficientViT network based on a Transform; the neck network is a bidirectional multi-scale fusion architecture; image feature extraction is carried out through the backbone network, and multi-scale feature fusion is carried out through the neck network; and outputting feature representation after feature fusion through the detection head, and obtaining an insect recognition result. The method is applied to the field of insect recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of small target detection, and in particular to a method for detecting insects in complex backgrounds based on deep learning feature enhancement. Background Art

[0002] Reducing the economic losses caused by pests to agricultural and forestry crops and increasing the economic benefits brought by beneficial insects to agricultural and forestry crops are the contents of agricultural research. Automated monitoring of insects, especially small organisms, in complex natural environments is conducive to promoting agricultural development. Image recognition technology based on deep learning can complete this task economically and efficiently. However, the current research on agricultural insect detection lacks insect images captured dynamically in real scenes, especially small target insects. It is more challenging to extract insect targets from such images. Summary of the invention

[0003] Aiming at the problem that agricultural insect detection lacks insect images dynamically captured in real scenes, the present invention proposes an insect detection method in a complex background based on deep learning feature enhancement, the method comprising: Acquire an image and preprocess the image; Constructing an S-Insect-Det network structure, the S-Insect-Det network structure includes a backbone network, a neck network and a detection head; the backbone network is an EfficientViT network based on Transformer; the neck network is a bidirectional multi-scale fusion architecture; Image feature extraction is performed through the backbone network, and multi-scale feature fusion is performed through the neck network; The detection head outputs feature representation after feature fusion to obtain the insect recognition result.

[0004] Furthermore, a preferred method is proposed, in which the backbone network part uses EfficientViT as the core to extract insect image features. After the image features are extracted, a high-resolution feature map P3, a medium-resolution feature map P4 and a low-resolution feature map P5 are output through the SPPF module.

[0005] Furthermore, a preferred method is proposed, in which the bidirectional multi-scale fusion architecture of the neck network includes: a bottom-up path and a top-down path.

[0006] Furthermore, a preferred method is proposed, wherein the bottom-up path is to transfer the low-resolution feature map to the high-level, including: upsampling, splicing, deformable gradient flow module DCN2f, and weighted sum feature fusion mechanism; the top-down path is to reversely transfer the high-level semantic information and inject it into the low-level features.

[0007] Furthermore, a preferred method is proposed, wherein the deformable gradient flow module DCN2f includes: a CBS module and a DCN Blocks deformable convolution module; the CBS module is used to perform initial feature extraction and standardization on the input; the output features pass through multiple serially connected DCN Blocks deformable convolution modules; the outputs of multiple paths are fused, and the final features are output through a CBS module.

[0008] Furthermore, a preferred embodiment is proposed, in which the output of the DCN Blocks deformable convolution module is divided into multiple branches and processed separately, and multiple DCN modules are stacked inside the branches.

[0009] Furthermore, a preferred method is proposed, in which the detection head has a two-level structure, including: a one-to-many branch and a one-to-one branch; the one-to-many branch is used to associate each target with multiple prior boxes, and learn the diverse representation of the target by assigning multiple positive samples; the one-to-one branch is used to assign a positive sample to each target, and the positive sample is associated with the center point of the target or the best prior box.

[0010] Based on the same inventive concept, the present invention also proposes an insect detection device in a complex background based on deep learning feature enhancement, the device comprising: An image acquisition unit, used to acquire an image and pre-process the image; S-Insect-Det network structure construction unit, used to construct the network structure of S-Insect-Det; the S-Insect-Det network structure includes a backbone network, a neck network and a detection head; the backbone network is a Transformer-based EfficientViT network; the neck network is a bidirectional multi-scale fusion architecture; A feature extraction unit, used for extracting image features through the backbone network and performing multi-scale feature fusion through the neck network; The output unit is used to output the feature representation after feature fusion through the detection head to obtain the insect recognition result.

[0011] Based on the same inventive concept, the present invention also proposes a computer device, including a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes the method for detecting insects in a complex background based on deep learning feature enhancement as described above.

[0012] Based on the same inventive concept, the present invention also proposes a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for detecting insects in a complex background based on deep learning feature enhancement as described in any of the above items are executed.

[0013] The present invention is beneficial in that: In a complex background, insects will produce similar visual features to the background color, shape, etc., resulting in detection difficulties. The present invention proposes a method for detecting insects in a complex background based on deep learning feature enhancement. The S-Insect-Det network structure is designed for insect recognition. The S-Insect-Det network structure is mainly divided into three parts: a backbone network, a neck network, and a detection head. The backbone network is mainly responsible for extracting features from the input image to learn features at different levels in the image. The neck network is used to further enhance the features extracted by the backbone network and provide richer features for the detection head, including multi-scale feature integration, which helps the detection framework capture objects of different sizes, build feature pyramids, and improve the detection performance of small target objects. The detection head is responsible for generating the final detection results, including the category and position of the object. EfficientViT is used as the backbone network. The network not only has a lightweight architecture style but also has the ability to extract global information of the image through visual attention. At the same time, the downsampling is modified to retain more low-level detail information and improve the detection accuracy of small target insects. The neck network draws on the BiFPN architecture, changes the 5-layer structure to a 3-layer structure, and designs a two-way dynamic cross-scale fusion module to enhance the main features in the image and fully integrate multi-scale information. The detection head adopts the Yolov10 detection head strategy, using a lightweight classification head, spatial channel decoupling downsampling and sorting guidance block design to reduce computational redundancy and achieve a more efficient architecture, and replaces the regression loss function to improve the small target detection capability. Therefore, the S-Insect-Det network structure can not only strengthen the feature representation of different scales, so that the detailed information and overall contour information of the insect can be fully captured, but also further improve the detection accuracy, especially in complex backgrounds, the ability to distinguish between insects and backgrounds is greatly enhanced.

[0014] The invention is applied to the field of insect identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a flow chart of the method for detecting insects in complex backgrounds based on deep learning feature enhancement as described in implementation mode 1; Figure 2 This is a schematic diagram of the S-Insect-Det network structure described in Implementation Method 2; Figure 3 This is a schematic diagram of the neck network structure described in the third embodiment; Figure 4 This is a schematic diagram of the deformable gradient flow module DCN2f described in Embodiment 5; Figure 5 A comparison chart of AP values ​​compared with various detection algorithms in nine insect detections according to the eleventh embodiment, wherein the AP value represents the accuracy rate; Figure 6 This is a schematic diagram of the detection results of the S-Insect-Det network structure described in Implementation Example 11. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0017] Implementation method 1, see Figure 1 The present embodiment is described in detail. The method for detecting insects in a complex background based on deep learning feature enhancement described in the present embodiment comprises: Acquire an image and preprocess the image; Constructing an S-Insect-Det network structure; the S-Insect-Det network structure includes a backbone network, a neck network and a detection head; the backbone network is an EfficientViT network based on Transformer; the neck network is a bidirectional multi-scale fusion architecture; Image feature extraction is performed through the backbone network, and multi-scale feature fusion is performed through the neck network; The detection head outputs feature representation after feature fusion to obtain the insect recognition result.

[0018] Although traditional convolutional neural networks (CNNs) perform well in image processing tasks, their limitation is that they are less effective in processing long-distance dependencies. In the method for detecting insects in complex backgrounds based on deep learning feature enhancement proposed in this embodiment, the Transformer-based EfficientViT network is designed to effectively capture the relationship between long-distance pixels in the image through the self-attention mechanism, especially in complex backgrounds, and can extract more global features. This is especially important for the position changes of insects in dynamic scenes, and can help the model better cope with the changes of insects in different positions and postures.

[0019] In complex backgrounds, insects will produce similar visual features to the background color, shape, etc., making detection difficult. In this implementation, a network structure of S-Insect-Det is designed, which consists of a three-layer network structure, in which the neck network adopts a bidirectional multi-scale fusion architecture to help extract features at different levels from multiple scales and effectively fuse them. This architecture can strengthen the feature representation of different scales, so that the detailed information and overall contour information of the insect can be fully captured, further improving the accuracy of detection, especially in complex backgrounds, the ability to distinguish insects from the background is greatly enhanced.

[0020] Furthermore, through the backbone network (EfficientViT) and the neck network (bidirectional multi-scale fusion architecture), the method proposed in this embodiment can efficiently extract important features in the image and output the feature representation after feature fusion through the detection head. This process not only improves the accuracy of insect detection, but also reduces the amount of calculation and increases the detection speed. Efficient calculation enables this method to be applied in real-time monitoring in agricultural production, especially when dynamic detection of insect behavior can be achieved, so that timely response can be achieved.

[0021] Implementation Method 2: See Figure 2 This embodiment further defines the method for detecting insects in complex backgrounds based on deep learning feature enhancement described in Embodiment 1. The backbone network uses EfficientViT as the core to extract insect image features. After image feature extraction, the SPPF module outputs a high-resolution feature map P3, a medium-resolution feature map P4, and a low-resolution feature map P5.

[0022] In this implementation, EfficientViT is used as the backbone network, combining Vision Transformer (ViT) with efficient computing methods. Compared with traditional convolutional neural networks (CNNs), transformer networks have global perception capabilities and can better capture long-distance dependencies in images, which is very important for insect detection in complex backgrounds. The design of EfficientViT further optimizes computing efficiency, which can reduce the consumption of computing resources while ensuring accuracy.

[0023] By using EfficientViT, features in insect images can be effectively extracted, especially in complex backgrounds, helping to improve the accuracy and robustness of insect recognition.

[0024] Furthermore, after feature extraction, the PPF module (spatial pyramid pooling) is used to perform pooling operations on images at different scales, thereby generating feature maps of different resolutions. In this scheme, multiple feature maps such as P3 (high resolution), P4 (medium resolution), and P5 (low resolution) are output. Through feature maps of different scales, the backbone network can capture the detailed features of insects and the characteristics of a large range of environmental backgrounds from high, medium, and low resolution levels, respectively, effectively solving the scale transformation problem in insect target recognition under complex backgrounds. The high-resolution feature map (P3) can capture the details of insects and is suitable for fine target positioning. The low-resolution feature map (P5) can focus on a larger area and identify the approximate location of insects in the environment. The medium-resolution feature map (P4) serves as an intermediate layer, which can balance accuracy and computational efficiency. This multi-scale information fusion strategy helps the model understand image content from different levels, improve the robustness and anti-interference ability of insect detection, and reduce the probability of false detection and missed detection, especially in complex natural environments.

[0025] Implementation method three, see Figure 3 This embodiment is a further limitation of the method for detecting insects in complex backgrounds based on deep learning feature enhancement described in Embodiment 1, wherein the bidirectional multi-scale fusion architecture of the neck network includes: a bottom-up path and a top-down path.

[0026] In this embodiment, the bottom-up path is responsible for extracting local details and low-level features, such as texture, color, shape, etc. In insect detection, this part helps the model accurately capture the local features of insects, such as wings, antennae, body shape, etc. The bottom-up path ensures that low-level information is not lost in the network and provides details for further analysis. In insect detection, complex backgrounds can interfere with insect detection. Through the top-down path, the network can better capture the overall environmental background information, thereby distinguishing the difference between insects and backgrounds and reducing false detections.

[0027] Combining features of different scales, especially in complex scenes, where the size and shape of insects may vary, the network can handle insects of different sizes and image details of different resolutions through multi-scale fusion, making detection more robust and accurate.

[0028] Furthermore, the bidirectional path design enables information to flow in both directions in the network, from local details to global context, and then from global information to local fine features, maximizing the use of features at all levels. This structure avoids the one-way flow of information and reduces information loss, thereby improving the accuracy and efficiency of the model. Through multi-scale processing, the network can adaptively select the appropriate scale for detection, avoiding the insufficient processing of insects of different sizes in traditional single-scale methods. This not only improves the accuracy of detection, but also enhances the ability to process images of different input resolutions.

[0029] Implementation method 4. This implementation method is a further limitation of the insect detection method in complex background based on deep learning feature enhancement described in implementation method 3. The bottom-up path is the transmission of low-resolution feature maps to high-level layers, including: upsampling, splicing, deformable gradient flow module DCN2f, and weighted sum feature fusion mechanism; the top-down path is the reverse transmission of high-level semantic information and injection into low-level features.

[0030] Upsampling in the bottom-up path helps to recover the spatial information of low-resolution feature maps. By upsampling low-resolution feature maps to high resolution, more detailed features can be retained. This is especially important for detecting small objects (such as insects), which are usually blurred at low resolution. Stitching feature maps at different levels can enhance the model's perception of multi-scale information. By fusing features from different levels, the network can capture the various characteristics of insects more comprehensively. By designing the deformable convolution module DCN2f to identify insects with irregular shapes and variable postures, it adapts to the changes of insects in different image backgrounds and improves detection accuracy. The weighted sum fusion mechanism can weight different feature maps according to their importance, thereby effectively combining multi-level information.

[0031] In deep neural networks, high layers usually contain richer semantic information (such as object categories, overall structures, etc.), while low-level features focus more on details (such as edges, textures, etc.). By passing high-level semantic information back to low-level features, the network can better understand the semantic content of objects, thereby improving the ability to distinguish insects in complex backgrounds. This top-down path can help low-level features better align to the target object (insect). For example, in a complex background, the low layer may extract a lot of background noise or irrelevant features. With the guidance of high-level semantics, the model can better focus on the relevant features of the insect and avoid background interference.

[0032] By combining the feature enhancement mechanism of bottom-up and top-down paths, the neck network can capture multi-level and multi-scale information more comprehensively. This feature fusion not only enhances the robustness of insect detection, but also improves the adaptability to complex backgrounds. In complex backgrounds, insects may have similar colors, shapes or textures to the background. Through the fusion of multi-level features, the network can effectively separate the target from the background and improve the detection accuracy and recall rate.

[0033] This embodiment is explained in conjunction with the third embodiment. The information contained in the shallow features is helpful for small target detection. The neck network structure of the model mainly fuses multi-scale features. After multiple scale feature extractions, some detail information will be lost, which increases the difficulty of detecting small target pests in complex scenarios. Therefore, in this embodiment, an improved neck connection structure based on BiFPN is used to enhance the small target features in the deep features by fusing multi-scale features, thereby improving detection accuracy. The neck structure of a general target detection model adopts a path aggregation network (PANet) to connect shallow features to the top layer through a bottom-up path, greatly shortening the path for shallow features to be transmitted upward in the feature pyramid (FPN) structure and reducing the loss of shallow features. However, as the number of convolutions increases, features that are beneficial to the detection of small targets are still severely lost. The BiFPN structure designed in this embodiment is as follows: Figure 3 As shown in the figure, features from the original input are added to the feature transfer path at the same level of the PANet structure. The corresponding dotted arrows in the figure. BiFPN deletes the single input node without feature fusion, obtains features from feature maps of different resolutions through cross-scale connections, and reuses top-down and bottom-up features to achieve bidirectional feature fusion. At the same time, considering the different contributions of these input features of different resolutions to the localization and classification of small target pests, corresponding weights are assigned to different input features according to their importance, realizing cross-scale weighted feature fusion.

[0034] Implementation method 5: See Figure 4 This embodiment further defines the method for detecting insects in complex backgrounds based on deep learning feature enhancement described in Embodiment 4, wherein the deformable gradient flow module DCN2f includes: a CBS module and a DCN Blocks deformable convolution module; the CBS module is used to perform initial feature extraction and standardization on the input; the output features are passed through multiple DCN Blocks deformable convolution modules connected in series; the outputs of multiple paths are fused, and the final features are output through a CBS module.

[0035] In the trap images captured in dynamic scenes, the background of the target is complex and the target position is not fixed. Traditional convolution lacks the ability to capture the characteristics of dynamic and variable targets. To address the above problems, this implementation proposes a deformable gradient flow module DCN2f based on the deformable convolutional network (DCN). By parallelizing more gradient flow branches, it ensures lightweight while obtaining richer gradient flow information. The split operation in the DCN2f module converts the input features into Figure 1 It is divided into two parts, one part enters the residual block for processing, and the other part directly participates in the subsequent splicing operation. This operation aims to increase the feature expression ability of the model. By splitting the input feature map, the model can extract and process features on different paths, thereby improving the performance and accuracy of the model. The specific structure is as follows Figure 4 As shown in the figure, the bottleneck structure in the module is redesigned and named DCNBlock. By introducing deformable convolution kernels and deformable ROI pooling, the convolution kernel adds an offset at the sampling position to better adapt to targets of different shapes and sizes. The DCN2f structure can enhance effective feature edge information and improve the recognition ability of small target insects.

[0036] The DCN2f module structure processing flow is as follows: The input first passes through a CBS module (Conv-BN-Activation, a combination of convolutional layer, batch normalization layer and activation function). This module is used to perform preliminary feature extraction and normalization on the input. The parameters are marked as s=1, k=1, which means that a convolution operation with a step size of 1 and a convolution kernel size of 1x1 is used. The main function is to adjust the number of channels by linear transformation.

[0037] The output feature map passes through multiple depth-variable convolution modules (DCN Block). Multiple DCN Block modules can be stacked in series to gradually improve the expressiveness of features, or perform hierarchical feature processing. The output of the DCN Blocks module is divided into multiple branches and processed separately. The DCN module (with parameters s=1, k=3) is continued to be used inside the branch, indicating that the step size of the convolution operation is 1 and the convolution kernel size is 3x3, which is a standard local perception window used to enhance the spatial modeling ability of the feature map.

[0038] The outputs of multiple paths are fused, and the feature graph after concatenation contains rich features extracted from different paths; the summarized features are passed through a CBS module again to complete the final feature adjustment. (The module parameters are s=1, k=1, which are used to compress the number of channels to generate the final task output).

[0039] Implementation method six: This implementation method further limits the insect detection method in complex background based on deep learning feature enhancement described in implementation method five. The output of the DCN Blocks deformable convolution module is divided into multiple branches and processed separately, and multiple DCN modules are stacked inside the branches.

[0040] Implementation method seven. This implementation method is a further limitation of the insect detection method in a complex background based on deep learning feature enhancement described in implementation method one. The detection head has a two-level structure, including: a one-to-many branch and a one-to-one branch; the one-to-many branch is used to associate each target with multiple prior frames, and learn the diverse representation of the target by assigning multiple positive samples; the one-to-one branch is used to assign a positive sample to each target, and the positive sample is associated with the center point or the best prior frame of the target.

[0041] In this embodiment, a one-to-many branch is used to assign multiple prior frames to each target, and by associating multiple positive samples with the target, the diverse representation of the target is learned. This means that this method can better capture the changing characteristics of the target at different scales, forms, and postures, which helps to improve the robustness of detection. Insects, as a category, appear in images at different angles and sizes, and the traditional single prior frame cannot effectively cope with these changes. Through one-to-many branches, various possible target forms can be better covered, thereby improving detection accuracy.

[0042] The one-to-one branch assigns a positive sample to each target, and the positive sample is associated with the center point or the best prior box of the target. This design helps to locate the target more accurately, because each target can get the best matching box during the detection process, reducing false detection and missed detection. Especially in complex backgrounds, insects may be similar to or overlap with the surrounding environment. This precise matching strategy helps to improve the accuracy of detection.

[0043] The design of the detection head can effectively cope with the challenge of detecting insects in complex backgrounds. Traditional detection methods are disturbed by cluttered backgrounds or poor lighting conditions. However, by strengthening the diverse representation of targets and accurate target positioning, this method can better identify and distinguish insects from the background, avoid interference from background noise, and enhance the reliability of detection. The allocation of multiple positive samples enables the network to be exposed to target transformations in more different scenarios, further enhancing the generalization ability of the model. This not only improves the effect of target detection, but also helps to perform more efficient training on a variety of insect image datasets, reducing the risk of model overfitting.

[0044] Embodiment 8: The insect detection device under complex background based on deep learning feature enhancement described in this embodiment comprises: An image acquisition unit, used to acquire an image and pre-process the image; S-Insect-Det network structure construction unit, used to construct the S-Insect-Det network structure; the network structure of S-Insect-Det includes a backbone network, a neck network and a detection head; the backbone network is a Transformer-based EfficientViT network; the neck network is a bidirectional multi-scale fusion architecture; A feature extraction unit, used for extracting image features through the backbone network and performing multi-scale feature fusion through the neck network; The output unit is used to output the feature representation after feature fusion through the detection head to obtain the insect recognition result.

[0045] Embodiment 9. A computer device described in this embodiment includes a memory and a processor, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes the method for detecting insects in a complex background based on deep learning feature enhancement according to any one of embodiments 1 to 7.

[0046] Embodiment 10. A computer-readable storage medium described in this embodiment stores a computer program, and when the computer program is executed by a processor, the steps of the method for detecting insects in a complex background based on deep learning feature enhancement as described in any one of embodiments 1 to 7 are executed.

[0047] Implementation eleven: This implementation provides a specific example of the method for detecting insects in a complex background based on deep learning feature enhancement described in Implementation one, and is also used to explain Implementations two to seven. Specifically: In the experimental environment of Python3.8.10 and Pytorch2.0.0, the graphics card model is 3090, and the CUDA version is CUDA11.8, the S-Insect-Det network structure proposed in the present invention is compared with several state-of-the-art target detection networks. Among them, Faster R-CNN, YOLOv5m, YOLOv8m, YOLOv9m, YOLOv10m, YOLOv11m, DETR and RT-DETR are selected for comparative experiments in this embodiment. The comparison results are shown in Table 1. Compared with other networks with similar parameter scales, the S-Insect-Det proposed in this embodiment has the highest average detection accuracy mAP, the highest precision (Precision, P) and recall (Recall, R). Under the same experimental conditions and hyperparameters, the YOLO series algorithms have faster detection speed and higher accuracy, and the neck network design adapts to multi-scale feature extraction, which is more suitable for small target detection. The network proposed in the present invention further enhances the detail feature extraction capability on this basis, greatly improving the small target insect detection performance.

[0048] Table 1 Comparison results of different models

[0049] Here, GFLOPs stands for the number of floating point operations.

[0050] Compared with the AP values ​​of other target detection frameworks in multiple insect species, the models proposed in this paper almost all reach the highest values. Among them, the detection of the nettle butterfly has achieved 100% accuracy. The latest superior versions of the YOLO series, YOLOv10m and YOLOv11m, are used in comparative experiments. Figure 4 As shown, the effectiveness of LP-YOLO proposed in this embodiment is proved. Compared with the target detection framework DETR using the Transformer architecture and the improved version of DETR RT-DETR, the network of this embodiment has a smaller number of parameters but achieves a higher correct value. Figure 5 This is the effect diagram of the model proposed in the present invention detecting insects. It can be seen that the insect target in the figure is very small in proportion to the scale of the entire figure. The ultra-low resolution limits the detection ability of most target detection algorithms. In addition, the feature enhancement scheme proposed in the present invention retains the detailed features of low-resolution targets and further enhances the feature information of small target insects through a bidirectional multi-scale feature fusion module. The nine types of insects in the test were accurately identified, which shows the superiority of the S-Insect-Det proposed in the present invention.

[0051] It should be understood by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure rather than to limit its protection scope. Although the present disclosure has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that after reading the present disclosure, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the disclosed claims to be approved.

Claims

1. Insect detection method in complex background based on deep learning feature enhancement, characterized by: The method comprises: Acquire an image and preprocess the image; Constructing an S-Insect-Det network structure, the S-Insect-Det network structure includes a backbone network, a neck network and a detection head; the backbone network is an EfficientViT network based on Transformer; the neck network is a bidirectional multi-scale fusion architecture; The backbone network uses EfficientViT as the core to extract insect image features. After image feature extraction, the SPPF module outputs a high-resolution feature map P3, a medium-resolution feature map P4, and a low-resolution feature map P5. The bidirectional multi-scale fusion architecture of the neck network includes: a bottom-up path and a top-down path; The detection head has a two-level structure, including: a one-to-many branch and a one-to-one branch; the one-to-many branch is used to associate each target with multiple prior frames, and learn the diverse representation of the target by assigning multiple positive samples; the one-to-one branch is used to assign a positive sample to each target, and the positive sample is associated with the center point of the target or the best prior frame; Image feature extraction is performed through the backbone network, and multi-scale feature fusion is performed through the neck network; The detection head outputs feature representation after feature fusion to obtain the insect recognition result.

2. The method for detecting insects in complex backgrounds based on deep learning feature enhancement according to claim 1, characterized in that: The bottom-up path is to transfer the low-resolution feature map to the high-level, including: upsampling, splicing, deformable gradient flow module DCN2f, and weighted sum feature fusion mechanism; the top-down path is to reversely transfer high-level semantic information and inject it into the low-level features.

3. The method for detecting insects in complex backgrounds based on deep learning feature enhancement according to claim 2, characterized in that: The deformable gradient flow module DCN2f includes: a CBS module and a DCN Blocks deformable convolution module; the CBS module is used to perform initial feature extraction and standardization on the input; the output features pass through multiple DCN Blocks deformable convolution modules connected in series; the outputs of multiple paths are fused, and the final features are output through a CBS module.

4. The method for detecting insects in complex backgrounds based on deep learning feature enhancement according to claim 3, characterized in that: The output of the DCN Blocks deformable convolution module is divided into multiple branches and processed separately, and multiple DCN modules are stacked inside the branches.

5. An insect detection device in complex background based on deep learning feature enhancement, characterized in that: The device comprises: An image acquisition unit, used for acquiring an image and preprocessing the image; S-Insect-Det network structure construction unit, used to construct the network structure of S-Insect-Det, the S-Insect-Det network structure includes a backbone network, a neck network and a detection head; the backbone network is a Transformer-based EfficientViT network; the neck network is a bidirectional multi-scale fusion architecture; The backbone network uses EfficientViT as the core to extract insect image features. After image feature extraction, the SPPF module outputs a high-resolution feature map P3, a medium-resolution feature map P4, and a low-resolution feature map P5. The bidirectional multi-scale fusion architecture of the neck network includes: a bottom-up path and a top-down path; The detection head has a two-level structure, including: a one-to-many branch and a one-to-one branch; the one-to-many branch is used to associate each target with multiple prior frames, and learn the diverse representation of the target by assigning multiple positive samples; the one-to-one branch is used to assign a positive sample to each target, and the positive sample is associated with the center point of the target or the best prior frame; A feature extraction unit, used for extracting image features through the backbone network and performing multi-scale feature fusion through the neck network; The output unit is used to output the feature representation after feature fusion through the detection head to obtain the insect recognition result.

6. A computer device, characterized in that: It comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor runs the computer program stored in the memory, the processor executes the method for detecting insects in a complex background based on deep learning feature enhancement according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for detecting insects in a complex background based on deep learning feature enhancement as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Polarization image road target detection method based on YOLOv8 improvement

    CN117351448A

  • Target detection method for young grape fruit bunches

    CN118710880A

  • Infrared remote sensing image target detection method based on YOLOv8, electronic equipment and computer readable storage medium

    CN118887511A

  • Contextual visual-based SAR target detection method and apparatus, and storage medium

    US20230184927A1

Cited By

  • Wood component crack detection model, method and system under complex background based on improved YOLOv11n

    CN119863468A

  • Electric power high-altitude operation safety belt wearing identification method based on YOLOv10n and product

    CN120107744A

  • Rice leaf folder imago image detection and counting method and system oriented to complex environment

    CN121095871A