Target detection deep learning model and target detection method

By embedding the global context attention module and multi-scale attention mechanism into the deep learning model of target detection, the problems of missed detection and false detection of debris detection in complex environments are solved, and high-precision and high-speed detection are achieved, which is suitable for debris detection in residential areas and buildings.

CN120635487APending Publication Date: 2025-09-12BEIJING QDING INTERCONNECTION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510927804.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing debris detection algorithms are prone to missed detections and false detections in complex environments, and the high-precision model inference speed is slow, making it difficult to achieve good performance in real-time detection tasks.

Method used

A deep learning model for target detection is adopted, including a backbone network, an edge feature extraction module, a feature fusion network, and a detection head network. By embedding a global context attention module, a multi-scale attention mechanism, and an improved spatial pyramid pooling module, the feature extraction and detection accuracy are improved.

Benefits of technology

It improves target detection accuracy and model inference speed, can detect targets more accurately in complex scenes, reduce missed detections and false detections, and is suitable for detecting debris in residential areas and buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635487A_ABST
    Figure CN120635487A_ABST
Patent Text Reader

Abstract

The invention provides a target detection deep learning model and a target detection method. The target detection deep learning model comprises a backbone network used for carrying out feature extraction on an input image; the edge feature extraction module is used for extracting the edge features of the input image by using filters at the initial stage of the backbone network, and the filters comprise a horizontal filter and a vertical filter; the feature fusion network is used for fusing the multi-scale features output by the backbone network, the feature fusion network comprises a fusion module based on a multi-scale attention mechanism, and the fusion module is used for weighted recombination of the multi-scale features; the pooling module is used for carrying out multi-scale feature integration by utilizing spatial pyramid pooling; and the detection head network is used for receiving the feature map output by the feature fusion network and the pooling module, predicting a target category and a position, and outputting a category label and a bounding box coordinate of target detection. The target detection precision and the model reasoning speed can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target detection technology, and in particular to a target detection deep learning model and a target detection method. Background Art

[0002] Debris detection within residential communities and buildings is a crucial tool for maintaining a clean and safe environment. It effectively improves property management efficiency, enhances residents' quality of life, and fosters harmonious community development. Furthermore, fast and accurate debris detection technology contributes to compliance with environmental regulations and promotes sustainable development goals. Therefore, designing a high-precision, high-speed debris detection model has become a crucial technical requirement in the property management field.

[0003] Existing object detection algorithms typically rely on traditional computer vision methods or deep learning models. While they can achieve a certain degree of detection in simple environments, they have significant shortcomings in complex scenarios. Specifically, existing technologies have the following main problems:

[0004] In environments with drastic lighting changes, complex backgrounds, or a lot of obstructions, existing algorithms are prone to missed detections and false detections, and cannot meet the needs of practical applications; high-precision models usually rely on large computing resources and have slow inference speeds; and lightweight models that improve inference speeds come at the expense of detection accuracy, making it difficult to achieve good performance in real-time detection tasks. Summary of the Invention

[0005] In view of this, the embodiments of the present application provide a target detection deep learning model and a target detection method to solve the problems of insufficient target detection accuracy, easy missed detection and false detection, and slow model inference speed in the existing technology.

[0006] In a first aspect of an embodiment of the present application, a target detection deep learning model is provided, comprising: a backbone network for extracting features from an input image, the backbone network comprising a plurality of residual structures, the residual structure comprising a convolutional layer, a normalization layer and an activation function layer, and an embedded global context attention module in the residual structure; an edge feature extraction module for extracting edge features of an input image using a filter in the initial stage of the backbone network, the filter comprising a horizontal filter and a vertical filter for detecting intensity changes of edges in an image to extract edge information; a feature fusion network for fusion of multi-scale features output by the backbone network The feature fusion network includes a fusion module based on a multi-scale attention mechanism, which is used for weighted reorganization of multi-scale features; the pooling module is used to integrate multi-scale features using spatial pyramid pooling. The pooling module includes a convolution unit based on a large-core attention mechanism. The large-core attention mechanism is used to decompose the large convolution kernel into depth-separable convolution, depth-expanded convolution, and channel convolution to capture local context information and long-distance dependencies; the detection head network is used to receive the feature maps output by the feature fusion network and the pooling module, predict the target category and position, and output the category label and bounding box coordinates of the target detection.

[0007] According to a second aspect of the embodiment of the present application, a target detection method based on the target detection deep learning model of the first aspect is provided, comprising: normalizing and scaling the target image to generate image data that meets the input requirements of the backbone network; extracting features from the image data using the backbone network, wherein in the initial stage of the backbone network, in combination with the edge feature extraction module, horizontal and vertical filters are used to extract edge features of the image, and the edge features are combined with the basic features of the backbone network; embedding a global context attention module in the residual structure of the backbone network, and using a context modeling unit and a feature transformation unit to perform weighted processing on the feature map to highlight key features and suppress irrelevant features; and integrating the backbone network into the image data. The multi-scale features output by the network are input into the feature fusion network, and the feature maps of different scales are weightedly fused based on the multi-scale attention mechanism, and the fused features are normalized and activated to generate a fused feature map; the fused feature map is input into the pooling module, and multi-scale feature integration is performed using spatial pyramid pooling, and convolution units based on the large core attention mechanism are used. Depthwise separable convolution is used to extract local context information, depthwise dilated convolution is used to capture long-distance dependencies, and channel-wise convolution is used to complete feature aggregation in the channel dimension; the detection head network receives the feature maps output by the pooling module and the feature fusion network, and combines the multi-task loss function to predict the category and position of the target, and output the category label and bounding box coordinates of the target detection.

[0008] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0009] The backbone network is used to extract features from the input image. The backbone network includes multiple residual structures, which are composed of convolutional layers, normalization layers, and activation function layers, and a global context attention module is embedded in the residual structure. The edge feature extraction module is used to extract edge features of the input image using filters in the initial stage of the backbone network. The filters include horizontal filters and vertical filters, which are used to detect the intensity changes of edges in the image to extract edge information. The feature fusion network is used to fuse the multi-scale features output by the backbone network. The feature fusion network includes a fusion module based on a multi-scale attention mechanism, which is used for weighted reorganization of multi-scale features. The pooling module is used to integrate multi-scale features using spatial pyramid pooling. The pooling module includes a convolution unit based on a large kernel attention mechanism. The large kernel attention mechanism is used to decompose the large convolution kernel into depth-separable convolution, depth-expanded convolution, and channel convolution to capture local context information and long-range dependencies. The detection head network is used to receive the feature maps output by the feature fusion network and the pooling module, predict the target category and position, and output the category label and bounding box coordinates of the target detection. This application can improve target detection accuracy and model inference speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0011] Figure 1 This is a block diagram of the structure of the target detection deep learning model provided in the embodiment of the present application;

[0012] Figure 2 This is a schematic diagram of the basic network structure of yolov11 provided in the embodiment of the present application;

[0013] Figure 3 Schematic diagram of the BottleNeck structure after adding global context attention provided by an embodiment of the present application;

[0014] Figure 4 This is the overall backbone network structure of yolov11 provided in the embodiment of the present application;

[0015] Figure 5 This is a schematic diagram of a network structure in which an attention mechanism is added to the global context in the position of the backbone network, as provided in an embodiment of the present application;

[0016] Figure 6 Schematic diagram of a Sobel filter with added Sobel_x and Sobel_y provided in an embodiment of the present application;

[0017] Figure 7 This is a schematic diagram of the SobelConv structure provided in an embodiment of the present application;

[0018] Figure 8 This is a schematic diagram of the structure after integrating the Sobel filter into the first two downsampling convolutions of Yolov11 provided by the embodiment of the present application;

[0019] Figure 9 Schematic diagram of the SobelStem structure provided in the embodiment of the present application;

[0020] Figure 10 This is a schematic diagram of multi-scale feature fusion based on MAC attention provided in an embodiment of the present application;

[0021] Figure 11 This is a schematic diagram of the SPPF structure of yolov8s provided in the embodiment of the present application;

[0022] Figure 12 Schematic diagram of the SPPF structure based on LKA improvement provided in an embodiment of the present application;

[0023] Figure 13 This is a schematic diagram of the LKA attention structure provided in an embodiment of the present application;

[0024] Figure 14 Schematic diagram of the target detection method provided in the embodiment of the present application;

[0025] Figure 15 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0027] In modern urban life, a clean environment within communities and buildings is crucial for ensuring residents' quality of life. Maintaining a clean environment not only enhances residents' living experience but also contributes to public safety, such as by removing debris that could cause fires or preventing obstructions to public traffic caused by accumulated debris. Furthermore, a clean environment reduces the spread of germs, further safeguarding the health of community residents.

[0028] To improve property management efficiency and reduce labor costs and oversights from manual inspections, automated debris detection technology has become a growing focus. Especially with increasingly stringent environmental regulations, technical tools that can quickly and accurately detect debris can help property managers comply with relevant regulations and advance environmental goals.

[0029] However, designing a model that can perform high-precision and high-speed detection in complex environments is not easy, as actual application scenarios (such as residential interiors, building corridors, and underground garages) often involve challenging conditions such as insufficient lighting, obstructions, and complex backgrounds. Therefore, a more advanced and practical object detection technology is needed to address these issues.

[0030] Current methods for debris detection are typically based on traditional computer vision algorithms or basic deep learning models. While these solutions have demonstrated some capabilities in laboratory environments, they suffer from the following significant drawbacks in practical applications:

[0031] First, detection accuracy is insufficient: In complex environments (such as those with drastic lighting changes or the presence of multiple interfering objects), existing debris detection algorithms are prone to missed detections and false detections. Specifically, these algorithms lack the ability to recognize subtle features and cannot accurately distinguish between debris and other objects in a normal environment.

[0032] Secondly, there's a lack of balance between accuracy and inference speed: Some high-precision models consume significant computing resources, resulting in slower inference speeds. This speed shortfall is particularly critical in scenarios requiring real-time detection, such as property inspection robots or real-time monitoring systems. Relatively fast models often sacrifice detection accuracy, making them difficult to meet practical needs.

[0033] In view of the problems existing in the prior art, this application provides an improved deep learning model and method for object detection, aiming to address the problems of insufficient detection accuracy and the poor balance between accuracy and inference speed in the prior art. In particular, the design is optimized for the detection of debris in complex scenes. The technical solution of this application is based on improvements to the existing object detection network. By introducing multiple innovative modules, the model achieves high-precision and high-speed performance in complex scenes.

[0034] Specifically, this application embeds a global context attention module in the backbone network of the basic target detection network (such as YOLOv11), and uses this module to perform weighted reorganization of the input features, thereby enhancing the model's ability to focus on important features and reducing interference with irrelevant features. At the same time, in response to the importance of edge features, this application adds an edge feature extraction module to the initial stage of the backbone network, extracting the edge features of the input image through horizontal and vertical filters, and fusing them with the initial features of the backbone network to explicitly enhance the model's perception of edge information.

[0035] Furthermore, this application optimizes the feature fusion network and adopts a fusion module based on a multi-scale attention mechanism to perform weighted reorganization of multi-scale features, thereby improving the efficiency and feature expression ability of the model in the multi-scale feature fusion process.

[0036] In addition, in order to improve the effect of multi-scale feature integration, this application improves the spatial pyramid pooling (SPPF) structure, introduces a convolution unit based on the large-core attention mechanism, and decomposes the large convolution kernel into depth-separable convolution, depth-expanded convolution and channel convolution, reducing the computational complexity while improving the model's ability to capture local contextual information and long-distance dependencies.

[0037] Finally, this application improves the prediction accuracy and position accuracy of target detection by improving the detection head network and optimizing the multi-task loss function combining classification loss, regression loss, and feature matching loss. In addition, this application also adds an input preprocessing module and an output post-processing module to normalize and rescale the input image to ensure that it adapts to the input requirements of the backbone network, and optimizes the detection results through the non-maximum suppression (NMS) algorithm.

[0038] The contents of the technical solution of this application are described in detail below with reference to the accompanying drawings and specific embodiments.

[0039] Figure 1 This is a block diagram of the structure of the target detection deep learning model provided by the embodiment of this application. Figure 1 As shown, the target detection deep learning model can specifically include:

[0040] The backbone network 101 is used to extract features from the input image. The backbone network includes multiple residual structures. The residual structure consists of a convolutional layer, a normalization layer, and an activation function layer. A global context attention module is embedded in the residual structure.

[0041] An edge feature extraction module 102 is configured to extract edge features of an input image using filters in the initial stage of the backbone network. The filters include horizontal and vertical filters, which are configured to detect changes in the intensity of edges in the image to extract edge information.

[0042] A feature fusion network 103 is used to fuse the multi-scale features output by the backbone network. The feature fusion network includes a fusion module based on a multi-scale attention mechanism. The fusion module is used for weighted recombination of multi-scale features.

[0043] A pooling module 104 is configured to integrate multi-scale features using spatial pyramid pooling. The pooling module includes a convolution unit based on a large-core attention mechanism. The large-core attention mechanism is configured to decompose the large convolution kernel into depthwise separable convolution, depthwise dilated convolution, and channel-wise convolution to capture local contextual information and long-range dependencies.

[0044] The detection head network 105 is used to receive the feature maps output by the feature fusion network and the pooling module, predict the target category and position, and output the category label and bounding box coordinates of the target detection.

[0045] In some embodiments, the global contextual attention module includes:

[0046] A context modeling unit for globally modeling the input features, where the context modeling unit weights the input features based on the channel dimension;

[0047] A feature transformation unit is used to transform the weighted features. The feature transformation unit is used to improve the model's ability to represent important features using nonlinear activation functions and normalization operations.

[0048] Specifically, the Context Attention Mechanism Module (Global Context Attention Module) provided in the embodiment of the present application includes two main parts:

[0049] Context modeling unit: This unit extracts global context information by globally modeling the input features. Specifically, this unit uses a 1×1 convolution (labeled as W k ), the input features C×H×W are projected onto a global representation in the channel dimension. Subsequently, the channel-dimensional features are normalized through a Softmax operation to generate global contextual attention weights, which are used to weight the input features, highlighting important features and suppressing irrelevant features.

[0050] Feature transformation unit: This unit further transforms the features processed by the context modeling unit, including: using the first 1×1 convolution (marked as W v1 ), the weighted features are reduced in dimension (the number of channels is reduced from C to C / r), and the normalization and ReLU activation function are combined to enhance the representation ability of nonlinear features; the second 1×1 convolution (marked as W v2 ), restore the dimensionality reduction features to the original number of channels C.

[0051] Finally, the transformed features are fused with the initial input features through residual connection (add operation) to generate the output feature map C×H×WC\times H\times WC×H×W.

[0052] Through the above structure, the global context attention module can capture long-distance dependencies without significantly increasing the computational cost, improve the model's ability to express important features, and thus improve the accuracy of target detection.

[0053] Further, if Figures 2 to 5 As shown, Figure 2 This is a schematic diagram of the basic network structure of yolov11 provided in the embodiment of this application. Figure 3 : is a schematic diagram of the BottleNeck structure after adding global context attention provided by an embodiment of the present application, Figure 4 This is the overall backbone network structure of yolov11 provided in the embodiment of this application. Figure 5 This is a schematic diagram of the network structure provided by an embodiment of the present application, in which an attention mechanism is added to the global context in place of the backbone network.

[0054] This embodiment introduces a global context attention module into the backbone network of yolov11 and specifically applies it to the basic residual structure (BottleNeck).

[0055] The composition of the basic residual structure (such as Figure 2 (As shown in Figure 3): The basic residual architecture (BottleNeck) consists of two CBA modules (a combination of convolutional layers, normalization layers, and activation function layers) and a skip connection (add). Through the residual connection mechanism, low-level information in the input features is retained while high-level features are extracted.

[0056] Embedding the global context attention module in BottleNeck (such as Figure 3 As shown in Figure 3, the global context attention module is integrated into the basic residual structure. The specific method is as follows: after the second CBA module, the global context attention module is inserted to perform weighted reorganization of the extracted features; the weighted features are added to the input features passed through the residual path, and the enhanced feature map is output.

[0057] The structure of the backbone network (such as Figure 4 and Figure 5 As shown in Figure 3), the backbone network consists of multiple cascaded BottleNeck modules to form a deep feature extraction structure.

[0058] A global context attention module is embedded in multiple BottleNeck modules of the backbone network to ensure that global context information can be captured at different stages of feature extraction, further improving the model's ability to handle long-distance dependencies.

[0059] like Figure 4 As shown in Figure 1, the backbone network of YOLOv11 extracts multi-scale features from the input image and provides high-quality feature maps for subsequent networks (such as feature fusion network and detection head network). By embedding the global context attention module in the backbone network, the backbone network is optimized in the following aspects:

[0060] Enhanced feature extraction capabilities: The global context attention module can focus on the features in the input features that contribute to the object detection task, while suppressing irrelevant background information, thereby improving the overall feature extraction quality.

[0061] Improved long-distance dependency processing capabilities: Through a global modeling mechanism, the model can capture long-distance semantic associations in feature maps, making up for the shortcomings of traditional convolution operations in global dependency processing capabilities.

[0062] like Figure 5 As shown in Figure 2, by embedding the global context attention module in the backbone network of yolov11, the overall performance of the model is significantly improved:

[0063] Improved detection accuracy: The model can detect targets more accurately in complex scenarios (such as those with complex backgrounds and uneven lighting), reducing missed detections and false detections.

[0064] Inference speed optimization: The global context attention module adopts a lightweight design with low computational cost, which does not significantly increase the inference time of the model, thus achieving a good balance between detection accuracy and speed.

[0065] According to the technical solution of the above-mentioned embodiment, the technical solution of the present application organically combines the global context attention module with the residual structure of the backbone network, thereby greatly improving the feature extraction capability and detection accuracy of the model, and is particularly suitable for target detection tasks in complex scenarios.

[0066] In some embodiments, the global contextual attention module further comprises:

[0067] A weight generator, used to generate a global weight distribution based on input features;

[0068] The feature weighting module is used to weight the input features according to the global weight distribution to highlight the key features, and the weighted output features are added to the features in the residual path.

[0069] Specifically, the global context attention module consists of two key sub-modules:

[0070] Weight Generator: The weight generator is responsible for generating a global weight distribution based on the input features, which is used to characterize the importance of each channel or spatial position in the feature.

[0071] The specific implementation of the weight generator is as follows:

[0072] First, the input features Figure X (size is C×H×W) and performs a 1×1 convolution operation to generate a feature map after dimensionality reduction.

[0073] Subsequently, the feature map is normalized through the Softmax operation to calculate the global weight distribution, which represents the relative importance of each feature position in the global context.

[0074] Feature weighting module: The feature weighting module is used to reorganize the input features according to the global weight distribution calculated by the weight generator.

[0075] Specifically, the feature weighting module multiplies the global weight distribution with the input features point by point, thereby assigning higher weights to important features and lower weights to irrelevant or unimportant features.

[0076] The weighted features will be added to the input features through a residual connection (add operation), thereby retaining the original feature information while further enhancing the expressive power of key features.

[0077] In some examples, the workflow of the global context attention module includes the following steps:

[0078] Input feature mapping: the input features extracted from the backbone network Figure X (of size C×H×W) is input to the global context attention module.

[0079] Generate global weight distribution: weight generator is used to calculate the input features Figure X After performing a 1×1 convolution dimensionality reduction operation, the global weight distribution WWW is calculated through Softmax, and the weight distribution dimension is the same as the input feature.

[0080] Feature weighting and reorganization: The global weight distribution W is combined with the input features Figure X Multiply point by point to generate the weighted feature map X′;

[0081] Combine the weighted feature map X′ with the input feature Figure X The output feature map Y of the module is generated by adding the residual connections.

[0082] Furthermore, the global context attention module can be embedded into the basic residual structure (BottleNeck) of the backbone network. The specific integration method is as follows:

[0083] As mentioned earlier, the basic residual structure (BottleNeck) consists of two CBA modules (a combination of convolutional layers, normalization layers, and activation function layers) and a skip connection (add).

[0084] Introducing the global context attention module: After the second CBA module, a global context attention module is embedded.

[0085] The global context attention module weights and reorganizes the features output by CBA to generate an enhanced feature map, which is added to the original features through the residual path to output the final result.

[0086] Furthermore, through the design of the weight generator and feature weighting module, the global context attention module has the following advantages:

[0087] Accurate global feature modeling: The weight generator uses global weight distribution to capture long-range dependencies in feature maps, effectively compensating for the local receptive field limitations of traditional convolution operations.

[0088] Enhanced expression of key features: The feature weighting module performs weighted reorganization on the input features, enhancing the expression ability of key features and suppressing the interference of redundant features.

[0089] Optimization of computational efficiency: The weight generator uses lightweight 1×1 convolution and Softmax operations. The feature weighting process is simple and efficient, does not significantly increase the computational complexity, and ensures the real-time performance of the module.

[0090] The structure and functionality of the global contextual attention module make it suitable for object detection tasks in complex environments, such as detecting clutter within residential areas or buildings. By embedding this module, object detection models can achieve higher detection accuracy in complex backgrounds, reduce missed detections and false detections, and effectively improve the performance of object detection systems.

[0091] In some embodiments, the edge feature extraction module is specifically configured to:

[0092] Use horizontal filters to detect horizontal intensity changes in the input image and extract horizontal edge information;

[0093] Use vertical filters to detect the vertical intensity changes in the input image and extract vertical edge information;

[0094] The horizontal and vertical edge information are fused to generate an edge feature map, which is then combined with the feature map at the initial stage of the backbone network.

[0095] Specifically, this application proposes a target detection model that includes an edge feature extraction module. By integrating the Sobel filter into the backbone network, the edge features of the input image are explicitly extracted, thereby enhancing the model's ability to detect target boundaries and improving the accuracy of target detection in complex scenes. Figures 6 to 9 The implementation of the Sobel filter and the specific application of the edge feature extraction module are explained in detail.

[0096] like Figure 6 and Figure 7 As shown, Figure 6 Schematic diagram of the Sobel filter with added Sobel_x and Sobel_y provided in the embodiment of the present application, Figure 7 : This is a schematic diagram of the SobelConv structure provided in an embodiment of the present application. The Sobel filter includes a horizontal filter (Sobel_x) and a vertical filter (Sobel_y), which are used to detect horizontal and vertical edge intensity changes in the input image respectively:

[0097] Horizontal filter (Sobel_x): Sobel_x is used to detect the horizontal intensity change of the image and extract the horizontal edge information of the image by calculating the gradient in the horizontal direction.

[0098] Vertical filter (Sobel_y): Sobel_y is used to detect the intensity change in the vertical direction of the image and extract the vertical edge information in the image by calculating the gradient in the vertical direction.

[0099] Edge information fusion: The edge information in the horizontal and vertical directions is fused by weighted operation (such as Figure 6 The add operation in generates a complete edge feature map, which can more comprehensively represent the areas in the image where the intensity changes significantly.

[0100] Through the above processing of the Sobel filter, important edge information in the image can be explicitly extracted, providing clearer boundary features for subsequent feature extraction and target detection.

[0101] Furthermore, the specific application of the edge feature extraction module is reflected in the initial stage of the backbone network, and the specific integration method is as follows:

[0102] Combination of Sobel filter and basic residual structure:

[0103] like Figure 6 As shown in Figure 3, the Sobel filter is embedded in the basic residual structure of the backbone network (such as BottleNeck).

[0104] After the two CBA modules of BottleNeck, a SobelConv module is added to enhance the edge information of the features extracted by the convolution operation.

[0105] The edge features extracted by the Sobel filter are concatenated with the features output by the CBA module through the Concat operation, and then further fused through another CBA module, and finally the residual connection is completed through the add operation.

[0106] Applications in downsampling convolution (such as Figure 8 As shown, Figure 8 This is a schematic diagram of the structure after integrating the Sobel filter into the first two downsampling convolutions of Yolov11 provided by the embodiment of the present application):

[0107] Embed Sobel filters (such as Figure 8 As shown), multi-scale extraction of edge features is achieved.

[0108] The output features of the Sobel filter and the downsampled convolution are fused through the Concat operation to ensure that the model still has strong boundary perception capabilities on low-resolution feature maps.

[0109] like Figure 9 As shown, Figure 9 Schematic diagram of the SobelStem structure provided in an embodiment of the present application. The SobelStem module is an implementation method of integrating the Sobel filter into the initial stage of the backbone network. The specific structure includes:

[0110] Combination of CBA module and Sobel filter: The input image first passes through a CBA module with stride for preliminary feature extraction and downsampling.

[0111] At the same time, the image is directly input into the SobelConv module, and the Sobel filter is used to extract edge features in the horizontal and vertical directions respectively.

[0112] Fusion of edge features and convolution features: The edge features extracted by the Sobel filter are fused with the features output by the CBA module through the Concat operation to generate the initial features that combine edge information.

[0113] The fused features are further extracted through another CBA module to provide input for subsequent modules of the backbone network.

[0114] By combining the Sobel filter with the backbone network, the edge feature extraction module achieves the following technical effects:

[0115] Explicit edge feature extraction: The Sobel filter can directly capture edge information with significant intensity changes in the image, making the model more sensitive when dealing with complex scenes such as clutter detection, especially at the boundary between the target and the background.

[0116] Fusion with the backbone network enhances feature expression: The fusion of edge features and convolutional features makes the feature expression more comprehensive. The introduction of edge information effectively improves the backbone network's ability to recognize the target area.

[0117] Improved detection accuracy in complex scenarios: The integration of the Sobel filter in the low-resolution feature extraction stage makes the model more accurate in small target detection and complex background segmentation tasks, reducing the occurrence of missed detections and false detections.

[0118] Through the specific description of the above embodiments, this application realizes the optimized application of Sobel filter in the backbone network, significantly improves the edge feature extraction capability of the model, and provides strong support for high-precision target detection in complex scenarios.

[0119] In some embodiments, the edge feature extraction module is embedded in the initial downsampling stage of the backbone network. The downsampling stage adopts a combination of convolutional layers and filters, wherein the convolutional layer is used to extract basic image features; the filter is used to extract edge information and fuse it with the output of the convolutional layer to generate a feature map with edge enhancement characteristics.

[0120] Specifically, the edge feature extraction module is embedded in the initial downsampling phase of the backbone network to enhance the edge information of the input image during the early stages of feature extraction. By combining convolutional layers and filters, this module preserves the underlying image features while explicitly extracting edge information. The two are then fused to generate a feature map with edge-enhanced properties, improving the feature representation and detection accuracy of the subsequent network.

[0121] The edge feature extraction module mainly includes the following parts:

[0122] Convolutional layer: The convolutional layer performs preliminary feature extraction on the input image, capturing the underlying feature information. The initial downsampling convolutional layer has a certain stride to reduce the resolution of the feature map, reducing computational overhead while preserving global context.

[0123] Filters: Filters are used to explicitly extract edge information from the input image, including:

[0124] Horizontal filter: extracts edge information of horizontal intensity changes in the image.

[0125] Vertical filter: extracts edge information of vertical intensity changes in the image.

[0126] The filter outputs in the horizontal and vertical directions generate horizontal edge feature maps and vertical edge feature maps respectively.

[0127] Feature fusion unit: The basic image features output by the convolution layer and the edge features output by the filter are fused through a feature fusion unit (such as splicing operation or weighting operation).

[0128] The fused feature map not only retains the basic features of the original image, but also explicitly enhances the edge features, thereby forming a feature map with edge enhancement properties.

[0129] Furthermore, the specific workflow of the edge feature extraction module is as follows:

[0130] Input processing: The original input image is input into the convolution layer and the filter branches for basic feature extraction and edge feature extraction respectively.

[0131] Basic feature extraction: The convolution layer processes the input image to generate a basic feature map, which contains the low-level semantic information and global feature representation of the input image.

[0132] Edge feature extraction: The horizontal filter and the vertical filter process the input image respectively to generate a horizontal edge feature map and a vertical edge feature map.

[0133] The horizontal and vertical edge feature maps are fused through weighted or additive operations to generate a complete edge feature map.

[0134] Feature fusion: The basic feature map and edge feature map output by the convolution layer are combined through a feature fusion unit (such as a splicing operation) to generate the final fused feature map.

[0135] The fused feature map not only contains global context information, but also explicitly enhances edge information, which helps the subsequent feature extraction network to more accurately capture the boundary and detail features of the target.

[0136] In the initial downsampling stage of the backbone network, the edge feature extraction module is designed as a standard module, and the specific integration method is as follows:

[0137] Multi-branch design: The input image is processed by two branches: a convolutional layer and a Sobel filter. The convolutional layer outputs basic features, and the Sobel filter branch generates edge features.

[0138] Feature fusion and subsequent processing: The fused feature map is fed into the subsequent CBA module for further processing. By fusing edge information, the feature expression capability is enhanced.

[0139] By introducing the edge feature extraction module in the initial downsampling stage of the backbone network, this embodiment has the following technical effects:

[0140] Explicit extraction of edge features: The filter branch explicitly extracts edge information from the input image, capturing areas with significant intensity changes in the image, making the model more sensitive to target boundaries.

[0141] Effective fusion of basic features and edge features: The basic image features extracted by the convolutional layer are fused with the edge information extracted by the filter. The generated fused feature map contains both global context information and boundary information, further improving the accuracy of target detection.

[0142] Optimized detection performance for complex scenes: In complex scenes or with a lot of background interference, the edge enhancement feature helps the model locate the target boundaries more accurately, reducing missed detections and false detections.

[0143] Through the above embodiments, the edge feature extraction module can significantly enhance the feature extraction capability of the model in the initial stage, and provide strong support for the feature expression and target detection of the subsequent network.

[0144] In some embodiments, the fusion module is specifically configured to:

[0145] Based on the multi-scale attention mechanism, dynamic weights are assigned to feature maps of different scales, and the fused feature maps are normalized and activated to obtain fused features. The fused features output by the fusion module are used as input for subsequent pooling modules and detection head networks.

[0146] Specifically, this application provides a feature fusion module based on the multi-scale attention mechanism (MAC) to optimize the multi-scale feature fusion capability of the target detection model. By assigning dynamic weights to feature maps of different scales and performing normalization and activation processing, the fusion module can generate a fused feature map with stronger discriminative ability. Figure 10 The specific implementation of this module is described in detail.

[0147] like Figure 10 As shown, Figure 10 This is a schematic diagram of multi-scale feature fusion based on MAC attention provided by an embodiment of the present application. The fusion module is designed based on the multi-scale attention mechanism (MAC) and mainly includes the following steps:

[0148] Feature input and preliminary processing: Feature maps of different scales (such as X0 and X1) are input into the fusion module. The X0 feature map first undergoes a convolution operation (Conv) to adjust the number of channels so that feature maps of different scales have the same channel dimension, providing a consistent foundation for subsequent fusion operations.

[0149] Feature concatenation (Concat): The adjusted X0 feature map and the X1 feature map are merged together through a concatenation operation to generate the initial fused feature map.

[0150] Multi-scale Attention Mechanism (MAC): The concatenated feature maps are processed by the MAC module (e.g. Figure 10 The MAC module captures important feature information in different dimensions, including:

[0151] Interactions of spatial dimension W (top branch);

[0152] Interaction of spatial dimension H (middle branch);

[0153] Interactions of channel dimension C (bottom branch).

[0154] Each branch processes information of a specific dimension through a permutation operation, and then extracts long-range dependency features through global pooling operations (average pooling and standard deviation pooling) and 1×K convolution, and finally generates attention weights on different dimensions.

[0155] Through weighting operations, important features are given higher weights and the influence of unimportant features is suppressed.

[0156] Feature weight allocation and separation (Split): The output of the MAC module is split to generate two feature weights x0_weight and x1_weight, corresponding to the input features Figure X 0 and X1.

[0157] Through point-by-point multiplication operations, the weights are applied to the original features respectively Figure X 0 and X1, generate the weighted feature map.

[0158] Feature weighting and fusion: The weighted X0 and X1 features are added separately to ensure that the original feature information is retained while further enhancing the expressiveness of important features.

[0159] Finally, a fused feature map is generated through the concatenation operation and output for subsequent pooling modules and detection head networks.

[0160] In some examples, the design of the MAC module is based on three branches, which capture the long-range dependencies of feature maps in the spatial dimension and channel dimension respectively. The details are as follows:

[0161] Top branch (interaction of spatial dimension W): The input feature map is first permuted to transform the channel dimension C into the W dimension; statistical information of the feature distribution is generated through average pooling and standard deviation pooling;

[0162] The attention weights are generated using 1×K convolution and restored to the original dimension after Sigmoid activation.

[0163] Middle branch (interaction of spatial dimension H): The operation is similar to the top branch. The permutation operation permutes the channel dimension C to the H dimension to capture the feature relationship in the H dimension.

[0164] Bottom branch (interaction of channel dimension C): The feature relationship of channel dimension is directly calculated through global pooling and 1×K convolution to calculate the attention weight.

[0165] Feature fusion and weighting: The attention weights generated by the three branches are fused through a simple averaging operation in the integration stage to output the final multi-dimensional attention features, thereby improving the discriminative ability of the feature map.

[0166] Through the above multi-scale attention mechanism, the fusion module significantly improves the effect of multi-scale feature fusion, specifically:

[0167] Capturing multi-dimensional interaction information: The MAC module can capture long-range dependencies in the spatial dimensions (W and H) and the channel dimension (C), effectively enhancing the contextual expression capability of the fused feature map.

[0168] Dynamic weight allocation: Feature maps of different scales are weighted and reorganized through attention weights to enhance important features while suppressing irrelevant features, thereby improving the model's sensitivity to the target area.

[0169] Optimize target detection results: The high-quality fusion feature map generated by the fusion module provides more accurate input features for the subsequent pooling module and detection head network, thereby improving the overall accuracy and robustness of the target detection model.

[0170] Through this embodiment, the MAC-based multi-scale feature fusion module effectively solves the problem of insufficient multi-scale fusion effect of the traditional splicing method, so that the model can show higher accuracy and efficiency in target detection tasks in complex scenarios.

[0171] In some embodiments, spatial pyramid pooling is used to integrate multi-scale features, including:

[0172] Depthwise separable convolution is used to extract local contextual information, depthwise dilated convolution is used to capture long-distance dependencies in feature maps, and channel-wise convolution is used to aggregate features in the channel dimension to generate a fused multi-scale feature map.

[0173] Specifically, this application provides a multi-scale feature integration method based on the spatial pyramid pooling (SPPF) structure, which realizes the extraction of local context information of feature maps, capture of long-distance dependencies and channel feature aggregation by combining the improved large kernel attention mechanism (LKA), effectively improving the quality of multi-scale feature fusion, thereby improving the detection accuracy of the model. Figures 11 to 13 Detailed description.

[0174] like Figure 11 As shown, Figure 11 This is a schematic diagram of the SPPF structure of yolov8s provided in the embodiment of this application. The traditional SPPF structure uses multiple MaxPool operations and feature splicing to extract and integrate multi-scale features, but its receptive field is limited and its ability to capture long-range dependencies is insufficient. To this end, this application introduces an improved design based on the large kernel attention mechanism (LKA) on the basis of SPPF, such as Figure 12 and Figure 13 As shown, Figure 12 : is a schematic diagram of the SPPF structure based on LKA improvement provided in the embodiment of the present application, Figure 13 This is a schematic diagram of the LKA attention structure provided by the embodiment of the present application, which specifically includes the following modules:

[0175] Depthwise-Separable Convolution: Depthwise-Separable Convolution (DW-Conv) is used to extract local contextual information from feature maps. Compared with ordinary convolution, depthwise separable convolution significantly reduces computational overhead while effectively capturing local detail features.

[0176] Depthwise Dilated Convolution (DW-D-Conv) is used to capture long-range dependencies in feature maps within a larger receptive field. By introducing the dilation parameter, dilated convolution expands the range of feature extraction without significantly increasing the amount of computation, helping to capture long-range related information.

[0177] Channel convolution: Pointwise convolution (1×1 convolution) is used to aggregate features along the channel dimension. Each channel typically represents a specific feature in a neural network, and channel convolution can generate a feature map with stronger discriminative power by recombining features.

[0178] Attention mechanism: Generates an attention map through matrix dot product operations, which is used to dynamically adjust the importance of different positions and channels in the feature map, further improving the model's ability to express key features.

[0179] Furthermore, the improved SPPF structure is as follows Figure 12 and Figure 13 The specific workflow is as follows:

[0180] Input feature processing: The feature map output by the backbone network or feature fusion network is used as input. The size of the input feature map is C×H×W.

[0181] Local context information extraction: The input features first pass through a 5×5 depthwise separable convolution (DW-Conv) to extract local context information and capture the feature relationship between adjacent regions in the image.

[0182] Long-range dependency capture: The extracted local feature map is then passed through a 7×7 depth-wise dilated convolution (DW-D-Conv), which significantly expands the receptive field by increasing the dilation parameter, thereby capturing long-range dependencies in the feature map.

[0183] Channel dimension aggregation: The long-distance feature map undergoes 1×1 channel convolution (Pointwise Convolution) to aggregate the channel dimension features, further compressing redundant information while retaining key channel features.

[0184] Dynamic attention weight generation: Generate an attention map through matrix dot product operations, and dynamically weight the features of spatial and channel dimensions so that key features are highlighted and irrelevant features are suppressed.

[0185] Finally, the feature map after attention weighting is multiplied with the original input feature map ( Figure 13 ), generates a fused multi-scale feature map for input to the subsequent detection head network.

[0186] The improved LKA-based SPPF structure provided in this application significantly improves the effect of multi-scale feature integration. Its specific technical effects include:

[0187] Enhance the ability to capture local contextual information: Depthwise separable convolution can efficiently extract detailed information of adjacent pixels in the feature map, significantly improving the model's ability to express local features.

[0188] Expanding the receptive field and capturing long-distance dependencies: Deep dilated convolution effectively expands the scope of feature extraction through dilation operations, and captures long-distance dependencies without significantly increasing the amount of computation, which is helpful for target detection tasks in complex scenes.

[0189] Efficient aggregation of channel features: Channel convolution aggregates and reorganizes the channel dimensions of feature maps to generate feature maps with stronger discriminative capabilities, thereby improving the model's adaptability to multi-target detection.

[0190] Introduction of dynamic attention: The attention map generated by large kernel convolution can dynamically weight features at different positions and channels, significantly enhancing the model's ability to capture key features while suppressing background noise and irrelevant features.

[0191] Optimize computational efficiency: The improved SPPF structure greatly reduces the computational complexity and parameter quantity by decomposing the convolution kernel (decomposing the large kernel convolution into depth-separable convolution, depth-expanded convolution and channel convolution), achieving a good balance between computational efficiency and detection accuracy.

[0192] The improved SPPF structure of this embodiment is suitable for a variety of target detection tasks, especially in complex scenarios that require multi-scale feature integration (such as multi-target detection and small target detection). Through this embodiment, the model has been significantly improved in both detection accuracy and inference speed, meeting the needs of practical applications.

[0193] In some embodiments, the detection head network is optimized using a multi-task loss function, which includes:

[0194] Classification loss, used to optimize the prediction accuracy of the target category;

[0195] Regression loss, used to optimize the coordinate prediction of the target bounding box;

[0196] Feature matching loss is used to improve the network's efficiency in utilizing multi-scale feature maps.

[0197] Specifically, the classification loss is designed to improve the accuracy of the detection head network in predicting target categories.

[0198] In its implementation, the detection head network predicts the category of each candidate box based on the input feature map and generates a category probability distribution. The classification loss optimizes the detection network's ability to identify target categories by measuring the deviation between the predicted category probability distribution and the true category label. In multi-category or imbalanced object detection tasks, the classification loss can effectively reduce the missed detection rate of rare categories and improve overall detection accuracy.

[0199] Furthermore, the regression loss is designed to optimize the localization accuracy of the target bounding box by the detection head network.

[0200] When predicting the category, the detection head network also generates the coordinates of the object's bounding box, including its center point, width, and height. A regression loss compares the positional differences between the predicted and true bounding boxes, optimizing the overlap between the predicted and true bounding boxes and improving bounding box positioning accuracy. This optimization ensures more precise object positioning in complex scenes, especially when object boundaries are blurred or objects are densely packed.

[0201] Furthermore, the feature matching loss is designed to improve the efficiency of the detection head network in utilizing multi-scale feature maps.

[0202] In object detection tasks, objects of different sizes exhibit significant differences in their representation on feature maps. The features of small objects are often contained in high-resolution feature maps, while the features of large objects rely more heavily on low-resolution feature maps. The feature matching loss measures the degree of matching between feature maps of different scales during object detection, ensuring that the network fully utilizes information from multi-scale feature maps. This design effectively improves the detection network's ability to detect both small and large objects, enabling accurate recognition of multi-scale objects in complex scenarios.

[0203] In practical applications, the process of optimizing the detection head network through the multi-task loss function includes the following steps:

[0204] (1) Input feature map: The multi-scale feature map is passed into the detection head network from the feature fusion network or the spatial pyramid pooling module;

[0205] (2) Generate prediction results: The detection head network generates the target category prediction results and bounding box prediction results based on the input feature map;

[0206] (3) Loss calculation: According to the category label and bounding box coordinates of the real target, the classification loss and regression loss are calculated respectively, and the feature matching loss is calculated according to the matching degree of feature maps of different scales;

[0207] (4) Loss fusion and parameter optimization: The classification loss, regression loss and feature matching loss are weighted and fused to form a total loss value, which is used to optimize the parameters of the detection head network.

[0208] Through the design and optimization of the above multi-task loss function, the detection head network of this application can show significant advantages in the following aspects:

[0209] Improved classification accuracy: The design of classification loss can effectively improve the prediction accuracy of target categories, especially in multi-category or category-imbalanced detection tasks.

[0210] Improved bounding box positioning accuracy: Optimization of regression loss ensures the accuracy of bounding box prediction, reducing false positives and missed detections in object detection.

[0211] Efficient utilization of multi-scale feature maps: The introduction of feature matching loss can significantly improve the utilization efficiency of multi-scale feature maps, ensuring the performance of the detection network in small object detection and multi-object detection tasks;

[0212] Comprehensive performance improvement: Through multi-task joint optimization of classification, regression, and feature matching, the detection head network can achieve higher detection accuracy and robustness in complex scenarios.

[0213] In some embodiments, the object detection deep learning model further includes:

[0214] The input preprocessing module is used to normalize and rescale the input image to adapt to the input requirements of the backbone network;

[0215] The output post-processing module is used to post-process the target category and bounding box coordinates output by the detection head network. The post-processing includes non-maximum suppression operations.

[0216] Specifically, the input preprocessing module is used to normalize and rescale the input image to adapt to the input requirements of the backbone network, ensuring that the input image can be efficiently processed and high-quality features can be generated. The specific steps are as follows:

[0217] (1) Normalization processing:

[0218] The pixel values ​​of input images may fluctuate widely, which can affect model training and inference stability. Normalization adjusts the pixel values ​​of input images to a uniform range (for example, between 0 and 1), thereby improving model training speed and reducing numerical bias during feature extraction.

[0219] (2) Scale adjustment:

[0220] Input images can vary in size, while backbone networks typically require them to be of a fixed size. To address this, the input preprocessing module rescales the image, scaling it while maintaining its aspect ratio. Furthermore, to accommodate the fixed-size input, the rescaled image can be edge-padded to avoid distortion or information loss.

[0221] Through the above preprocessing operations, the input preprocessing module can ensure that the input image matches the input requirements of the backbone network, while reducing the impact of image size differences on target detection performance.

[0222] Furthermore, the output post-processing module is used to post-process the target category and bounding box coordinates output by the detection head network to further improve the accuracy and robustness of the detection results. The specific processing process includes the following steps:

[0223] (1) Non-maximum suppression operation:

[0224] The detection head network may generate multiple overlapping predictions for the same target region, often with high class confidence. To remove redundant boxes and retain the optimal box, the output post-processing module uses non-maximum suppression. This filter removes excessively overlapping predictions based on their overlap and confidence scores, retaining only the highest-confidence boxes as the final output.

[0225] (2) Bounding box adjustment:

[0226] In some scenarios, the bounding boxes generated by the detection head network may have some deviations. The output post-processing module can fine-tune the position and size of the bounding boxes to optimize their accuracy and ensure that the object's boundaries are more realistic.

[0227] (3) Screening and sorting of target categories:

[0228] Based on the predicted confidence of the target category, the detection results are sorted from high to low confidence, with the target categories and corresponding bounding box coordinates of the higher confidence levels being output first. This sorting operation facilitates the subsequent analysis and application of the target detection results.

[0229] This embodiment introduces an input pre-processing module and an output post-processing module into the target detection deep learning model to achieve the following technical effects:

[0230] (1) Improve the adaptability of input data:

[0231] The input preprocessing module ensures that the input image can meet the fixed size requirements of the backbone network. At the same time, the normalization operation can improve the model's adaptability to different image data and enhance the robustness of target detection.

[0232] (2) Improve the accuracy of test results:

[0233] The output post-processing module removes redundant boxes through non-maximum suppression and optimizes the bounding boxes to ensure the accuracy and consistency of the target detection results.

[0234] (3) Simplify subsequent analysis and application:

[0235] The output post-processing module filters and sorts target categories and bounding boxes, providing a concise and easy-to-use output format for the analysis and subsequent application of target detection results.

[0236] The above embodiments provide a detailed description of the contents of the target detection deep learning model of this application. The following describes in detail the target detection method based on the target detection deep learning model provided in the above embodiments.

[0237] Figure 14Schematic diagram of the target detection method provided in the embodiment of the present application. Figure 14 As shown, the target detection method may specifically include:

[0238] S1401, normalizing and resizing the target image to generate image data that meets the input requirements of the backbone network;

[0239] S1402, using the backbone network to extract features from the image data. In the initial stage of the backbone network, the edge feature extraction module is combined with a horizontal filter and a vertical filter to extract edge features of the image, and the edge features are combined with the basic features of the backbone network.

[0240] S1403: embedding a global context attention module into the residual structure of the backbone network, and using the context modeling unit and the feature transformation unit to perform weighted processing on the feature map to highlight key features and suppress irrelevant features;

[0241] S1404: Input the multi-scale features output by the backbone network into the feature fusion network, perform weighted fusion on the feature maps of different scales based on the multi-scale attention mechanism, and perform normalization and activation processing on the fused features to generate a fused feature map;

[0242] S1405: Input the fused feature map into the pooling module, use spatial pyramid pooling to integrate multi-scale features, and use convolution units based on a large kernel attention mechanism. Use depthwise separable convolution to extract local context information, deep dilated convolution to capture long-range dependencies, and channel-wise convolution to complete feature aggregation in the channel dimension.

[0243] S1406: Utilize the detection head network to receive the feature maps output by the pooling module and the feature fusion network, and combine it with the multi-task loss function to predict the category and position of the target, and output the category label and bounding box coordinates of the target detection.

[0244] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0245] Figure 15 1 is a schematic diagram of the structure of the electronic device 15 provided in the embodiment of the present application. Figure 15As shown, the electronic device 15 of this embodiment includes: a processor 1501, a memory 1502, and a computer program 1503 stored in the memory 1502 and executable on the processor 1501. When the processor 1501 executes the computer program 1503, the steps of the above-mentioned method embodiments are implemented. Alternatively, when the processor 1501 executes the computer program 1503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0246] For example, the computer program 1503 may be divided into one or more modules / units, which are stored in the memory 1502 and executed by the processor 1501 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 1503 in the electronic device 15.

[0247] The electronic device 15 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 15 may include but is not limited to a processor 1501 and a memory 1502. Those skilled in the art will appreciate that Figure 15 It is only an example of the electronic device 15 and does not constitute a limitation of the electronic device 15. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0248] The processor 1501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0249] Memory 1502 can be an internal storage unit of electronic device 15, such as a hard disk or memory of electronic device 15. Memory 1502 can also be an external storage device of electronic device 15, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on electronic device 15. Furthermore, memory 1502 can include both an internal storage unit of electronic device 15 and an external storage device. Memory 1502 is used to store computer programs and other programs and data required by the electronic device. Memory 1502 can also be used to temporarily store data that has been output or is about to be output.

[0250] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0251] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0252] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0253] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which may be electrical, mechanical or other forms.

[0254] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0255] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0256] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0257] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A deep learning model for target detection, characterized in that: include: A backbone network for extracting features from an input image. The backbone network includes multiple residual structures, each consisting of a convolutional layer, a normalization layer, and an activation function layer, and a global context attention module is embedded in the residual structure. An edge feature extraction module, configured to extract edge features of an input image using filters in the initial stage of the backbone network, wherein the filters include horizontal and vertical filters, and are configured to detect intensity changes of edges in the image to extract edge information; A feature fusion network, configured to fuse the multi-scale features output by the backbone network, wherein the feature fusion network includes a fusion module based on a multi-scale attention mechanism, and the fusion module is configured to weightedly reorganize the multi-scale features; A pooling module for integrating multi-scale features using spatial pyramid pooling. The pooling module includes a convolution unit based on a large-core attention mechanism. The large-core attention mechanism is used to decompose the large convolution kernel into depthwise separable convolution, depthwise dilated convolution, and channel convolution to capture local context information and long-range dependencies. The detection head network is used to receive the feature maps output by the feature fusion network and the pooling module, predict the target category and position, and output the category label and bounding box coordinates of the target detection.

2. The target detection deep learning model according to claim 1, characterized in that The global context attention module includes: a context modeling unit for globally modeling the input features, wherein the context modeling unit weights the input features based on the channel dimension; A feature transformation unit for transforming weighted features, wherein the feature transformation unit is used to enhance the model's ability to characterize important features using nonlinear activation functions and normalization operations.

3. The target detection deep learning model according to claim 2, characterized in that The global context attention module also includes: A weight generator, used to generate a global weight distribution based on input features; A feature weighting module is used to weight the input features according to the global weight distribution to highlight key features, and add the weighted output features to the features in the residual path.

4. The target detection deep learning model according to claim 1, characterized in that The edge feature extraction module is specifically used for: Utilizing the horizontal filter to detect horizontal intensity changes in the input image and extract horizontal edge information; Utilizing the vertical filter to detect vertical intensity changes in the input image and extract vertical edge information; The edge information in the horizontal and vertical directions is fused to generate an edge feature map, which is then combined with the feature map in the initial stage of the backbone network.

5. The target detection deep learning model according to claim 4, characterized in that The edge feature extraction module is embedded in the initial downsampling stage of the backbone network. The downsampling stage adopts a combination of convolutional layers and filters, wherein the convolutional layers are used to extract basic image features; the filters are used to extract edge information and fuse it with the output of the convolutional layers to generate a feature map with edge enhancement characteristics.

6. The target detection deep learning model according to claim 1, characterized in that The fusion module is specifically used for: Based on the multi-scale attention mechanism, dynamic weights are assigned to feature maps of different scales, and the fused feature maps are normalized and activated to obtain fused features. The fused features output by the fusion module are used as input for subsequent pooling modules and detection head networks.

7. The target detection deep learning model according to claim 1, characterized in that The integration of multi-scale features using spatial pyramid pooling includes: Depthwise separable convolution is used to extract local contextual information, depthwise dilated convolution is used to capture long-distance dependencies in feature maps, and channel-wise convolution is used to aggregate features in the channel dimension to generate a fused multi-scale feature map.

8. The target detection deep learning model according to claim 1, characterized in that The detection head network is optimized using a multi-task loss function, which includes: Classification loss, used to optimize the prediction accuracy of the target category; Regression loss, used to optimize the coordinate prediction of the target bounding box; Feature matching loss is used to improve the network's efficiency in utilizing multi-scale feature maps.

9. The target detection deep learning model according to claim 1, characterized in that The target detection deep learning model also includes: An input preprocessing module, configured to normalize and rescale the input image to meet the input requirements of the backbone network; An output post-processing module is used to post-process the target category and bounding box coordinates output by the detection head network, wherein the post-processing includes a non-maximum suppression operation.

10. A target detection method based on the target detection deep learning model according to any one of claims 1 to 9, characterized in that: include: Normalize and rescale the target image to generate image data that meets the input requirements of the backbone network; The backbone network is used to extract features from the image data. In the initial stage of the backbone network, the edge feature extraction module is combined with the horizontal filter and the vertical filter to extract the edge features of the image, and the edge features are combined with the basic features of the backbone network. A global context attention module is embedded in the residual structure of the backbone network, and the feature map is weighted using the context modeling unit and feature transformation unit to highlight key features and suppress irrelevant features. The multi-scale features output by the backbone network are input into the feature fusion network. Based on the multi-scale attention mechanism, the feature maps of different scales are weightedly fused, and the fused features are normalized and activated to generate a fused feature map. The fused feature map is input into the pooling module, and spatial pyramid pooling is used to integrate multi-scale features. A convolution unit based on a large kernel attention mechanism is used, and depthwise separable convolution is used to extract local context information, depthwise dilated convolution is used to capture long-range dependencies, and channel-wise convolution is used to complete feature aggregation in the channel dimension. The detection head network receives the feature maps output by the pooling module and the feature fusion network, and combines the multi-task loss function to predict the category and position of the target, and outputs the category label and bounding box coordinates of the target detection.