SENet-based improved YOLOv8 small target detection method

By introducing semantic dilution loss and SENet modules and optimizing the YOLOv8 network structure, the problems of unstable channel response and poor scale consistency in small target detection are solved, and the accuracy and stability of small target detection are improved, making it suitable for real-time detection in complex scenarios.

CN120783028AActive Publication Date: 2025-10-14HEBEI UNIV OF ENG

Patent Information

Application Number
CN202510923981.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-14
Estimated Expiration
2045-07-04

AI Technical Summary

Technical Problem

The existing YOLOv8 small target detection method has problems such as unstable channel response, poor scale consistency, inaccurate multi-scale fusion, and severe background interference when detecting small targets, resulting in insufficient detection accuracy and limited model generalization ability.

Method used

Semantic dilution loss and SENet module are introduced to suppress background redundancy, construct channel response consistency measurement and gradient guidance mechanism, optimize Neck feature pyramid, and design channel gating mechanism to achieve fine control and stable response of small target features.

Benefits of technology

It improves the accuracy and stability of small target detection, is suitable for real-time detection in complex scenarios, and enhances the model's adaptability and detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention relates to an improved YOLOv8 small target detection method based on SENet, and the method comprises the steps: introducing semantic dilution loss, and measuring the dilution degree of small target features in a channel; a suppression reverse weight is generated through an SENet structure, and background redundancy is suppressed while a high response area is reserved; a C2f structure of YOLOv8 is fused, and decoupling characteristics are transmitted in cross-layer connection; in the Neck feature pyramid, a SENet response migration relation is constructed; calculating a weight deviation value, and judging whether the small target response has spatial deviation or not; position balance loss is introduced, and feature repositioning is carried out on a small target area with overlarge center-of-gravity drift; designing a channel response consistency measurement index, and measuring the SE response consistency of the small target between different epochs; sENet channel output is extracted from the image, and the variance of target area channel response distribution is counted; a channel with high variability is weakened or suppressed from a current image detection path, a detection head is introduced into a channel gating mechanism, a stable channel is adaptively selected to participate in prediction, and the small target feature representation capability is significantly enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a small target detection method, specifically a small target detection method based on SENet improved YOLOv8. Background Art

[0002] Regarding small target detection methods, in the existing Chinese patent CN118552716A, a small target detection method based on an improved YOLOv8, the proposed technical solution introduces ATDeNet to replace the original Backbone structure of YOLOv8, constructing a deep neural network model that is more suitable for small target detection. This method improves the detection performance of small targets based on the requirements of small target detection accuracy and training efficiency, and constructs a complete data processing and model training pipeline through a standardized training process. To a certain extent, it solves the problem of insufficient detection accuracy of traditional YOLOv8 in the face of low resolution, small target size, dense distribution, etc. However, such methods currently still have a number of key deficiencies and technical blind spots in the perception and control of small target channel response stability, scale consistency, and multi-scale fusion response. First, although this solution replaces the Backbone of YOLOv8 with ATDeNet, which improves the feature extraction and expression capabilities, it does not fundamentally introduce a fine-grained channel-level response control mechanism. Its feature flow still obtains contextual information based on convolution stacking and dilated convolution, and lacks a strategy to focus on the local response of small targets. Since small targets are extremely small in the image, their key information is easily submerged or ignored in high-level semantic abstraction. Therefore, there is a lack of a mechanism to screen and dynamically adjust important channels in the early stage of feature extraction. It cannot effectively suppress the interference of background high-response channels on small target feature channels, and fails to consider the impact of inter-channel response fluctuations on the stability of small target recognition.

[0003] Secondly, the training method adopted by this scheme still uses the traditional data division and whole-image training method, and does not introduce modeling of cross-scale response behavior in the small target detection process. Currently, in the YOLOv8 structure, small targets are prone to response drift during the scale compression process in the Neck module, that is, the response center position, activation channel and directionality of the same target in feature maps of different scales are inconsistent, which in turn causes positioning errors and response direction disorder in the fusion process. The existing technology does not provide a corresponding inter-scale response migration tracking mechanism, nor does it propose a feature consistency alignment method between scales. As a result, its model is difficult to effectively eliminate the semantic incoherence caused by scale switching during feature fusion, especially in dense small target scenarios, it is more likely to have target misjudgment, overlapping detection or positioning deviation. Thirdly, although the invention replaces the backbone network structure to improve the overall extraction capability, it still fails to solve the problem of unstable responses of small targets during the training process. In particular, during multiple rounds of training, some small targets may have frequent fluctuations in channel responses and confused attention shifts due to data occlusion, uneven distribution or sample noise. In traditional training strategies, this phenomenon will be mistakenly regarded as a low-confidence sample by the model and weakened, ultimately leading to missed detection or low-precision recognition. However, this technology does not propose targeted solutions, such as channel response consistency analysis, dynamic labeling of unstable targets, introduction of gradient control repair mechanism, etc. It lacks the ability to model the response trajectory of small targets across training rounds and cannot adjust subsequent training paths according to historical channel response behavior.

[0004] In addition, from the perspective of detection head structure and output control, this solution still mainly adopts the Anchor-Free detection head structure of YOLOv8. Its core prediction branch does not introduce a response gating mechanism, nor does it dynamically adjust the channel participation according to the personalized features of the target in the image. Therefore, a unified feature fusion and output method is adopted for all targets in each image. There is a lack of image-level channel cropping or channel credibility adjustment strategy, resulting in low channel utilization and false detection caused by unstable channels in the detection process. When faced with large background interference, low-contrast scenes or heterogeneous feature areas, the response of small targets can easily be overwhelmed by background noise, resulting in a decrease in detection accuracy and limited model generalization ability. Summary of the Invention

[0005] The purpose of this invention is to provide a small target detection method based on SENet to improve YOLOv8, so as to solve some of the disadvantages and shortcomings pointed out in the background technology.

[0006] The present invention solves the above-mentioned technical problems by adopting the following technical solutions: improving the YOLOv8 small target detection method based on SENet, including: introducing semantic dilution loss to measure the dilution degree of small target features in the channel; for small target feature channels, generating suppression inverse weights through the SENet structure, retaining high response areas while suppressing background redundancy; and incorporating the C2f structure of YOLOv8 to transmit decoupled features in cross-layer connections; In the Neck feature pyramid, the SENet response migration relationship is constructed; the weight offset between the current scale and the upper / lower scale is calculated to determine whether the small target response has spatially shifted; the position balance loss is introduced to relocate the features of small target areas with excessive center of gravity drift; Design a channel response consistency metric to measure the consistency of SE responses of small targets across different epochs. If the response of the same target drifts dramatically, it is considered an unstable target and the response is corrected through gradient guidance. Construct a response consistency loss term to guide the network to converge to a stable small target representation path. Extract the SENet channel output for each image and count the variance of the channel response distribution in the target area; weaken or suppress channels with high variability from the current image detection path; introduce a channel gating mechanism into the detection head to adaptively select stable channels for prediction.

[0007] Furthermore, the method for calculating the weight offset value between the current scale and the upper / lower scale includes: The SENet modules are embedded in the feature maps of different scales in the Neck structure to extract the channel response weights of the feature maps of each scale; the SENet channel responses at different scales are spatially aligned by upsampling or downsampling; Compare the changes in channel response weights between adjacent scales and construct a scale-response migration relationship; determine the degree of response offset of small target areas at different scales. If the offset exceeds the set threshold, it is determined that the area has spatial drift; Compensate for small target areas with drift by performing channel enhancement or spatial refocusing.

[0008] Furthermore, the comparison of the channel response weight changes is based on statistics of the SE channel outputs of the same image area between two adjacent scales, calculating the directional change trend of its channel weight, and judging whether the small target response is displaced or attenuated based on the trend.

[0009] Furthermore, after determining the spatial drift, a regional weighting strategy is executed on the drift region, and a compensation enhancement of the channel weight of the region in the subsequent feature fusion is guided by constructing an offset map.

[0010] Furthermore, the method for response correction through gradient guidance includes the following steps: S1. For the targets in the training samples, the SENet module embedded in the YOLOv8 network structure is used to extract the channel response weight of each target in each training round; S2. Record and compare the channel responses of the same target in multiple training rounds to construct a target channel response trajectory; based on the channel response trajectory, calculate the target's channel response consistency index in the time dimension. If the response fluctuates violently, the target is determined to be unstable; S3. For targets judged to be unstable, a gradient guidance mechanism is introduced in subsequent training, including strengthening the back-propagation gradient of the response channel, penalizing the weight response of irrelevant channels, and locally adjusting the learning rate of the target.

[0011] Furthermore, the channel response consistency index is based on the change in the activation distribution trend of each channel to the target in multiple training rounds, and is used to measure whether the channel attention is continuously concentrated, and then determine whether the target representation path is stable.

[0012] Furthermore, the gradient guidance mechanism includes any one or more of the following: Assign greater gradient weights to target historically high response channels; Apply inhibitory weights to channel responses that are suddenly enhanced but unstable within a short period of time; For training samples marked as unstable targets, a high-frequency or large-step gradient update strategy is performed.

[0013] Furthermore, the method of weakening or suppressing the channel with high variability from the current image detection path includes: S1. For each input image, the SENet module embedded in the YOLOv8 network structure is used to extract the response value of each channel to the target area of ​​the image; for the target area, the response distribution characteristics of each channel are statistically analyzed to calculate the response variance or fluctuation amplitude; S2. Determine, based on the degree of variation of channel responses, channels with unstable responses or poor discrimination within the target region; generate a channel suppression mask for the high-variability channels, where the mask is a scaling factor less than 1; S3. In the feature input of the YOLOv8 detection head, the mask is injected into the corresponding channel to dynamically suppress the influence of high-variance channels on classification and regression results; Specifically, the SENet module is introduced into the YOLOv8 network structure to extract the response strength of different channels to the target area in each image. The response fluctuation characteristics of each channel in the target area are statistically analyzed to measure the stability of the channel's ability to discriminate small targets. A variation evaluation function is used to establish a mathematical mapping relationship between the response fluctuation and the channel suppression mask. The evaluation function is a type of custom nonlinear suppression function with the following form:

[0014] in: :Indicates the The suppression mask generated by the channels is in the range of ,The smaller the mask value, the more unstable the response of the channel and the higher the degree of inhibition; : Indicates the length of the response time (or space) range observed for this channel in the target area of ​​the image; : Indicates channel Position in time or space Normalized response intensity to the target area; : Indicates channel In position The degree to which the response deviates from the mean is used to reflect the local fluctuation of the response; :For channel In position The importance weight of the target area on , which measures the contribution of the area to the detection accuracy; : A positive coefficient that adjusts the degree of penalty for response variation, used to balance the sensitivity of response fluctuations; Through the above integral suppression function, the local response intensity, spatial weight distribution and response fluctuation degree are integrated to achieve a dynamic evaluation of whether each channel should be weakened; if a channel responds violently in the target area, that is, If the value is large, It will be greatly compressed, thus effectively suppressing the channel in the forward propagation of the network; If a channel responds stably and in the same direction, the corresponding mask Still close to 1, maintaining its prediction contribution; finally, in the YOLOv8 detection head, the mask Inject the corresponding channel path to scale the convolutional layer output or feature activation results.

[0015] Furthermore, the suppression mask is generated based on the channel response variance, with a numerical range of 0 to 1. The larger the variance, the smaller the mask value. The mask acts on the convolution output or activation result of the detection path.

[0016] Further, the calculation of the channel response variance is performed on the labeled target region in the image; the suppression process is a dynamic operation at the image level, and a channel mask is generated for each image.

[0017] Advantages of the present application: through the fine regulation of the channel response of the small target region by the SENet module, the enhancement of the effective information of the target and the suppression of the background redundancy are realized, and the problem that the small target features are easily submerged by large targets or complex backgrounds is solved. By constructing a multi-scale channel response offset relationship, it is accurately judged whether the response of the small target drifts with the scale compression in the feature fusion process, and through the position compensation strategy, it is more stable in spatial positioning, so as to improve the precision of the detection frame. Through the monitoring and trend modeling of the target cross-epoch channel response track, the response unstable target in the training process is effectively identified, and the gradient guiding strategy is combined to correct the attention path, so that the model learning is more stable and accurate.

[0018] According to the channel response variance of the target region, a suppression mask is automatically generated, the influence of the high fluctuation channel is dynamically weakened, the false detection caused by background noise or abnormal activation is effectively suppressed, and it is especially suitable for small target recognition in complex scenes. Each image generates a channel suppression strategy, realizes the adaptive response adjustment of the target specific features, avoids the one-size-fits-all channel fixed weighting method, and thus improves the adaptability of the model to different scenes. Under the premise of not significantly increasing the network parameters or the calculation complexity, the detection precision is improved through structure optimization and response guidance, and it is suitable for edge device deployment and real-time detection scene. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 The YOLOv8 small target detection optimization flowchart of the present application.

[0020] Figure 2 The function relationship diagram of the small target spatial consistency enhancement mechanism in the YOLOv8 Neck of the present application.

[0021] Figure 3 The function relationship diagram of the small target channel response consistency mechanism of the present application.

[0022] Figure 4 The dynamic suppression and gating flowchart based on the channel variation degree analysis of the present application.

[0023] Figure 5 The small unmanned aerial vehicle multi-scale channel response correction process of embodiment 1 of the present application.

[0024] Figure 6 The dynamic mask suppression process based on the channel response fluctuation statistics of embodiment 2 of the present application. DETAILED DESCRIPTION

[0025] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0026] In combination with the accompanying Figure 1 The small target detection method based on the improved YOLOv8 of the SENet, aiming at the problem that the small target is easily weakened in the deep network, introduces a semantic dilution loss mechanism, which is used to measure the dilution degree of the small target feature in the network channel. In the training process, the change of the channel response of the small target region is dynamically modeled. When the response of some channels to the small target region appears rapid decay or deviation in the front and rear levels, the loss function can reflect and feedback the network adjustment direction to enhance the stability and consistency of the small target semantic path. On this basis, a suppression type reverse weight generation method is further introduced based on the SENet structure, that is, instead of using the traditional simple channel enhancement mechanism in the SENet module, a reverse channel weight with suppression properties is generated according to the response characteristics of the small target. This weight can preserve high response feature regions while weakening the channel output of background redundancy or non-target regions, thereby realizing the separation of response preservation and background interference suppression of small target features, and further improving the detection accuracy of the model under the condition of small target dense or complex background. In order to realize the structural fusion and semantic transmission of the above mechanism, the suppression features output by the SENet module are embedded into the C2f structure of YOLOv8. The C2f module is a lightweight cross-layer fusion module in YOLOv8, which has the ability of feature concatenation and jump connection. Using the cross-layer path of this structure, the channel features suppressed by the SENet can be effectively transmitted and decoupled between multiple semantic layers of the backbone network, so that the small target features are not only preserved in the current layer, but also maintain their relatively complete spatial and channel expression information in the high-level semantic abstraction process. Finally, the decoupled suppression enhanced features are transmitted to the detection head stage for subsequent small target positioning and classification module, thereby constructing a YOLOv8 small target detection optimization process integrating channel suppression control, cross-layer transmission guidance and dilution loss feedback.

[0027] In combination with the accompanying Figure 2To solve the problem of spatial deviation and response ambiguity of small targets in the feature fusion stage, a cross-scale migration relationship based on SENet channel response is constructed in the Neck part of YOLOv8 network structure, that is, the feature pyramid fusion structure. This mechanism embeds SENet modules on feature maps of different scales, extracts channel response weights at each scale, and aligns and compares the channel responses of the same semantic position between high and low resolution feature maps according to the scale correspondence between feature maps. On this basis, the shift of the target region at the current scale in the channel response relative to the previous and next scales is further analyzed. By comparing the response center changes of the region at adjacent scales, it is identified whether the target has spatial deviation or response drift in the feature fusion process. The response deviation refers to the position dislocation or direction deviation of the channel activation center of the target in different scale feature maps. If the drift degree exceeds the set threshold, it is determined that the small target has unstable feature propagation in the fusion path. Therefore, a position balance loss mechanism is introduced to measure the deviation degree of the target between multi-scale channel responses and make it part of the network optimization target, so that the model actively adjusts the weight transfer direction during training, guides the feature to refocus on the original target region, and through the repositioning of the target gravity center in the deviated region, the response error in the scale transmission process is compensated, thereby enhancing the spatial consistency and semantic coherence of small targets in the Neck structure, and finally effectively improving the detection accuracy and stability of small targets in complex scenes.

[0028] The accompanying drawings are incorporated in and constitute a part of this specification. Figure 3In order to solve the learning instability phenomenon of small targets during training due to scale sensitivity, weak feature expression, unstable attention distribution and other problems, a channel response consistency measurement mechanism is proposed to measure the channel response changes generated by the SENet module in different training rounds for the same small target. By recording the SENet channel output of the target area in each epoch and analyzing the channel response trajectory of the same target in multiple consecutive epochs, a channel-level historical response vector is constructed to measure the response continuity and consistency of the target. If it is found that the channels activated by a target in different training stages have significant drift or frequent switching of distribution patterns, it is determined that the feature representation path of the target is unstable and it is marked as an unstable target. For such targets, a gradient guidance mechanism is further introduced to actively intervene in the reverse of the model during training. The propagation path guides the network to adjust towards the channel direction of the target's stable response by enhancing the gradient feedback of the target's historically high response channel, while suppressing interference channels that suddenly appear in the short term but have unconcentrated responses. If necessary, the learning rate of the target sample is locally fine-tuned to achieve response correction operations for unstable small targets. In order to achieve the end-to-end optimization effect of this mechanism, a response consistency loss term is also constructed. This loss term uses the channel response similarity of the target between different epochs as a reference standard, and participates in the overall loss function design as an auxiliary supervision signal. During the training process, the network will adjust the parameter update direction according to the degree of response consistency, thereby promoting the convergence of the small target channel response to a stable and generalizable path, ultimately improving the detection robustness of small targets in complex scenarios, reducing the impact of feature drift problems on the stability of model training, and significantly improving the small target detection accuracy and training convergence speed.

[0029] Combined with attachment Figure 4In order to solve the problem of prediction error caused by unstable response or background interference of some channels in the detection process of small targets, a dynamic suppression and channel gating mechanism based on channel variability analysis is proposed. First, in each input image, the response output of each channel to the labeled target region in the image is extracted through the SENet module embedded in the YOLOv8 backbone or Neck structure. Then, the response value of each channel in the target region is statistically distributed, and the response variance is calculated to evaluate the response stability of the channel to small targets in the current image. If the response of a channel in the target region fluctuates violently, which is characterized by dispersed response value distribution, unconcentrated direction or discontinuous region activation, the channel is determined as a high variability channel and does not have good target discrimination ability. Then, a channel suppression mask is generated for it. The mask acts on the subsequent detection path of the network, significantly reduces or devalues the weight of the channel in the YOLOv8 detection head, thereby dynamically weakening its influence on the prediction results of the current image without changing the overall structure of the network. In addition, to further enhance the channel selectivity and model adaptability in the detection stage, a channel gating mechanism is introduced into the detection head of YOLOv8. The mechanism selects or weights the channels participating in the calculation of classification and regression branches according to the variability evaluation results of each channel, adaptively retains high-quality channels with stable response, concentrated activation, consistent direction to the current target region, and eliminates or reduces the participation of high-variability channels. Thus, the detection head mainly relies on robust feature channels when predicting the position and classifying the small targets, significantly improving the detection accuracy and anti-interference ability of the model in complex background and small target dense scenes.

[0030] Example 1: In combination with the accompanying Figure 5The embodiment is applied to the small unmanned aerial vehicle recognition task in the urban traffic monitoring image. In this scene, the background is complex, the target size is small, and the target is easily confused with high-rise buildings, trees and other structures. The input image resolution is 640x640. After the Backbone processing, the image enters the Neck structure to form three scale feature maps, P3 (80x80), P4 (40x40) and P5 (20x20). The lightweight SENet module is embedded on the three scale feature maps to extract the channel response weight of each scale. It is assumed that a detected small unmanned aerial vehicle target is located at the 35th row and the 45th column in the P3 scale feature map. The SENet channel response of the target in this scale is channel C1: 0.82, C2: 0.65, C3: 0.14, etc. It reflects that the model is more dependent on C1 and C2. In the next scale P4 (40x40), the corresponding position in P3 is converted to the 17th row and the 22nd column through the down-sampling position mapping algorithm. The response value extracted by SE-Net at this position is C1: 0.48, C2: 0.31, C3: 0.17. At this time, the response of channels C1 and C2 obviously decreases and the directionality weakens compared with the previous scale. Then, the corresponding position response on the P5 scale is continuously extracted as C1: 0.15, C2: 0.10, C3: 0.20. It can be observed that the response of C1 and C2 as the core recognition channel significantly decays in the transmission process from P3 to P5, and the abnormal enhancement of C3 channel is considered as a background interference signal. The system calculates the channel response change rate between scales and constructs a scale response migration map. The C1 channel response decreases from 0.82 to 0.15, with a change rate of 81.7%, which exceeds the preset threshold of 50%. It is determined that the response drift occurs. At the same time, the center of the target also shifts in space from (35, 45) of P3 to (16, 21) of P5, and the shift amplitude exceeds the spatial stability threshold. The system activates the spatial refocusing processing of the target area according to the drift judgment mechanism, including: 1. The response enhancement operation is performed on the C1 and C2 channels of the target area on the P3 scale, and the weights are adjusted to the maximum value of 0.95. The key channels are guided to maintain the channel attention structure stable in the subsequent scales. 2. The spatial shift map is used to guide the target area to return to the center corresponding to the P3 position in P4 and P5, so as to correct the center of gravity drift caused by scale compression. Finally, the reconstructed fusion feature is transmitted to the detection head to realize the accurate detection of the small unmanned aerial vehicle. After the actual test, the target position shift pixel error decreases from the original average value of 4.6 to 1.2, the channel response stability improves by 25%, and the detection accuracy improves by an average of 7.4 percentage points.

[0031] It is known that the target is at position (35,45) in the P3 scale of the Neck structure, and the response strengths of channels C1 and C2 in the SENet module are 0.82 and 0.65 respectively, while in the corresponding positions (17,22) of the P4 scale, they are 0.48 and 0.31 respectively. We further perform a directional change trend analysis of the channel response, compare the amplitude of the change in the channel weight value, and also combine the consistency of the change direction to determine whether the channel response continues to increase, continues to decay, or undergoes a reverse mutation with the scale change. Channels C1 and C2 continue to decay between P3 and P4, and the response decay direction is consistent. Therefore, it is preliminarily judged to be a typical response decay trend. Then, a channel direction consistency measurement method is introduced. The channel response change direction is counted in sequence between the three scales of P3 to P5, and a change vector sequence is constructed. For example, C1 is [decline, decrease], C2 is [decline, decrease], and C3 is [increase, increase]. These sequences are matched with the target stable channel response template. If the matching result shows that the channel response trend does not have structural consistency, for example, some key channels appear If the direction is reversed [down, up] or [down, sharp rise], it can be determined that the target channel response has drifted or is seriously affected by the disturbance, and response correction measures need to be introduced. In the current example, the continuous downward direction of channels C1 and C2 indicates that the response is significantly attenuated, and the continuous rise of C3 indicates that it is interfered with by background factors. Based on this, the system determines C3 as an interfering rising channel, weakens its participation through masking, and reduces its corresponding weight in the detection head from 0.20 to 0.08, while performing directional repair and enhancement on channels C1 and C2, that is, by maintaining the direction The module guides it to maintain a slowdown in the downward trend or turn it into a stable state in the subsequent scales to ensure that the representation of the target after multi-scale fusion still depends on the stable semantic structure of the C1 and C2 channels. Then, based on this trend analysis structure, the system constructs a response change trend graph for each target channel and adds it to the spatial refocusing branch of the detection module to repair the spatial displacement risk caused by scale change. For example, the target is actually detected in P5. The center of gravity shifts to (16,21), while the original estimate should be (17,22). Through channel directional trend repair and feature refocusing, the target is detected and the center of gravity shifts to (16,21). The positioning module works together to ultimately readjust the target's center of gravity back to close to the original center of P3, reducing the position error from 2.8 pixels to 0.7 pixels, further improving spatial consistency. Measured data show that after applying this method, the model's average accuracy in detecting small targets in complex urban images containing interference factors such as small drones, birds, and afterimages of power lines increased from 87.6% to 92.2%. The spatial relocalization module contributed approximately 2.1% to the accuracy gain, and the channel trend matching module contributed approximately 2.5% to the reduction in false detection rate.

[0032] The target drone was observed separately on the three scale feature maps (P3, P4, and P5) in the Neck feature fusion structure, and the SENet channel response values ​​were extracted. The system identified the target at the P4 and P5 scales through directional response trend analysis and channel response matching judgment mechanism. The target center was (35, 45) at the P3 scale, and shifted to (16, 21) at the P5 scale. The corresponding pixel offset distance was 2.8 units, which exceeded the set drift tolerance threshold of 2.0. Therefore, the system determined that the target had spatial drift during the feature fusion process, and then introduced a regional weighting strategy for response repair. The core of the strategy is to construct an offset map for the drift area and use In order to describe the superposition trend of the target's position change and channel response change between different scales, the construction process first extracts its core perception window based on the high-confidence channel response area at the P3 scale, marks it as a credible area within the window, and then maps it to the P4 and P5 scales. It is spatially relocated through upsampling coordinate transformation, and the degree of response drop and activation intensity difference of the target at the new position are counted. The above differences are calculated as a set of weight compensation factors to form a weighted field in the offset map. For example, if the channel C1 response in P3 is 0.82 and P5 drops to 0.15, then its compensation factor is recorded as 0.67. According to this factor, the system will add a compensatory reinforcement mechanism to the channel C1 at the (16,21) position of the P5 scale, and multiply its activation value by At the same time, if there is activation leakage around the position (that is, the response is too strong but not concentrated), the system will perform weighted smoothing on the activation values ​​of the adjacent area to prevent misleading the downstream detection head. After the offset map is constructed, the map is further used as a mask to participate in the path weighting of the feature fusion module. Especially in the FPN structure of YOLOv8, during the upsampling and splicing of each scale feature, the channel dimension compensation factor provided in the offset map is referred to, and the channel weighting matrix at the splicing position is dynamically adjusted, so that the model can give priority to strengthening the response of high-confidence positions when fusing the feature layer, and correct the channel activation imbalance problem in the drift area. After compensation by this weighted strategy, the original P5 scale target The C1 response increased from 0.15 to 0.58, and C2 increased from 0.10 to 0.46, approaching their response levels in the original P3 feature map. The target prediction box position also retraced from (16, 21) to (17, 22), and the pixel error decreased from 2.8 to 0.6. The region IoU (intersection over union) compared to the GT box increased from 0.52 to 0.79, effectively enhancing spatial stability. At the same time, this method reduced the channel response of misactivated regions in P5 (such as reflection points of wires or leaves in the background) from 0.23 to 0.09, suppressing false targets that interfered with detection results. Finally, a total of 16 detection samples were introduced in the entire image using the regional weighted offset map, of which 81% effectively repaired the small target response offset.3%, which brought 3.9% improvement in detection accuracy and 1.8% reduction in false rejection rate.

[0033] In the YOLOv8 network structure, the SENet module is embedded into the C2f structure of the Backbone and the feature fusion structure of the Neck, which is used to extract the channel response of each small target during the training stage. Assuming that a certain UAV target is numbered as target #48 in the training set, in the 5th, 6th, and 7th epochs of continuous training, the normalized response values of target #48 in the C1, C2, and C3 channels of the SENet module are [0.81, 0.62, 0.13], [0.40, 0.32, 0.45], and [0.76, 0.55, 0.18], respectively. By calculating the channel response trajectory of the target in the three epochs, it is found that the C1 and C2 channels re-increase in the 7th epoch after a sharp decline in the 6th epoch, while the C3 channel sharply declines in the 7th epoch after a sharp increase in the 6th epoch. The switching amplitude between channels is large and has no obvious regularity, and the response direction presents a mixed mode of decline-increase and increase-decline. The system judges that the channel response of the target is unstable during training, and the channel response consistency index (which can be regarded as the weighted combination of response volatility and direction consistency in continuous epochs) scores target #48 as 0.34, which is lower than the set threshold of 0.5. Therefore, the target is marked as an unstable target and enters the response correction path. In the 8th epoch of subsequent training, the system adjusts the training strategy for the target through the gradient guidance mechanism. First, it identifies that C1 and C2 are the channels with the highest frequency and the strongest average response of target #48 in the historical epochs. The system increases the backpropagation gradient coefficients of these two channels to 1.5 times the standard value to ensure that these two main channels receive more attention in parameter updating. At the same time, the C3 channel is identified as an irrelevant or unreliable channel due to its large fluctuations and direction reversal, and its gradient contribution is suppressed to only 70% of the original propagation gradient to avoid disturbing the optimization direction. In addition, since target #48 has a response instability problem, its local learning rate in this round of training is increased from the global default of 0.01 to 0.03, which only takes effect in the gradient update of the target to improve the model's focus speed on the target's representation path. After introducing the above gradient guidance, the SENet channel response stability of target #48 significantly improves after the completion of the 8th round of training, with response values of C1: 0.85, C2: 0.63, and C3: 0.19. The system calculates the channel response consistency index to be 0.81, which is restored to a stable target standard, and remains unchanged in the 9th round. Further statistics show that after introducing the gradient guidance mechanism, the model restores the stable state of 93 unstable targets among all unstable targets, accounting for 72.1% of the total unstable samples. The average consistency index of the response trajectory improves from 0.46 in the early training stage to 0.77. In addition, in the final detection result of target #48, its prediction box IoU improves from 0.58 to 0.86, and the class confidence improves from 0.71 to 0.93, verified that the reinforcement feedback guided by the history main channel response while suppressing the interference channel and introducing a more learning-capable update rate configuration locally can effectively alleviate the attention drift problem of small targets in multiple rounds of training, and improve the robustness and convergence speed of the detection model in the continuous representation of small targets.

[0034] During the YOLOv8 training process, the response intensity of target #48 on all channels of the SENet module is recorded in each epoch, especially focusing on channels C1, C2 and C3, which are identified as the main discriminant channels in the early stage. During the training stage from epoch 5 to 9, the system records the response data as follows: C1=0.81, C2=0.62, C3=0.13 at epoch 5, C1=0.40, C2=0.32, C3=0.45 at epoch 6, C1=0.76, C2=0.55, C3=0.18 at epoch 7, C1=0.85, C2=0.63, C3=0.19 at epoch 8, and C1=0.88, C2=0.67, C3=0.17 at epoch 9. By observing this data sequence, it can be seen that C1 and C2 have once declined in epoch 6, but quickly rebounded and remained high response in the subsequent stage, while C3 has increased sharply in the 6th round but gradually declined afterwards, its change is unstable. Based on the channel response consistency measurement strategy, the system calculates the consistency of the activation trend for each channel, that is, not only considering whether the response intensity is high, but also focusing on its concentration trend and fluctuation degree in the time dimension. For example, the average response of C1 channel in 5 rounds of training is 0.74, the standard deviation is 0.19, the fluctuation rate is 25.7%, and the direction consistency remains consistent upward for 4 / 5 rounds, so the system gives it a high consistency score of 0.89. The average response of C2 channel is 0.56, the standard deviation is 0.14, the fluctuation rate is 21.4%, and the direction consistency is 3 / 5, so the score is 0.81. Although C3's response value is close to 0.45 in some rounds, the direction fluctuates sharply and the average is 0.22, the standard deviation is as high as 0.12, the proportion is more than 50%, so its consistency score is only 0.43. By aggregating the scores of the three channels, the system constructs a channel response concentration trend graph for target #48, which is used as the basis for determining whether the target has a stable representation path. When the average consistency index of the main channel of a target exceeds 0.75 and the direction change trend is stable (i.e. the fluctuation rate is less than 30% for three consecutive epochs), the target is determined to have a stable representation path, otherwise it is considered unstable and needs to enter the correction mechanism. Target #48 was once labeled as an unstable target and introduced a gradient guiding mechanism for correction training due to the discontinuity of C1 and C2 responses in the early stage of training. After compensatory training, its channel consistency improved significantly and became stable after the 9th round. After further statistical analysis of the consistency index of 1032 small targets in the whole data set, it is found that the average channel consistency score of stable targets is 0.82, while that of unstable targets is 0.51. After introducing this mechanism, the YOLOv8 model's small target mAP@0.5 on the validation set improved from 68.7% to 74.5%, showing stronger feature transmission stability in small target IoU floating control. In addition, the false positive rate decreased by 3.1%.

[0035] Further optimize the detection deviation of small targets caused by unstable channel response during training, a gradient guiding mechanism is proposed, which can guide the distribution of gradient flow during model training, strengthen the learning of stable response channels, weaken the weight influence of interference channels, and implement targeted gradient update strategy for unstable targets to speed up convergence. On the basis of the foregoing training period, the channel response performance of the target in the SENet module is recorded in the 10th to 13th round. In the 10th round, the main channel C1 and C2 response values of the target are 0.86 and 0.68 respectively, which continues the stable trend before, but in the 11th round, the C3 channel response suddenly rises to 0.53, which is more than 150% higher than the average value of 0.21 in the previous rounds, and is marked as a short-term surge channel by the system. According to the judgment standard that the direction of the channel changes in the past three rounds is inconsistent and the fluctuation rate exceeds the threshold (set to 50%), the gradient coefficient of C3 channel is set to 0.6 of the original value during the 11th round back propagation, and a punitive inhibition is implemented. At the same time, C1 and C2 channels are the main channels of target #48 with high response and consistent direction in history, and their gradient feedback coefficients are increased to 1.7 and 1.5 respectively in this round to enhance their dominant role, so that the network tends to amplify the response ability of the main channel when updating parameters, thereby avoiding being misled by the short-term interference channel to train the direction. In addition, since target #48 has been marked as an unstable target for many times in the early stage, the local large step gradient strategy is enabled for it in the 11th to 13th rounds, the learning rate of YOLOv8 optimizer is adjusted from 0.01 to 0.03, and the frequency of participating in back propagation is increased (for example, participating in back propagation once every other mini-batch), so as to form a high-frequency training compression window, so as to stabilize the representation path of the target and quickly recover the channel consistency in a short time. After the above mechanism processing, in the 13th round, the C1 and C2 channel responses of the target are increased to 0.91 and 0.74 respectively, and the C3 channel is decreased to 0.27, the overall direction tends to be stable, and the channel consistency index is increased from 0.67 in the 10th round to 0.88. The system re-labels it as a stable target, and further detects the mAP@0.5 of the target in the validation set image to 92.1%, which is obviously improved compared with 83.5% before correction. Among the full training samples, after enabling the gradient guiding mechanism for the 327 unstable targets recorded in the training stage, 226 targets recover to stable channel response mode within 5 epochs, accounting for 69.1%, of which the false positive rate decreases by 3.6%, the training convergence speed increases by an average of 17.4%, and the mechanism has a significant optimization effect on small targets with a size below 32x32. In engineering measurement, the model's ability to distinguish small unmanned aerial vehicles, cable debris, building structure edges and other targets in the occluded background is significantly enhanced.

[0036] Example 2: Combined with attachment Figure 6 Based on Example 1, by introducing channel response fluctuation statistics and mask generation mechanism, the SENet module embedded in the YOLOv8 backbone network and the Neck module will perform channel-level response weighting on the feature map output of each image. The position of the target #48 detected in the current input image on the P3 feature layer is set to (35,45). The system performs sampling statistics on the SENet channel response within the window size of 5×5 pixel blocks in the area. The number of channels is set to C=3, and the corresponding channels are C1, C2, and C3. In step S1, the system extracts the normalized response value sequence of each channel in the area. Column, set the response of C1 to [0.78, 0.83, 0.80, 0.77, 0.79], C2 to [0.45, 0.43, 0.76, 0.35, 0.60], C3 to [0.12, 0.15, 0.09, 0.14, 0.13]. In step S2, the system calculates the response variance of each channel, of which C1 variance is 0.00052, C2 is 0.0279, and C3 is 0.00046. Since the variance of C2 is much higher than that of other channels, it is preliminarily judged as a high-variance channel and enters the variability function suppression mechanism. According to the nonlinear channel suppression function:

[0037] The definition and actual value of each parameter are as follows: : There are 5 pixel positions in the sampling window; : In position The standardized response on , for C2 value such as 0.45; : Regional importance weight, set to give higher weight to the location center, ranging from 0.6 to 1.0, in this example it is set to [1.0, 0.9, 0.8, 0.7, 0.6]; : The degree to which the channel response deviates from the mean is calculated based on the standard deviation of the response sequence, and the maximum deviation value is set to 0.4; To adjust the coefficient of response fluctuation sensitivity, the recommended value range is , in this example, medium sensitivity is used ; Substitute the value of C2, and the system calculates its mask , indicating that the channel response is highly unstable and should be weakened; relatively, the masks of C1 and C3 are calculated as , which is a high-stability channel and is retained. In step S3, the system injects the mask value into the detection head channel of YOLOv8 and scales the activation output of the channel in the forward propagation. The specific operation is to multiply the feature output of the C2 channel by 0.56, while C1 and C3 remain basically unchanged. After completion, it is input into the classification and regression branch network to achieve dynamic suppression of unstable channels while retaining the main channel features with the most discriminative ability for small targets. Further, in batch training, the model's detection performance for drone target #48 before and after applying this mechanism is recorded. It was found that mAP@0.5 increased from 88.2% to 93.4%, the false alarm rate decreased from 4.3% to 2.1%, and the position regression IoU increased to 0.81, proving that this mechanism can effectively reduce channel disturbances caused by background disturbances or instantaneous response fluctuations, while improving the response reliability and feature stability of the model in small target detection scenarios. In addition, in the entire test set, a total of 956 channels were identified as high-variance channels and suppressed, with an average channel suppression amplitude of 34.6%, a small target recall rate increased by 5.7%, and the false detection rate decreased by 3.2%.

[0038] To further enhance the network's ability to control the stability of small target feature channel responses, a channel-level suppression mechanism was constructed. This mechanism generates a suppression mask through dynamic analysis of the channel response variance to regulate the contribution weight of unstable channels in the detection path. During the training phase, when the YOLOv8 network processes a 640×640 image, the SENet module is deployed in the C2f structure to extract channel attention information. For the P3 layer feature map (80×80×C), the number of channels is set to C=128, and a 9×9 pixel window centered on the area (35,45) where target #48 is located is sampled. , the system first calculates the variance of the response value of each channel in the window, and sets the response value distribution of the 12th channel to: [0.83, 0.81, 0.79, 0.85, 0.84, 0.80, 0.82, 0.86, 0.83], the variance calculation result is 0.00046, and the response of the 34th channel is: [0.92, 0.41, 0.85, 0.12, 0.60, 0.33, 0.91, 0.49, 0.25], the variance is 0.0807, the system sets the maximum variance threshold to 0.10, the minimum variance to 0, and the linear mapping generates the mask value, using the following rules: Mask value ,in is the variance value, is the inhibition factor, and its value range is , in this example, it is set to , so the mask value of the 12th channel is , and the 34th channel mask value is , indicating that the latter response is unstable and should be suppressed. In the path input of the YOLOv8 detection head, the system multiplies the original features of all channels with the corresponding masks one by one according to the channel dimension to form a suppressed feature map and pass it into the convolution layer for classification and regression prediction operations, thereby realizing dynamic filtering of unstable response channels. Further statistics on the entire training dataset show that in the forward propagation process of all small target samples, about 24.6% of the channel mask values ​​are lower than 0.8, and 9.3% of the channels are set to strong suppression (that is, the mask value is lower than 0.5). This mechanism significantly improves the robustness of the model in the selection of feature channels in small target areas. Specifically for target #48, the IoU of its predicted box was 0.61 and the confidence was 0.74 before the introduction of the mechanism. After the introduction, the IoU increased to 0.85, the confidence increased to 0.92, and the false alarm rate decreased by 1.9%.

[0039] The SENet module integrated in the YOLOv8 network structure can output the weighted response value on the channel dimension of the feature map in the forward propagation stage of each image. During each training or inference process, the system only performs channel response variance statistics operations on the real target area manually marked in the image, thereby avoiding the interference of background noise areas on variance evaluation, so as to improve the accuracy of small target channel stability recognition. In the 14th round of actual training, an image containing 3 labeled targets was input into the network, including target #48, which is located at position (36,44) in the P3 feature map. The SENet module outputs 128 The response map of each channel is extracted from a 9×9 area window corresponding to the target area, and the response variance of each channel in the window is calculated in turn. The response sequence of channel C7 is set to [0.80, 0.81, 0.83, 0.79, 0.82, 0.80, 0.78, 0.84, 0.79], and its variance is 0.00042. The response of channel C22 is [0.62, 0.21, 0.94, 0.10, 0.55, 0.68, 0.09, 0.73, 0.36], and its variance is 0.0901. The system constructs the mask value of each channel according to the preset linear suppression strategy, using the rule ,in To suppress the sensitivity coefficient, set it to 6, then the mask of C7 is , C22 is At the same time, in order to ensure the stability of detection, the suppression mechanism performs a mask generation process for each image separately, that is, image-level dynamic operation. Whenever an image enters the forward reasoning path, the system will instantly calculate the variance of each channel and generate a mask based on the channel response fluctuation of the target area in the image. In the current training batch, the mask distributions triggered by the three targets contained in the image are significantly different. The average mask value of target #48 is 0.93, and the standard deviation of the offset is 0.07, indicating that most of its channel responses are stable and need to be retained. The average mask value of another edge-occluded drone target #52 is 0.71, and some channels are as low as 0.42. The system has effectively weakened its unstable channels. The system can avoid the overfitting or over-suppression problems caused by a unified mask template, and is especially suitable for scenes with small target interlacing, illumination changes or partial occlusion in complex environments. The measured results of this mechanism show that after implementing the image-level dynamic mask generation mechanism on the full dataset, the average detection confidence is increased by 4.1%, and the false alarm rate is reduced by 3.5%. In particular, the recall rate is increased by 6.2% in the category of small targets with a size of less than 24×24 pixels. The combination of the image-level processing strategy and the variance calculation method based on the target area can significantly improve the response adaptability of the SENet channel attention strategy to the differentiated features of small targets, and can effectively reduce the channel response distortion caused by irrelevant areas.

[0040] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the foregoing embodiments. The foregoing embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. Improve the YOLOv8 small target detection method based on SENet, which is characterized by The steps include: Semantic dilution loss is introduced to measure the dilution degree of small target features in the channel. For small target feature channels, the SENet structure generates suppression inverse weights, retaining high-response areas while suppressing background redundancy. The C2f structure of YOLOv8 is integrated to transmit decoupled features in cross-layer connections. In the Neck feature pyramid, the SENet response migration relationship is constructed; the weight offset between the current scale and the upper / lower scale is calculated to determine whether the small target response has spatially shifted; the position balance loss is introduced to relocate the features of small target areas with excessive center of gravity drift; Design a channel response consistency metric to measure the consistency of SE responses of small targets across different epochs. If the response of the same target drifts dramatically, it is considered an unstable target and the response is corrected through gradient guidance. Construct a response consistency loss term to guide the network to converge to a stable small target representation path. Extract the SENet channel output for each image and calculate the variance of the channel response distribution in the target area; weaken or suppress channels with high variance from the current image detection path; introduce a channel gating mechanism into the detection head to adaptively select stable channels for prediction; The detection head performs target classification and positioning regression on the features of the stable channel and outputs the detection results of small targets.

2. The detection method of small targets based on SENet improved YOLOv8 according to claim 1, characterized in that The method for calculating the weight offset value between the current scale and the upper / lower scale includes: The SENet modules are embedded in the feature maps of different scales in the Neck structure to extract the channel response weights of the feature maps of each scale; the SENet channel responses at different scales are spatially aligned by upsampling or downsampling; Compare the changes in channel response weights between adjacent scales and construct a scale-response migration relationship; determine the degree of response offset of small target areas at different scales. If the offset exceeds the set threshold, it is determined that the area has spatial drift; Compensate for small target areas with drift by performing channel enhancement or spatial refocusing.

3. The detection method of small targets based on SENet improved YOLOv8 according to claim 2, is characterized in that The comparison of the channel response weight changes is based on statistics of the SE channel outputs of the same image area between two adjacent scales, calculating the directional change trend of its channel weight, and judging whether the small target response is displaced or attenuated based on the trend.

4. The detection method of small targets based on SENet improved YOLOv8 according to claim 3, characterized in that After determining the spatial drift, a regional weighting strategy is executed on the drift region, and a compensation enhancement is performed on the channel weight of the region in the subsequent feature fusion by constructing an offset map.

5. The detection method of small targets based on SENet improved YOLOv8 according to claim 1, characterized in that The method for performing response correction by gradient guidance comprises the following steps: S1. For the targets in the training samples, the SENet module embedded in the YOLOv8 network structure is used to extract the channel response weight of each target in each training round; S2. Record and compare the channel responses of the same target in multiple training rounds to construct a target channel response trajectory; based on the channel response trajectory, calculate the target's channel response consistency index in the time dimension. If the response fluctuates violently, the target is determined to be unstable; S3. For targets judged to be unstable, a gradient guidance mechanism is introduced in subsequent training, including strengthening the back-propagation gradient of the response channel, penalizing the weight response of irrelevant channels, and locally adjusting the learning rate of the target.

6. The detection method for small targets based on SENet improved YOLOv8 according to claim 5, characterized in that The channel response consistency index is based on the change in the activation distribution trend of each channel to the target in multiple training rounds, and is used to measure whether the channel attention is continuously concentrated, and then determine whether the target representation path is stable.

7. The detection method for small targets based on SENet improved YOLOv8 according to claim 6, characterized in that The gradient guidance mechanism includes any one or more of the following: Assign greater gradient weights to target historically high response channels; Apply inhibitory weights to channel responses that are suddenly enhanced but unstable within a short period of time; For training samples marked as unstable targets, a high-frequency or large-step gradient update strategy is performed.

8. The detection method for small targets based on SENet improved YOLOv8 according to claim 1, characterized in that The method of weakening or suppressing the channel with high variability from the current image detection path includes: S1. For each input image, the SENet module embedded in the YOLOv8 network structure is used to extract the response value of each channel to the target area of ​​the image; for the target area, the response distribution characteristics of each channel are statistically analyzed to calculate the response variance or fluctuation amplitude; S2. Determine, based on the degree of variation of channel responses, channels with unstable responses or poor discrimination within the target region; generate a channel suppression mask for the high-variability channels, where the mask is a scaling factor less than 1; S3. In the feature input of the YOLOv8 detection head, the mask is injected into the corresponding channel to dynamically suppress the impact of high-variance channels on classification and regression results.

9. The detection method for small targets based on SENet improved YOLOv8 according to claim 8, characterized in that The suppression mask is generated based on the channel response variance, and the value range is between 0 and 1. The larger the variance, the smaller the mask value. The mask acts on the convolution output or activation result of the detection path.

10. The method for detecting small targets based on SENet improved YOLOv8 according to claim 9, characterized in that The calculation of the channel response variance is performed on the marked target area in the image; the suppression process is an image-level dynamic operation, and a channel mask is generated separately for each image.

Citation Information

Patent Citations

  • Small target detection method based on improved YOLOv8

    CN118552716A

  • Unmanned aerial vehicle image target detection method based on ASP-YOLOv4 multi-scale fusion

    CN115100547A

  • Traffic target detection algorithm based on YOLOV8

    CN118247766A

  • Improved YOLOv8 target detection counting outdoor pond fish intelligent feeding method

    CN118942110A

  • Method for detecting infrared ship target based on improved yolov7

    US20250078541A1

Cited By

  • Endoscopic surgery video real-time structure analysis method and system

    CN121213933A

  • Building surface defect detection method and system based on improved YOLOv8

    CN121481958A

  • Pure vision three-dimensional target detection system and method based on bird's-eye view angle

    CN122290076A