Target detection method and device, computer equipment and storage medium

By combining a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head, the problem of high difficulty in detecting small-sized targets in industrial environments is solved, achieving efficient feature fusion and accurate target detection.

CN121904338APending Publication Date: 2026-04-21BEIJING JIZHI DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING JIZHI DIGITAL TECH CO LTD
Filing Date
2025-12-09
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

The work area has a complex environment, and the collected images contain a large number of targets that are randomly distributed. In addition, the scale of the office chairs in the images varies greatly due to the angle of the work area cameras, making it difficult to detect small targets in the distance and resulting in a high rate of missed detections and false detections.

Method used

A feature extraction network is used to extract features from the target scene image. An adaptive spatial fusion network is used to optimize the channel and spatial dual attention and perform progressive fusion processing. A dual decoupled head is used to predict the target object, thereby enhancing the ability to recognize small targets.

Benefits of technology

It effectively reduces the false negative and false positive rates of target objects in target scene images, improves the accuracy and robustness of target detection, and outputs more accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904338A_ABST
    Figure CN121904338A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer vision, and discloses a target detection method and device, computer equipment and a storage medium. The target detection method is applied to a target detection model, and the target detection model comprises a feature extraction network, an adaptive space fusion network and double decoupling heads. Firstly, feature extraction is performed on a target scene image through a feature extraction network to obtain initial feature data; then, channel and space double attention optimization and asymptotic fusion processing are carried out on the initial feature data through an adaptive space fusion network, and fusion enhanced feature data are obtained; wherein through channel and space double attention optimization, the expression ability of different features is improved. And the problem of information loss or degradation caused by too large semantic difference between non-adjacent hierarchies is avoided through asymptotic fusion processing. And finally, target object prediction is carried out on the fusion enhanced feature data through double decoupling heads, so that the accuracy of target detection is improved, and a more accurate target detection result is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a target detection method, apparatus, computer device, and storage medium. Background Technology

[0002] Due to the complex environment of the work area, the acquired images contain a large number of targets with a chaotic distribution. Furthermore, the scale of the office chairs in the images varies considerably due to the angle of the work area cameras. Small targets, especially those at a distance, are particularly difficult to detect, resulting in a high rate of missed and false detections.

[0003] In related techniques, to enhance the model's adaptability to targets of different sizes, multi-scale training and an increase in the number of anchor points were introduced into the original Faster R-CNN. However, this method still needs improvement in terms of detection accuracy and speed. Summary of the Invention

[0004] The embodiments described in this specification aim to at least partially solve one of the technical problems in the related art. To this end, the embodiments described in this specification propose a target detection method, apparatus, computer device, and storage medium.

[0005] This specification provides a target detection method, characterized in that it is applied to a target detection model, the target detection model including a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head, and the method includes: The feature extraction network is used to extract features from the target scene image to obtain initial feature data; The initial feature data is optimized by dual channel and spatial attention and progressively fused using the adaptive spatial fusion network to obtain fused and enhanced feature data. The dual decoupling heads are used to predict target objects from the fused and enhanced feature data, and the target detection results are output.

[0006] In one implementation, the adaptive spatial fusion network includes a convolutional attention module and an adaptive feature pyramid network. The initial feature data is subjected to channel and spatial dual attention optimization and progressive fusion processing via the adaptive spatial fusion network to obtain fused enhanced feature data, including: The initial feature data is sequentially optimized by channel attention and spatial attention through the convolutional attention module to obtain enhanced feature data. The enhanced feature data is progressively fused using the adaptive feature pyramid network, integrating features from different levels in the enhanced feature data to obtain fused enhanced feature data.

[0007] In one embodiment, the method further includes: reconstructing a baseline model to obtain the target detection model; the reconstructing of the baseline model to obtain the target detection model includes: The multi-scale feature fusion module in the neck network of the baseline model is replaced with the adaptive feature pyramid network, and a convolutional attention module is added between the feature extraction network and the adaptive feature pyramid network.

[0008] In one implementation, the convolutional attention module includes a channel attention submodule and a spatial attention submodule. The process of sequentially performing channel attention optimization and spatial attention optimization on the initial feature data through the convolutional attention module to obtain enhanced feature data includes: The initial feature data is modeled in terms of channel dimension by the channel attention submodule to generate channel attention weights. The channel attention weights are then weighted with the initial feature data in terms of channel dimension to obtain channel-enhanced feature data. The spatial attention submodule performs attention modeling on the channel enhancement feature data in the spatial dimension to generate spatial attention weights. The spatial attention weights are then weighted with the channel enhancement feature data in the spatial dimension to obtain the enhancement feature data.

[0009] In one implementation, the enhanced feature data includes enhanced feature data at different scales, including low-level enhanced feature data, second-lowest-level enhanced feature data, and high-level enhanced feature data. The stepwise fusion processing of the enhanced feature data through the adaptive feature pyramid network to obtain fused enhanced feature data includes: The low-level enhanced feature data and the second-lowest-level enhanced feature data are input into the adaptive feature pyramid network, and then the high-level enhanced feature data are introduced for fusion to generate fused enhanced feature data.

[0010] In one implementation, the feature extraction network comprises a slicing / focusing module, a convolution-batch normalization-activation function module, a cross-stage partial connection network, and a spatial pyramid pooling module; and / or The target scene image includes an office area image, and the target detection result includes the detection result of chairs in the office area.

[0011] In one implementation, the convolution-batch normalization-activation function module consists of a convolutional layer, a batch normalization layer, and a Silu activation function.

[0012] This specification provides a target detection device applied to a target detection model, the target detection model including a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head, the device comprising: The feature extraction module is used to extract features from the target scene image through the feature extraction network to obtain initial feature data; An adaptive spatial fusion module is used to perform channel and spatial dual attention optimization and progressive fusion processing on the initial feature data through the adaptive spatial fusion network to obtain fused and enhanced feature data; The target object prediction module is used to predict target objects from the fused enhanced feature data through the dual decoupling heads and output target detection results.

[0013] This specification provides a computer device comprising: a memory, and one or more processors communicatively connected to the memory; the memory stores instructions executable by the one or more processors, the instructions being executed by the one or more processors to cause the one or more processors to perform the steps of the method described in any of the above embodiments.

[0014] This specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0015] This specification provides a computer program product that includes instructions that, when executed by a processor of a computer device, enable the computer device to perform the steps of the method described in any of the above embodiments.

[0016] In the above-described embodiments, the target detection method is applied to a target detection model, which includes a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head. First, the feature extraction network extracts features from the target scene image to obtain initial feature data. Then, the adaptive spatial fusion network performs channel and spatial dual attention optimization and progressive fusion processing on the initial feature data to obtain fused enhanced feature data. Specifically, by performing channel and spatial dual attention optimization, the key feature channels and key spatial location information in the initial feature data can be more effectively focused on, thereby improving the expressive power of different features and effectively reducing the false positive and false negative rates of target objects in the target scene image. Progressive fusion processing can gradually reduce the semantic gap between features at different levels, gradually integrate features at different levels, and avoid information loss or degradation caused by excessive semantic gaps between non-adjacent levels, achieving efficient feature fusion and enhancing the ability to recognize small targets. Finally, the dual decoupling head predicts target objects using the fused enhanced feature data, thereby improving the accuracy and robustness of target detection and outputting more accurate target detection results. Attached Figure Description

[0017] Figure 1 A flowchart illustrating the target detection method provided in the embodiments of this specification; Figure 2 A flowchart illustrating the process of obtaining fused and enhanced feature data is provided for the implementation of this specification. Figure 3 A schematic diagram of the adaptive spatial fusion network in the target detection model reconstructed from the YOLOX baseline model, provided for the implementation of this specification. Figure 4a A flowchart illustrating the process of obtaining enhanced feature data provided for embodiments of this specification; Figure 4b A schematic diagram illustrating the obtained enhanced feature data provided for embodiments of this specification; Figure 5 A schematic diagram illustrating the obtained fusion enhancement feature data provided for the embodiments of this specification; Figure 6a A schematic diagram of the unfolded feature extraction network provided for the embodiments of this specification; Figure 6b A schematic diagram of the unfolded structure of the slicing / focusing module (Focus) provided for the embodiments of this specification; Figure 6c A schematic diagram of the structure of the cross-stage partial connection network (CSP) provided for the embodiments of this specification; Figure 6d A schematic diagram of the unfolded structure of the Space Pyramid Pooling Module (SPP) provided for the embodiments of this specification; Figure 7 A schematic diagram of the expanded structure of the convolution-batch normalization-activation function module provided for the embodiments of this specification; Figure 8 A schematic diagram of the target detection model reconstructed from the YOLOX baseline model, provided for the implementation of this specification. Figure 9 A schematic diagram of the target detection device provided for embodiments of this specification; Figure 10 An internal structural diagram of a computer device provided for embodiments of this specification. Detailed Implementation

[0018] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0019] Due to the complex environment of the work area, the acquired images contain a large number of targets with a chaotic distribution. Furthermore, the scale of the office chairs in the images varies considerably due to the angle of the work area cameras. Small targets, especially those at a distance, are particularly difficult to detect, resulting in a high rate of missed and false detections.

[0020] In related technologies, deep learning-based object detection algorithms can be mainly divided into two categories: one-stage (such as SSD and YOLO series) and two-stage (such as R-CNN series) methods. To enhance the model's adaptability to targets of different sizes, multi-scale training and the number of anchor points were introduced in the original Faster R-CNN. In the YOLO series, YOLOv3 increased the input image size and used separable convolutions instead of traditional convolutions in Darknet-53 to reduce feature loss, reduce the number of parameters, and improve detection speed. YOLOv4 uses a YCbCr color space cross-selection method for object detection; YOLOv5 adds a feature output layer in its structure and uses clustering methods to optimize the prior anchor box design. However, the above-mentioned related technologies need to be improved in terms of detection accuracy and speed, and they neglect spatial information in the feature extraction process.

[0021] Based on the above analysis, this specification provides an object detection method. The object detection method is applied to an object detection model, which includes a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head. First, the feature extraction network extracts features from the target scene image to obtain initial feature data. Then, the adaptive spatial fusion network performs channel and spatial dual attention optimization and progressive fusion processing on the initial feature data to obtain fused enhanced feature data. Specifically, by performing channel and spatial dual attention optimization, key feature channels and key spatial location information in the initial feature data can be more effectively focused on, thereby improving the expressive power of different features and effectively reducing the false positive and false negative rates of target objects in the target scene image. Progressive fusion processing can gradually reduce the semantic gap between features at different levels, gradually integrate features at different levels, avoid information loss or degradation caused by excessive semantic gaps between non-adjacent levels, achieve efficient feature fusion, and enhance the ability to recognize small targets. Finally, the dual decoupling head predicts target objects using the fused enhanced feature data, thereby improving the accuracy and robustness of object detection and outputting more accurate object detection results.

[0022] This specification provides an object detection method applied to an object detection model. The object detection model includes a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head. Please refer to [link to documentation]. Figure 1 The target detection method may include the following steps: S110. Extract features from the target scene image using a feature extraction network to obtain initial feature data.

[0023] Specifically, firstly, an image acquisition device (such as a DSLR camera or surveillance camera) is used to acquire images of the target scene. In some implementations, after image acquisition, preprocessing operations (such as normalization and noise filtering) are performed on the acquired images to obtain the target scene image. The target scene image is then used as input to an object detection model. The feature extraction network in the object detection model performs multi-level and multi-scale feature extraction on the target scene image, capturing local detail information and semantic information in the image. Finally, initial feature data containing spatial and semantic information is output, laying the foundation for subsequent processing tasks (such as object detection).

[0024] S120. The initial feature data is optimized by dual channel and spatial attention and progressive fusion processing through an adaptive spatial fusion network to obtain fused and enhanced feature data.

[0025] Specifically, after obtaining the initial feature data, it is used as input to the adaptive spatial fusion network. The adaptive spatial fusion network first performs dual attention optimization on the initial feature data using both channel and spatial factors. By modeling the dependencies between different channels and spaces, feature data that simultaneously integrates channel importance and spatial location importance is obtained. Then, the adaptive spatial fusion network performs progressive fusion processing on the feature data that integrates channel importance and spatial location importance using a bottom-up or top-down progressive strategy, gradually integrating features from different levels to obtain fused and enhanced feature data.

[0026] S130. The target object is predicted by the fused enhanced feature data through dual decoupling heads, and the target detection result is output.

[0027] Specifically, the fused and enhanced feature data is input into the dual-decoupled head for target object prediction. The dual decoupling has classification and regression branches, focusing on learning object category features and spatial location information respectively, thereby improving the accuracy of each task. Finally, the prediction results from the two branches are combined, and post-processing operations such as non-maximum suppression are used to filter redundant bounding boxes, outputting the final target detection result.

[0028] In some implementations, the target scene image includes an office area image, and the target detection result includes the detection result of chairs within the office area.

[0029] In the above embodiments, the target detection method is applied to a target detection model, which includes a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head. First, the feature extraction network extracts features from the target scene image to obtain initial feature data. Then, the adaptive spatial fusion network performs channel and spatial dual attention optimization and progressive fusion processing on the initial feature data to obtain fused enhanced feature data. Specifically, by performing channel and spatial dual attention optimization, key feature channels and key spatial location information in the initial feature data can be more effectively focused on, thereby improving the expressive power of different features and effectively reducing the false positive and false negative rates of target objects in the target scene image. Progressive fusion processing can gradually reduce the semantic gap between different levels of features, gradually integrate features from different levels, and avoid information loss or degradation caused by excessive semantic differences between non-adjacent levels, achieving efficient feature fusion and enhancing the ability to recognize small targets. Finally, the dual decoupling head predicts target objects using the fused enhanced feature data, thereby improving the accuracy and robustness of target detection and outputting more accurate target detection results.

[0030] In some implementations, please refer to Figure 2The adaptive spatial fusion network includes a convolutional attention module and an adaptive feature pyramid network. It performs dual channel and spatial attention optimization and progressive fusion processing on the initial feature data to obtain fused and enhanced feature data. This process may include the following steps: S210. The initial feature data is sequentially optimized by channel attention and spatial attention through the convolutional attention module to obtain enhanced feature data.

[0031] S220. The enhanced feature data is progressively fused using an adaptive feature pyramid network to integrate features from different levels in the enhanced feature data, resulting in fused enhanced feature data.

[0032] Specifically, the initial feature data is optimized with dual channel and spatial attention through a convolutional attention module. By modeling the dependencies between different channels and spaces, enhanced feature data that simultaneously integrates channel importance and spatial location importance is obtained. Then, an adaptive feature pyramid network is used to progressively fuse the enhanced feature data using a bottom-up or top-down strategy, gradually integrating features from different levels to obtain fused enhanced feature data.

[0033] In the above implementation, the initial feature data is sequentially optimized by channel attention and spatial attention through a convolutional attention module to obtain enhanced feature data. This enhances the focus on key feature channels and key spatial location information in the initial feature data, thereby improving the ability to express different features and effectively reducing the false positive and false negative rates of target objects in the target scene image. An adaptive feature pyramid network is then used to progressively fuse the enhanced feature data, gradually narrowing the semantic gap between different levels of features and integrating features from different levels. This avoids information loss or degradation caused by excessive semantic differences between non-adjacent levels, achieving efficient feature fusion, enhancing the ability to recognize small targets, and resulting in fused enhanced feature data. In some implementations, the method further includes: reconstructing a baseline model to obtain an object detection model; reconstructing the baseline model to obtain an object detection model may include: replacing the multi-scale feature fusion module in the neck network of the baseline model with an adaptive feature pyramid network, and adding a convolutional attention module between the feature extraction network and the adaptive feature pyramid network.

[0034] Specifically, by replacing the multi-scale feature fusion module in the neck network of the baseline model with an adaptive feature pyramid network, the semantic gap between features at different levels can be gradually reduced, and features at different levels can be gradually integrated. This avoids information loss or degradation caused by excessive semantic gaps between non-adjacent levels, achieving efficient feature fusion and enhancing the ability to recognize small targets.

[0035] Adding a convolutional attention module between the feature extraction network and the adaptive feature pyramid network can more effectively focus on key feature channels and key spatial location information in the initial feature data, thereby improving the ability to express different features and effectively reducing the false negative and false positive rates of target objects in the target scene image.

[0036] In some implementations, the baseline model may be the YOLOX model. See also... Figure 3 , Figure 3 This is a schematic diagram of the adaptive spatial fusion network in the object detection model reconstructed using YOLOX as the baseline model. The adaptive spatial fusion network (Neck) consists of a convolutional attention module (CBAM) and an adaptive feature pyramid network (AFPN).

[0037] In some implementations, please refer to Figure 4a The convolutional attention module includes a channel attention submodule and a spatial attention submodule. The initial feature data is sequentially optimized using channel attention and spatial attention by the convolutional attention module to obtain enhanced feature data. This process may include the following steps: S410. The initial feature data is modeled in terms of channel dimension through the channel attention submodule to generate channel attention weights. The channel attention weights are then weighted with the initial feature data in terms of channel dimension to obtain channel-enhanced feature data.

[0038] S420. The spatial attention submodule performs attention modeling on the channel enhancement feature data in the spatial dimension, generates spatial attention weights, and then weights the spatial attention weights with the channel enhancement feature data in the spatial dimension to obtain the enhancement feature data.

[0039] Specifically, the convolutional attention module includes a channel attention submodule and a spatial attention submodule. First, the channel attention submodule models the initial feature data along the channel dimension, capturing the dependencies between different channels. It then analyzes the importance of each channel feature, generating corresponding channel attention weights to reflect the contribution of different channels in the global context. Next, the channel attention weights are weighted along the channel dimension with the initial feature data, enhancing the response of key channel features and establishing a channel-level connection with the initial feature data to obtain channel-enhanced feature data. Next, the spatial attention submodule models the channel-enhanced feature data along the spatial dimension, evaluating the importance of different spatial locations in the feature map and generating spatial attention weights to highlight information-rich regions and suppress background or noisy regions. Finally, the spatial attention weights are weighted along the spatial dimension with the channel-enhanced feature data, focusing on key regions and establishing a spatial connection with the channel-enhanced feature data, thus outputting the final, doubly optimized enhanced feature data.

[0040] For example, please refer to Figure 4b The initial input feature data is modeled in the channel dimension using the Channel Attention Submodule (CAM), generating channel attention weights. These weights are then weighted with the initial input feature data in the channel dimension to obtain the channel-enhanced feature data. Similarly, the channel-enhanced feature data is modeled in the spatial dimension using the Spatial Attention Submodule (SAM), generating spatial attention weights. These weights are then weighted with the channel-enhanced feature data in the spatial dimension to obtain the enhanced feature data (output feature).

[0041] In the above implementation, by performing dual attention optimization of channels and space, it is possible to more effectively focus on key feature channels and key spatial location information in the initial feature data, thereby improving the ability to express different features and effectively reducing the false detection rate of target objects in the target scene image.

[0042] In some implementations, the enhanced feature data includes enhanced feature data of different scales, including low-level enhanced feature data, second-lowest-level enhanced feature data, and high-level enhanced feature data. The enhanced feature data is progressively fused through an adaptive feature pyramid network to obtain fused enhanced feature data. This may include: inputting low-level and second-lowest-level enhanced feature data into the adaptive feature pyramid network, and then introducing high-level enhanced feature data for fusion to generate fused enhanced feature data.

[0043] Specifically, firstly, low-level augmented feature data containing rich details and second-lower-level augmented feature data with moderate semantic abstraction are input into an adaptive feature pyramid network for initial feature interaction and integration. Subsequently, high-level augmented feature data representing advanced semantic information is gradually introduced, achieving deep fusion of multi-level and multi-scale features through a combination of top-down and lateral connections. This progressive fusion strategy effectively preserves and enhances the expressive power of features at each level, ultimately generating more comprehensive and discriminative fused augmented feature data.

[0044] For example, please refer to Figure 5 The enhanced feature data includes low-level enhanced feature data C3, second-lowest-level enhanced feature data C4, and high-level enhanced feature data C5. First, the low-level enhanced feature data C3 and second-lowest-level enhanced feature data C4 are input into the adaptive feature pyramid network. Then, the high-level enhanced feature data C5 is added for fusion, producing fused enhanced feature data {P3, P4, P5}. Upsampling is performed using 1×1 convolutions to adjust the number of channels and combining them with bilinear interpolation to align dimensions and prepare for feature fusion. Downsampling is achieved by selecting different convolution kernels and strides based on the target downsampling ratio. A 2×2 convolution with a stride of 2 is used for the second-lowest-level enhanced feature data C4 to achieve a 2x downsampling, thus horizontally connecting it to the low-level enhanced feature data C3 at the same scale. A 4×4 convolution with a stride of 4 is used for the high-level enhanced feature data C5 to achieve a 4x downsampling, maintaining scale alignment with the low-level enhanced feature data C3 and horizontally connecting it.

[0045] In the above implementation, the semantic gap between features at different levels can be gradually reduced through progressive fusion processing, and features at different levels can be gradually integrated. This avoids information loss or degradation caused by excessive semantic gaps between non-adjacent levels, thereby achieving efficient feature fusion and enhancing the ability to recognize small targets.

[0046] In some implementations, the feature extraction network consists of a slicing / focusing module, a convolution-batch normalization-activation function module, a cross-stage partial connection network, and a spatial pyramid pooling module.

[0047] Specifically, the feature extraction network consists of a slicing / focusing module, a convolution-batch normalization-activation function module, a cross-stage partial connection network, and a spatial pyramid pooling module. These modules work collaboratively to extract rich and robust multi-scale features from the input image to obtain initial feature data. The slicing / focusing module, as the front-end processing unit of the feature extraction network, performs cross-dimensional reconstruction of the input image, achieving downsampling while maintaining information integrity, reducing computational load while enhancing channel-dimensional feature representation. The convolution-batch normalization-activation function module, as the feature learning unit, extracts local features through convolution operations, stabilizes the training process through batch normalization, and introduces nonlinearity using activation functions, thereby improving the network's representational ability. The cross-stage partial connection network segments the gradient flow and partially fuses cross-stage features, reducing computational complexity while enhancing feature reuse and integration. The spatial pyramid pooling module uses multi-scale pooling kernels for parallel pooling operations, fusing feature information from different receptive fields, enabling the network to effectively capture multi-scale contextual information.

[0048] In some implementations, please refer to Figure 6a , Figure 6a This is a schematic diagram of the unfolded structure of the feature extraction network. Figure 6a The feature extraction network consists of, in sequence, a slice / focus module (Focus), a convolution-batch normalization-activation function module (CBS), a convolution-batch normalization-activation function module (CBS), a cross-stage partial connection network (CSP), a convolution-batch normalization-activation function module (CBS), a cross-stage partial connection network (CSP), a convolution-batch normalization-activation function module (CBS), a spatial pyramid pooling module (SPP), and a cross-stage partial connection network (CSP). Figure 6a Each cross-stage partial connection network (CSP) in the network feeds the output initial feature data into the adaptive feature pyramid network.

[0049] For example, please refer to Figure 6b , Figure 6b A schematic diagram showing the unfolded structure of the slicing / focusing module (Focus). Please refer to [link / reference]. Figure 6c , Figure 6c A schematic diagram illustrating the structure of a Cross-Stage Partial Connection Network (CSP). Please refer to [link / reference]. Figure 6d , Figure 6dThis is a schematic diagram of the Spatial Pyramid Pooling (SPP) module. The Slice module extracts a sub-region from the input tensor within a specified range. The Maxpool module extracts the maximum value of a local region using a sliding window, often used to reduce feature map size while preserving salient features. The Concat module is an operation that concatenates two or more tensors along a specified dimension. After concatenation, the dimensions of the new tensor remain unchanged, and the number of channels is the sum of the number of channels of each tensor before the Concat operation.

[0050] In some implementations, the convolution-batch normalization-activation function module consists of convolutional layers, batch normalization layers, and Silu activation functions.

[0051] Specifically, the convolution-batch normalization-activation function module consists of convolutional layers, batch normalization layers, and Silu activation functions in sequence. Through the clear division of labor and synergy among the layers, this module significantly improves the training stability, convergence speed, and accuracy of the final target object prediction of the model.

[0052] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of the convolution-batch normalization-activation function module. Among them, the convolutional layer (Conv) is responsible for feature extraction. It performs sliding calculations on the input data through convolution kernels to capture local spatial features and construct feature maps.

[0053] Batch Normalization (BN) layers follow convolutional layers and are used to standardize the feature maps output by the convolutional layers. By adjusting the mean and variance of the data, it alleviates the problem of internal covariate shift during training, thereby reducing the dependence on parameter initialization, allowing for higher learning rates, and having a regularization effect, which helps to accelerate model convergence.

[0054] The Silu activation function, as the nonlinear unit at the end of the convolution-batch normalization-activation function module, transforms the output of the batch normalization layer, which helps to alleviate the gradient vanishing problem.

[0055] This specification provides an implementation method for a target detection model reconstructed from a YOLOX baseline model. Please refer to [link to implementation details]. Figure 8 , Figure 8This is a schematic diagram of the object detection model. The model includes a feature extraction network (Backbone), an adaptive spatial fusion network (Neck), and a dual decoupled head. The Cls module (classification module) predicts the specific category of the object within each preset anchor box. The Reg module (boundary box regression module) predicts the precise offset and size scaling of the object's bounding box relative to the preset anchor boxes. The Obj module (object prediction module) determines whether an object exists within each anchor box and acts as a binary classifier. The ReShape module (dimensionality reshaping module) rearranges the feature tensors output by the network into the final detection result format.

[0056] Specifically, the initial feature data is obtained by extracting features from the target scene image through a feature extraction network (Backbone). The initial feature data is then subjected to dual channel and spatial attention optimization and progressive fusion processing through an adaptive spatial fusion network (Neck) to obtain fused and enhanced feature data. Finally, the fused and enhanced feature data is used to predict target objects through a dual decoupled head, outputting the target detection result.

[0057] This specification provides a target detection device 900, applied to a target detection model. The target detection model includes a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head. (See also...) Figure 9 The target detection device 900 includes: a feature extraction module 910, an adaptive spatial fusion module 920, and a target object prediction module 930.

[0058] Feature extraction module 910 is used to extract features from the target scene image through the feature extraction network to obtain initial feature data; The adaptive spatial fusion module 920 is used to perform channel and spatial dual attention optimization and progressive fusion processing on the initial feature data through the adaptive spatial fusion network to obtain fused enhanced feature data; The target object prediction module 930 is used to predict target objects from the fused enhanced feature data through the dual decoupling heads and output target detection results.

[0059] For a detailed description of the target detection device, please refer to the description of the target detection method above, which will not be repeated here.

[0060] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a target detection method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0061] Those skilled in the art will understand that Figure 10 The structures shown are merely block diagrams of some structures related to the solutions disclosed in this specification, and do not constitute a limitation on the computer device to which the solutions disclosed in this specification are applied. Specifically, the computer device may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0062] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method steps described above.

[0063] This specification provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0064] One embodiment of this specification provides a computer program product including instructions that, when executed by a processor of a computer device, enable the computer device to perform the steps of the method described in any of the above embodiments.

[0065] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

Claims

1. A target detection method, characterized in that, Applied to an object detection model, the object detection model including a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head, the method includes: The feature extraction network is used to extract features from the target scene image to obtain initial feature data; The initial feature data is optimized by dual channel and spatial attention and progressively fused using the adaptive spatial fusion network to obtain fused and enhanced feature data. The dual decoupling heads are used to predict target objects from the fused and enhanced feature data, and the target detection results are output.

2. The method according to claim 1, characterized in that, The adaptive spatial fusion network includes a convolutional attention module and an adaptive feature pyramid network. The initial feature data is optimized and progressively fused using both channel and spatial attention through the adaptive spatial fusion network to obtain fused and enhanced feature data, including: The initial feature data is sequentially optimized by channel attention and spatial attention through the convolutional attention module to obtain enhanced feature data. The enhanced feature data is progressively fused using the adaptive feature pyramid network, integrating features from different levels in the enhanced feature data to obtain fused enhanced feature data.

3. The method according to claim 2, characterized in that, The method further includes: reconstructing the benchmark model to obtain the target detection model; the reconstructing of the benchmark model to obtain the target detection model includes: The multi-scale feature fusion module in the neck network of the baseline model is replaced with the adaptive feature pyramid network, and a convolutional attention module is added between the feature extraction network and the adaptive feature pyramid network.

4. The method according to claim 2, characterized in that, The convolutional attention module includes a channel attention submodule and a spatial attention submodule. The initial feature data is sequentially optimized using channel attention and spatial attention through the convolutional attention module to obtain enhanced feature data, including: The initial feature data is modeled in terms of channel dimension by the channel attention submodule to generate channel attention weights. The channel attention weights are then weighted with the initial feature data in terms of channel dimension to obtain channel-enhanced feature data. The spatial attention submodule performs attention modeling on the channel enhancement feature data in the spatial dimension to generate spatial attention weights. The spatial attention weights are then weighted with the channel enhancement feature data in the spatial dimension to obtain the enhancement feature data.

5. The method according to claim 2, characterized in that, The enhanced feature data includes enhanced feature data at different scales, including low-level enhanced feature data, second-lowest-level enhanced feature data, and high-level enhanced feature data. The enhanced feature data is progressively fused using the adaptive feature pyramid network to obtain fused enhanced feature data, including: The low-level enhanced feature data and the second-lowest-level enhanced feature data are input into the adaptive feature pyramid network, and then the high-level enhanced feature data are introduced for fusion to generate fused enhanced feature data.

6. The method according to claim 1, characterized in that, The feature extraction network consists of a slicing / focusing module, a convolution-batch normalization-activation function module, a cross-stage partial connection network, and a spatial pyramid pooling module; and / or The target scene image includes an office area image, and the target detection result includes the detection result of chairs in the office area.

7. The method according to claim 6, characterized in that, The convolution-batch normalization-activation function module consists of convolutional layers, batch normalization layers, and Silu activation functions.

8. A target detection device, characterized in that, Applied to an object detection model, the object detection model including a feature extraction network, an adaptive spatial fusion network, and a dual decoupling head, the device includes: The feature extraction module is used to extract features from the target scene image through the feature extraction network to obtain initial feature data; An adaptive spatial fusion module is used to perform channel and spatial dual attention optimization and progressive fusion processing on the initial feature data through the adaptive spatial fusion network to obtain fused and enhanced feature data; The target object prediction module is used to predict target objects from the fused enhanced feature data through the dual decoupling heads and output target detection results.

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

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.