A deep learning-based target detection method for unbalanced image data

By introducing the CSP-MFEA and DYT-PSA modules into the YOLO model, the problems of detection accuracy and robustness of the object detection model under imbalanced data are solved, and more efficient object detection results are achieved.

CN122135090APending Publication Date: 2026-06-02SHENYANG LIGONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENYANG LIGONG UNIV
Filing Date
2026-02-12
Publication Date
2026-06-02

Smart Images

  • Figure CN122135090A_ABST
    Figure CN122135090A_ABST
Patent Text Reader

Abstract

This invention provides a deep learning-based target detection method for imbalanced image data, relating to the fields of image processing and target detection technology. First, the dataset is augmented by transferring various meteorological styles to minority class samples, expanding the number of minority class samples in the training set to assist the subsequent detection model and mitigate the adverse effects of class imbalance on target detection. Second, a progressive multi-scale feature enhancement module (CSP-MFEA) is designed, which enhances the feature representation ability of difficult samples through a stepped convolutional kernel and a feature splitting and reuse mechanism. A dynamic Tanh polarization self-attention module (DYT-PSA) is designed, introducing a learnable Tanh activation function to suppress easy samples and enhance difficult samples, optimizing the gradient propagation process. Finally, a YOLO-MFEA-DYT detection model is constructed to improve the accuracy, robustness, and generalization ability of the detection model under imbalanced data distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of image processing and object detection technology, and in particular to a deep learning-based object detection method for imbalanced image data. Background Technology

[0002] Object detection, a core research area in computer vision (CV), aims to accurately identify and locate specific categories of object instances from images or videos. With the rapid development of deep learning technology, especially the continuous innovation of detection frameworks based on convolutional neural networks (CNNs) and Transformers, object detection has achieved significant breakthroughs in accuracy and efficiency. Its applications have deeply penetrated into key areas concerning national welfare and people's livelihoods, such as autonomous driving, intelligent security, industrial quality inspection, and medical image analysis.

[0003] However, models that perform exceptionally well on ideal datasets often experience a significant performance degradation when deployed to real-world scenarios. A fundamental reason for this is that data distribution in the real world is rarely uniform and balanced. Imbalance in training data has become a major constraint on the actual performance of object detection models. This imbalance manifests primarily in two ways: class imbalance and difficulty imbalance. The former refers to a significant difference in the number of instances of different classes in the dataset; the latter refers to the substantial difference in the number of easily classified background samples and foreground objects that are difficult to detect correctly during training.

[0004] Imbalanced class distribution is extremely common in the real world. For example, in autonomous driving scenarios, the amount of data on common vehicles and pedestrians can be enormous, while samples of categories such as road construction signs and special-purpose vehicles are relatively scarce. In industrial quality inspection, the number of images of the majority class of qualified products far exceeds the number of images of the minority class of defective products. This uneven distribution leads to the model training process being dominated by majority class samples, causing it to overlearn the feature patterns of the majority class while underlearning the discriminative features of the minority class. The direct consequence is that the model is highly prone to missing detections or misclassifying rare class targets. Taking autonomous driving as an example, misclassifying a rare warning triangle as an ordinary cardboard box, or missing an animal crossing the road, can have serious consequences. This not only severely weakens the reliability of the detection system but also poses a huge hidden danger in the field of safety.

[0005] The imbalance between easy and difficult samples is also a significant issue. In object detection tasks, a large number of image regions belong to simple backgrounds such as the sky, road surface, and vegetation, while the actual targets to be detected only constitute a small portion of the image. During training with random sampling, the sheer number of simple background samples overwhelmingly dominates, and their gradient signals drown out the gradients provided by the few but crucial foreground difficult samples. This causes the model's optimization to focus on learning how to more accurately identify background as background, rather than adequately learning how to distinguish and locate the target instances that need to be detected. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a deep learning-based target detection method for imbalanced image data, thereby improving the detection accuracy, robustness, and generalization ability of target detection models under imbalanced data distribution.

[0007] On the one hand, this invention provides a deep learning-based target detection method for imbalanced image data, comprising the following steps:

[0008] Step 1: Obtain the image dataset and use the publicly available SaMam model to augment the image dataset;

[0009] The image data includes content images containing the target detection object, as well as style images of various target detection object backgrounds;

[0010] Step 2: Design the Progressive Multi-Scale Feature Augmentation Module CSP-MFEA and the Dynamic Tanh Polarization Self-Attention Module DYT-PSA

[0011] Step 2.1: Design the Progressive Multi-Scale Feature Enhancement Module (CSP-MFEA);

[0012] The progressive multi-scale feature enhancement module CSP-MFEA works as follows: For the feature maps of difficult-to-detect foreground samples in the target detection task, the input features are first pre-encoded using a 3×3 standard convolution to obtain image F1. Then, F1 is split into images F1a and F1b with a 1:1 channel ratio. F1a is then subjected to a 5×5 grouped convolution to obtain image F2. Image F2 is also split into images F2a and F2b with a 1:1 channel ratio. Image F2a is then subjected to a 7×7 grouped convolution to obtain image F3. After that, images F3, F2b, and F1b are concatenated to obtain the fused features. The fused features are then subjected to a 1×1 convolution and residually connected to the original input features.

[0013] Step 2.2: Design the Dynamic Tanh Polarization Self-Attention Module DYT-PSA;

[0014] The dynamic Tanh polarization self-attention module DYT-PSA is specifically obtained by replacing PSABlock in the existing original C2PSA module with the PSABlock-DYT module.

[0015] The PSABlock-DYT module specifically involves inserting DynamicTanh layers before the attention layer and the feedforward network, respectively, to form the attention path and the feedforward path. In the attention path, the original input features undergo a nonlinear transformation using the Tanh activation function to obtain attention path preprocessed features. These preprocessed features are then fed into the polarization self-attention module in the original C2Psa module to obtain the attention mechanism output features. The initialization parameters determine whether to use residual connections; if so, the attention mechanism output is added to the original input features as the output, which is then fed into the feedforward path. Otherwise, the attention mechanism output is used directly as the output. In the feedforward path, a nonlinear transformation using the Tanh activation function yields feedforward path preprocessed features. These preprocessed features are then fed into the feedforward network in the original C2Psa module to obtain feedforward network output features. The initialization parameters determine whether to use residual connections; if so, the feedforward network output features are added to the attention path output. Otherwise, the feedforward network output features are used directly as the output features.

[0016] Step 3: Based on the existing YOLOv11 model, design and construct the YOLO-MFEA-DYT detection model;

[0017] Specifically, the C3k2 module in the existing YOLOv11 model is replaced with the progressive multi-scale feature enhancement module CSP-MFEA, and the C2PSA module is replaced with the dynamic Tanh polarization self-attention module DYT-PSA, thereby constructing the YOLO-MFEA-DYT detection model.

[0018] Step 4: Train the constructed YOLO-MFEA-DYT model on the enhanced Heavy Vehicles dataset;

[0019] On the other hand, this application proposes a computer-readable storage medium storing executable instructions that, when executed, cause a processor to perform the aforementioned deep learning-based target detection method for imbalanced image data.

[0020] Thirdly, this application proposes a computer program product, including a computer program or instructions that, when executed by a processor, implement the aforementioned deep learning-based target detection method for imbalanced image data.

[0021] The beneficial effects of adopting the above technical solution are as follows:

[0022] This invention provides a deep learning-based target detection method for imbalanced image data, which effectively overcomes the problems of low detection accuracy, robustness and generalization ability of existing target detection models under imbalanced data distribution while keeping the model lightweight. Attached Figure Description

[0023] Figure 1 The image processed by the SaMam model provided in a specific embodiment of the present invention;

[0024] Among them, (a) - Scene 1, processed images for snowy, cloudy, and dusty days respectively; (b) - Scene 2, processed images for snowy, cloudy, and dusty days respectively; (c) - Scene 3, processed images for snowy, cloudy, and dusty days respectively.

[0025] Figure 2 CSP-MFEA structural diagram provided for specific embodiments of the present invention;

[0026] Figure 3 The PSABlock-DYT and DYT-PSA structural diagrams provided for specific embodiments of the present invention;

[0027] Among them, (a) is the structure diagram of PSABlock-DYT, and (b) is the structure diagram of DYT-PSA.

[0028] Figure 4 Heatmaps of the YOLO-MFEA-DYT model in different scenarios provided for specific embodiments of the present invention;

[0029] Among them, (a) - Heatmap of Scene 1, (b) - Heatmap of Scene 2, (c) - Heatmap of Scene 3, and (d) - Heatmap of Scene 4;

[0030] Figure 5 The actual detection results of the YOLO-MFEA-DYT model in different scenarios provided in specific embodiments of the present invention;

[0031] Among them, (a) - actual detection effect diagram of scenario 1, (b) - actual detection effect diagram of scenario 2, and (c) - actual detection effect diagram of scenario 3. Detailed Implementation

[0032] The specific implementation methods of this application will be further described in detail below with reference to the accompanying drawings and embodiments.

[0033] Example 1:

[0034] On the one hand, this invention provides a deep learning-based target detection method for imbalanced image data, comprising the following steps:

[0035] Step 1: Obtain the image dataset and use the publicly available SaMam model to augment the image dataset;

[0036] The image data includes content images containing the target detection object, as well as style images of various target detection object backgrounds;

[0037] The SaMam model is a style-aware state-space model for style transfer of arbitrary images. It generates images of target objects with different backgrounds, thereby effectively expanding the training dataset, alleviating the class imbalance problem, and improving the generalization ability and robustness of the target detection model under complex weather conditions.

[0038] In this embodiment, images of a few categories of engineering vehicles from the Heavy Vehicles private dataset are used as content images, and images of various meteorological conditions such as snow, clouds, and dust storms are used as style images.

[0039] The image processed by the SaMam model is as follows Figure 1 As shown in the figure, (a), (b), and (c) are the processed images of Scene 1, Scene 2, and Scene 3 under snowy, cloudy, and dusty weather conditions, respectively. The images in the first row are the minority class objects of the three different scenes listed in the original training set. Scene 1 is a construction site clearing debris, with a Loader in operation; Scene 2 is a mountain operation site, with a Mobile Crane parked on a mountain road; Scene 3 is a mining operation site, with a Dumb Truck and a Loader operating in the mining area. After enhancement, new image data corresponding to the weather styles of the three scene images are generated. The processed images are added only to the training set of the dataset to expand the dataset.

[0040] Step 2: Design the Progressive Multi-Scale Feature Augmentation Module CSP-MFEA and the Dynamic Tanh Polarization Self-Attention Module DYT-PSA

[0041] Step 2.1: Design the Progressive Multi-Scale Feature Enhancement Module (CSP-MFEA);

[0042] The progressive multi-scale feature enhancement module CSP-MFEA works as follows: For the foreground hard sample feature maps to be detected in the object detection task, the input features are first pre-encoded using a 3×3 standard convolution to obtain image F1. Then, F1 is split into images F1a and F1b with a 1:1 channel ratio. F1a is then subjected to a 5×5 grouped convolution to obtain image F2. Image F2 is also split into images F2a and F2b with a 1:1 channel ratio. Image F2a is then subjected to a 7×7 grouped convolution to obtain image F3. Finally, images F3, F2b, and F1b are concatenated to obtain the fused feature. The fused feature is then subjected to a 1×1 convolution and residually connected to the original input features. This improves the feature representation ability while controlling the computational complexity, effectively alleviating the problem of hard sample features being diluted in deep networks, and enhancing the model's ability to extract features from hard samples.

[0043] The CSP-MFEA structure diagram in this embodiment is as follows: Figure 2 As shown. This module is based on the CSP (Cross Stage Partial) architecture. Through a holistic framework of splitting, parallel enhancement, and fusion, combined with multi-scale feature extraction, progressive feature reuse, and lightweight design, it specifically enhances the feature representation capabilities of difficult samples. The specific mechanism is as follows:

[0044] (1) Progressive multi-scale feature extraction mechanism:

[0045] The CSP-PMSFA module employs a stepped convolutional kernel amplification and feature flow splitting strategy to achieve progressive multi-scale feature extraction. This design is particularly suited to the feature representation needs of difficult foreground samples.

[0046] The first layer extracts features and captures local details. The complete feature map output by the first layer, F1, uses a 3×3 standard convolution to initially encode the input features. Here, X is the input feature map with dimensions B×C×H×W. This layer uses a small 3×3 convolution kernel, specifically designed to capture fine local features of difficult samples. For small-sized difficult samples, their visual features are often weak, and large convolution kernels can easily introduce too much background noise. However, the 3×3 convolution kernel can effectively extract key features while maintaining localization accuracy.

[0047] The second layer extracts features and models the context at a medium scale. F2 is the complete feature map output from the second layer. 1a The first 50% of the channels of the first layer feature map are used for further deep processing, F 1b The last 50% of the feature maps from the first layer are directly retained for final fusion. F1 is divided into F1 and F2 channels along the channel dimension. 1a and F 1b F 1a Moving to the next stage of processing, focusing on learning medium-scale features, F 1bDirect preservation ensures that local details are not lost. 5×5 grouped convolution expands the receptive field from 3 to 7, specifically capturing the relationships between target parts and local contextual information. For partially occluded targets, it can infer the complete shape from the surrounding context.

[0048] The third layer extracts features and performs large-scale global perception. F3 is the complete feature map output by the third layer. 2a The first 50% of the channels of the second layer feature map are used for maximum scale processing, F 2b The last 50% of the feature maps in the second layer retain medium-scale features, improving computational efficiency. A large 7×7 convolutional kernel expands the receptive field to 13, specifically handling complex background interference and spatial layout relationships. For low-contrast targets, it can utilize a large range of context for enhancement.

[0049] (2) Hierarchical feature reuse and residual enhancement mechanism:

[0050] To prevent the weak features of difficult samples from being diluted during deep processing, the module design employs a feature splitting strategy, dividing channels at a fixed ratio in each processing stage. The splitting ratio is 0.5, meaning that before each convolutional processing stage, the input features are split into channels at a 1:1 ratio, with only 50% of the features being sent to the next convolutional layer, while the remaining 50% are directly retained and passed to the final fusion stage.

[0051] The residual augmentation design ultimately optimizes features through 1×1 convolutions and residual connections, with the module's final output feature map F. out This design enhances gradient flow through residual connections, effectively mitigating the gradient vanishing problem in deep networks. Simultaneously, it preserves the fundamental features of potentially difficult samples from the original input, directly transmitting shallow detail information to the output, further improving the robustness of feature representation. The core of this mechanism lies in its systematic feature preservation and fusion strategy, ensuring that weak feature signals from difficult samples are maintained and enhanced in deep networks, thereby effectively mitigating the feature dilution problem caused by increased network depth.

[0052] (3) Lightweight design mechanism:

[0053] The module employs a grouped convolution design in 5×5 and 7×7 convolutions, with the number of groups set to 1 / 2 and 1 / 4 of the number of input channels, respectively. Compared to standard convolutions of the same size, this design reduces the number of model parameters and computational complexity, reduces redundant feature learning for a large number of simple background samples, and allows the network to focus more on extracting specific features from difficult samples.

[0054] In summary, the CSP-MFEA module effectively enhances the feature representation capability of difficult samples through the synergy of feature reuse and lightweight design, alleviates the problem of insufficient model learning for difficult samples caused by the imbalance between easy and difficult samples, and provides more discriminative feature input for subsequent detection heads.

[0055] Step 2.2: Design the Dynamic Tanh Polarization Self-Attention Module DYT-PSA;

[0056] The dynamic Tanh polarization self-attention module DYT-PSA is specifically obtained by replacing PSABlock in the existing original C2PSA module with the PSABlock-DYT module.

[0057] The PSABlock-DYT module specifically involves inserting DynamicTanh layers before the attention layer and the feedforward network, respectively, to form the attention path and the feedforward path. In the attention path, the original input features undergo a nonlinear transformation using the Tanh activation function to obtain attention path preprocessed features. These preprocessed features are then fed into the polarization self-attention module in the original C2Psa module to obtain the attention mechanism output features. The initialization parameters determine whether to use residual connections; if so, the attention mechanism output is added to the original input features as the output, which is then fed into the feedforward path. Otherwise, the attention mechanism output is used directly as the output. In the feedforward path, a nonlinear transformation using the Tanh activation function yields feedforward path preprocessed features. These preprocessed features are then fed into the feedforward network in the original C2Psa module to obtain feedforward network output features. The initialization parameters determine whether to use residual connections; if so, the feedforward network output features are added to the attention path output. Otherwise, the feedforward network output features are used directly as the output features. By adaptively adjusting the feature response through learnable parameters, the model suppresses overactivation of simple samples, enhances the weak feature representation of difficult samples, and reshapes the gradient flow distribution, enabling the model to focus more on optimizing difficult samples during training and significantly improving the detection capability of foreground targets.

[0058] In this embodiment, the structure diagrams of PSABlock-DYT and DYT-PSA are as follows: Figure 3 As shown, the improvement of the DYT-PSA module lies in its dynamic adaptive mechanism, which introduces a dynamically learnable Tanh activation function to replace the original fixed activation function. This design ensures that features are dynamically calibrated before entering each core computational unit, forming a multi-level adaptive adjustment system. This design enables the network to adaptively adjust the feature response according to the characteristics of the samples, and its improvement mechanism is mainly reflected in the following three aspects.

[0059] (1) Simple sample suppression mechanism: Traditional activation functions such as ReLU respond indiscriminately to positive inputs, resulting in strong activation of a large number of background features. These redundant features propagate in subsequent networks, which not only wastes model capacity but also exacerbates the dominance of simple samples in the training process.

[0060] DynamicTanh effectively suppresses overactivation in simple samples by leveraging the saturation properties of the hyperbolic tangent function tanh(•). Specifically, its output range is constrained within a bounded interval of (-1 + min(B), 1 + max(B)), preventing the output from growing indefinitely even with extremely large input values. More importantly, through learnable α parameters and channel-level parameters W and B, the network can adaptively adjust the response characteristics of different feature channels. For low-level feature channels that primarily respond to background texture, the network can learn smaller α values ​​or W weights, thereby limiting the activation intensity of background features to a lower level.

[0061] (2) Difficult sample enhancement mechanism: The feature response of difficult foreground samples is usually weak. After being processed by the standard activation function, it becomes smaller and the corresponding gradient signal is also smaller, making it difficult to effectively optimize these key samples.

[0062] DYT-PSA enhances the feature representation of difficult samples through a dynamic scaling mechanism. The network can learn larger α values ​​for feature channels sensitive to difficult targets, ensuring that the transformed feature α•X falls near the linear region where the gradient of the tanh function is maximized. This mechanism enhances the expressive power of weak feature signals while providing stronger gradient signals.

[0063] (3) Gradient flow balancing mechanism: Imbalance in the gradient optimization process is the core challenge of the foreground-background sample imbalance problem. DYT-PSA solves this optimization problem by reshaping the gradient flow distribution.

[0064] For simple background samples, the large input feature values ​​cause them to enter the saturation region after the tanh transform, and the derivative of the gradient tanh function with respect to the input is approximately zero. Therefore, despite the large number of simple samples, their effective gradient contribution during backpropagation is minimal. Conversely, the amplified input feature values ​​of difficult foreground samples lie in the linear region of the tanh function, resulting in larger gradient values ​​that allow each difficult sample to generate a strong and effective gradient signal.

[0065] Step 3: Based on the existing YOLOv11 model, design and construct the YOLO-MFEA-DYT detection model;

[0066] Specifically, the C3k2 module in the existing YOLOv11 model is replaced with the progressive multi-scale feature enhancement module CSP-MFEA, and the C2PSA module is replaced with the dynamic Tanh polarization self-attention module DYT-PSA, thereby constructing the YOLO-MFEA-DYT detection model.

[0067] Step 4: Train the constructed YOLO-MFEA-DYT model on the enhanced Heavy Vehicles dataset;

[0068] Specifically, the CSP-MFEA module enhances the model's feature extraction, while the DYT-PSA module enables the model to focus on difficult samples that are crucial for performance improvement. The enhanced dataset also expands the minority class samples. The final training data shows that the YOLO-MFEA-DYT model achieves superior performance in object detection metrics and demonstrates better performance compared to mainstream object detection models.

[0069] Example 2:

[0070] To demonstrate the effectiveness of the YOLO-MFEA-DYT model in addressing the imbalance between easy and difficult samples, ablation experiments were conducted on the expanded Heavy Vehicles dataset. The experimental results are shown in Table 1.

[0071] Table 1. Improved ablation experiments using the detection model:

[0072] Wherein, baseline represents the basic YOLOv11n model, and A, B, and C represent replacing the CSP-MFEA feature extraction module and the DYT-PSA attention mechanism module separately on the baseline model, and replacing both improved modules simultaneously. The experimental results show that both improvement methods have a positive effect on improving model performance. Model A, compared to the baseline model, shows a slightly greater improvement in P, R, mAP@0.5, and mAP@0.5-0.95 than Model B. However, Model A also has a higher number of parameters than both the baseline and Model B. Although grouped convolutions were used in the CSP-MFEA feature extraction module to lightweight the model, the addition of multiple convolutional layers of different scales in the improved module compared to the baseline model's feature extraction module led to an increase in the number of parameters. Model B, compared to the baseline model, had the same number of parameters but improved all metrics. The dynamic adaptive mechanism in the improved attention module is effective in addressing the imbalance between easy and difficult samples. Furthermore, the final improved model C, applying all the improved modules, achieves improvements in P, R, mAP@0.5, and mAP@0.5-0.95 by 2.6%, 3.8%, 3.1%, and 3.5% respectively compared to the baseline model YOLOv11n, despite a 4% increase in parameters, reaching the optimal overall performance. This demonstrates that the improved method proposed in this invention is effective in handling the imbalance between easy and difficult samples.

[0073] The heatmap of the YOLO-MFEA-DYT model is as follows: Figure 4 As shown. (a), (b), (c), and (d) are heatmaps for scenarios 1, 2, 3, and 4, respectively. In scenario 1, the original image shows an excavator and dump truck working on earthmoving. The improved model's heatmap shows that the highlighted areas completely and accurately cover the main bodies of the excavator and dump truck, demonstrating efficient target perception. In scenario 2, the original image shows a dusty scene with an excavator loading gravel. The improved model's highlighted areas (red and yellow) completely cover the core structures of the excavator, such as the body and robotic arm, accurately matching the actual contours of the target. The background area covered by dust is predominantly blue-purple with low attention and no redundant highlighting activation. In scenario 3, the original image shows a bulldozer working with personnel present. Only the excavator's robotic arm is visible on the right side of the image. For this local structure of the robotic arm, the improved model's highlighted areas strictly match the actual contours of the right robotic arm with no redundant activation. In scenario 4, the original image shows an excavator and dump truck working on earthmoving. The improved model's heatmap clearly distinguishes and completely covers both targets. In summary, the improved model YOLO-MFEA-DYT... The heatmap is significantly superior in terms of target area focus, background interference suppression, and multi-target perception.

[0074] The actual detection performance of the YOLO-MFEA-DYT model is as follows: Figure 5 As shown, (a), (b), and (c) are the actual detection results for scenarios one, two, and three, respectively. Scenario one is an earthmoving loading operation site, where a loader is loading materials into a dump truck's cargo bed. The surrounding terrain is earthen slopes, and two other dump trucks are parked some distance away. Scenario two is an engineering construction site, where a dump truck is parked beside a ditch, and multiple excavators and a grader are working in the surrounding area some distance away, with sparse vegetation in the background. Scenario three is a large-scale earthmoving operation area in a mine, where excavators are digging, and dump trucks are waiting to be loaded with materials, representing a heavy engineering equipment excavation and transportation operation scenario. The improved model's detection results are correct, indicating that the improved detection model has advantages in handling the imbalance between easy and difficult samples.

[0075] Example 2:

[0076] This embodiment proposes a computer-readable storage medium that stores executable instructions. When these instructions are executed, if they are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.

[0077] The computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of a deep learning-based object detection method for imbalanced image data as described in various embodiments of this application.

[0078] The aforementioned storage media include: flash memory, hard disk, multimedia card, card-type memory (e.g., SD (Secure Digital Memory Card) or DX (Memory Data Register, MDR) memory, random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic storage, disk, optical disk, server, APP (Application) application store, and other media capable of storing program verification codes. These media store computer programs, which, when executed by a processor, can implement the various steps of the aforementioned deep learning-based target detection method for imbalanced image data.

[0079] Example 3:

[0080] This embodiment proposes a computer program product, including a computer program or instructions, which, when executed by a processor, implements the aforementioned deep learning-based target detection method for imbalanced image data.

[0081] Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a computer program product.

[0082] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0083] The scope of protection of this application is not limited to the embodiments described above. Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from the scope and spirit of this disclosure. If such modifications and variations fall within the scope of the methods disclosed herein and their equivalents, then the intent of this disclosure also includes such modifications and variations.

Claims

1. A deep learning-based target detection method for imbalanced image data, characterized in that, Includes the following steps: Step 1: Obtain the image dataset and use the publicly available SaMam model to augment the image dataset; Step 2: Design the Progressive Multi-Scale Feature Augmentation Module CSP-MFEA and the Dynamic Tanh Polarization Self-Attention Module DYT-PSA Step 3: Based on the existing YOLOv11 model, design and construct the YOLO-MFEA-DYT detection model; Step 4: Use the constructed YOLO-MFEA-DYT model to train on the enhanced Heavy Vehicles dataset to achieve object detection for imbalanced image data.

2. The target detection method for imbalanced image data based on deep learning according to claim 1, characterized in that, The image data in step 1 includes content images containing the target detection object, as well as style images of various target detection object backgrounds.

3. The target detection method for imbalanced image data based on deep learning according to claim 1, characterized in that, Step 2 includes the following steps: Step 2.1: Design the Progressive Multi-Scale Feature Enhancement Module (CSP-MFEA); Step 2.2: Design the Dynamic Tanh Polarization Self-Attention Module DYT-PSA.

4. The target detection method for imbalanced image data based on deep learning according to claim 3, characterized in that, The progressive multi-scale feature enhancement module CSP-MFEA works as follows: For the feature maps of difficult-to-detect foreground samples in the target detection task, the input features are first pre-encoded using a 3×3 standard convolution to obtain image F1. Then, F1 is split into images F1a and F1b with a 1:1 channel ratio. F1a is then subjected to a 5×5 grouped convolution to obtain image F2. Image F2 is also split into images F2a and F2b with a 1:1 channel ratio. Image F2a is then subjected to a 7×7 grouped convolution to obtain image F3. After that, images F3, F2b, and F1b are concatenated to obtain the fused features. The fused features are then subjected to a 1×1 convolution and residually connected to the original input features.

5. The target detection method for imbalanced image data based on deep learning according to claim 3, characterized in that, The dynamic Tanh polarization self-attention module DYT-PSA is specifically obtained by replacing PSABlock in the existing original C2PSA module with the PSABlock-DYT module. Specifically, the PSABlock-DYT module inserts DynamicTanh layers before the attention layer and before the feedforward network, respectively, to form the attention path and the feedforward path. In the attention path, the original input features are non-linearly transformed by the Tanh activation function to obtain the attention path preprocessed features. The attention path preprocessed features are fed into the polarization self-attention module in the original C2Psa module to obtain the attention mechanism output features; The initialization parameters determine whether to use residual connections. If used, the output of the attention mechanism is added to the original input features as the output and fed to the feedforward path. Otherwise, the output of the attention mechanism is used directly as the output. In the feedforward path, a nonlinear transformation is performed through the Tanh activation function to obtain the feedforward path preprocessed features. The preprocessed features of the feedforward path are fed into the feedforward network in the original C2Psa module to obtain the output features of the feedforward network. The initialization parameters determine whether to use residual connections. If used, the output features of the feedforward network are added to the output of the attention path. Otherwise, the output features of the feedforward network are used directly as the output features.

6. The target detection method for imbalanced image data based on deep learning according to claim 5, characterized in that, Step 3 specifically involves replacing the C3k2 module in the existing YOLOv11 model with the progressive multi-scale feature enhancement module CSP-MFEA, and replacing the C2PSA module with the dynamic Tanh polarization self-attention module DYT-PSA, thereby constructing the YOLO-MFEA-DYT detection model.

7. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed, cause the processor to perform the deep learning-based target detection method for imbalanced image data as described in claims 1-6.

8. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the deep learning-based target detection method for imbalanced image data as described in claims 1-6.