A long-tail target detection method based on adaptive feature perception and weight adjustment
By employing adaptive feature perception and weight adjustment methods, the problem of low accuracy in tail category recognition of deep neural networks on long-tailed distributed data is solved. This achieves synergistic enhancement of feature optimization and loss adjustment, thereby improving the model's detection performance and generalization ability.
Patent Information
- Application Number
- CN202610956965.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-11-06
AI Technical Summary
Existing deep neural networks tend to over-bias the head category in long-tailed distributed data, resulting in a significant decrease in the accuracy of tail category recognition. Existing balancing strategies have failed to effectively address the difficulties in feature representation and classification decision-making, affecting the applicability of the model in real-world open environments.
We employ an adaptive feature perception and weight adjustment approach, which enhances the learning ability of key difficult examples by constructing a deformable feature optimization module and a dynamic difficulty-aware class reweighting loss function. This includes a dual-path attention layer and deformable convolution operations, combined with the dynamic difficulty-aware class reweighting loss function to optimize feature extraction and classification decisions.
It significantly improves the model's detection performance and generalization ability in long-tail scenarios, enhances the classification accuracy of tail categories and confused categories, and strengthens the feature representation ability and detection robustness of geometrically deformed targets.
Smart Images

Figure CN123052304A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gastrointestinal target detection technology, and in particular to a long-tail target detection method based on adaptive feature perception and weight adjustment. Background Technology
[0002] Long-tailed distribution is prevalent in real-world object detection tasks and is one of the key challenges restricting the practical performance of models. Due to limitations such as device coverage and target frequency, actual datasets often exhibit a significant long-tail characteristic, meaning that a few categories (head classes) have a large number of samples, while most categories (tail classes) have extremely scarce samples. Although deep neural networks demonstrate excellent detection performance on balanced datasets, on long-tailed distributed data, models tend to over-bias themselves towards the abundant head classes, leading to a significant decrease in the accuracy of tail class recognition and severely limiting the applicability of models in real-world open environments.
[0003] Current mainstream research typically attributes this performance bottleneck to the imbalance in the number of samples between classes, leading to a series of methods based on heuristic balancing strategies. For example, BSGAL enhances the diversity of tail class data by generating synthetic samples, while CBL and CBQFL assign higher weights to tail classes through loss functions, attempting to adjust the model's learning focus in this way.
[0004] However, closer examination reveals that the relationship between detection accuracy and sample size is not a simple linear one in long-tail datasets: classes with poor detection performance also exist in the head classes, while classes with high recognition accuracy exist in the tail classes. This phenomenon indicates that the essence of the long-tail problem goes far beyond the superficial imbalance in data distribution; its deeper root lies in the model's inability to effectively learn two key types of challenging examples: one is "feature representation challenges" caused by target deformation, occlusion, scale changes, etc., and the other is "classification decision challenges" caused by sample scarcity or inter-class confusion. While existing balancing strategies alleviate the bias caused by sample size imbalance to some extent, they fail to systematically address the representation and discrimination challenges posed by these underlying challenging examples.
[0005] Therefore, there is an urgent need for a comprehensive solution that can enhance the learning ability of key difficult cases by starting with the collaboration of feature extraction and classification decision-making, so as to improve the overall detection performance and generalization ability of the model in long-tail scenarios. Summary of the Invention
[0006] To address the existing problems, this invention provides a long-tail target detection method based on adaptive feature perception and weight adjustment, the specific scheme of which is as follows:
[0007] A long-tailed target detection method based on adaptive feature perception and weight adjustment includes the following steps:
[0008] S1. Construct a deformable feature optimization module, which calculates channel attention weights and spatial attention weights in parallel on the input feature map through a dual-path attention layer, and enhances the input feature map using the channel attention weights and spatial attention weights to obtain an enhanced feature map;
[0009] The enhanced feature map is input into a deformable convolution, which predicts the offset and modulation factor based on the enhanced feature map. The deformable convolution is then used to perform a deformable convolution operation on the enhanced feature map to obtain an optimized feature map.
[0010] S2. Design a dynamic difficulty-aware category reweighted loss function, calculate the category frequency factor and prediction difficulty factor for each category, add the category frequency factor and the prediction difficulty factor together, and use them as weight coefficients to incorporate into the binary cross-entropy loss function to obtain the dynamic difficulty-aware category reweighted loss function.
[0011] The category frequency factor is obtained based on the inverse frequency of the cumulative occurrence frequency of the category during training, and the prediction difficulty factor is obtained based on the cosine similarity between the predicted probability of the category in the current iteration and the true label, and updated using an exponential moving average.
[0012] S3. Embed the deformable feature optimization module into the bottleneck structure of the backbone network of the object detection network, and use the dynamic difficulty-aware category reweighted loss function to replace the original classification loss of the object detection network during the training phase to form the final long-tail object detection model.
[0013] Preferably, the parallel computation of channel attention weights and spatial attention weights in the dual-path attention layer in step S1 specifically includes:
[0014] The input feature map is subjected to average pooling and max pooling respectively. The results of the two pooling are passed through a dimension-reducing fully connected layer, a non-linear activation function and an increasing-dimensional fully connected layer respectively, and then summed. Finally, the channel attention weights are obtained by passing the sigmoid function.
[0015] The mean and maximum values are calculated along the channel dimension of the input feature map to obtain two spatial feature maps, which are then concatenated. The spatial attention weights are then obtained through standard convolution and the sigmoid function.
[0016] In step S1, enhancing the input feature map using the channel attention weights and spatial attention weights involves sequentially multiplying the channel attention weights, the spatial attention weights, and the input feature map element by element.
[0017] Preferably, the prediction of offset and modulation factor by the deformable convolution based on the enhanced feature map in S1 specifically involves: passing the enhanced feature map through the built-in convolutional layer of the deformable convolution to output a feature map with a number of channels, wherein the first part of the channels corresponds to the two-dimensional offset, and the remaining second part of the channels generates the modulation factor through the sigmoid function.
[0018] Preferably, calculating the category frequency factor in S2 includes:
[0019] During the training process, the cumulative occurrence count of each category was statistically analyzed, and the cumulative frequency of each category was calculated.
[0020] Based on the inverse frequency (i.e., the reciprocal of the cumulative frequency of each category) and normalized, combined with a hyperparameter used to adjust the sensitivity to frequency differences, the category frequency factor is obtained, so that the category with the lower cumulative frequency of occurrence receives a higher base weight.
[0021] Preferably, calculating the prediction difficulty factor in S2 includes:
[0022] In the current iteration batch, the cosine similarity between the predicted probability vector and the true label vector of each category is calculated and used as the prediction difficulty assessment value for the current batch.
[0023] The global prediction difficulty for each category is updated using the exponential moving average method, based on the prediction difficulty assessment value of the current batch and the historical prediction difficulty.
[0024] The updated global prediction difficulty is reciprocalized and normalized to obtain the prediction difficulty factor, so that categories with higher current prediction difficulty receive higher weights.
[0025] Preferably, the target detection network in S3 is a YOLO network architecture, and the bottleneck structure is the Bottleneck structure of the C3 or C2f module in the YOLO network backbone; embedding the deformable feature optimization module into the bottleneck structure means replacing the original convolutional module in the Bottleneck structure with the deformable feature optimization module.
[0026] Preferably, the two types of key difficult cases targeted by the method include: difficult cases of feature representation, which are caused by the deformation, occlusion or scale change of the target, making it difficult for standard convolution to effectively capture features; and difficult cases of classification decision, which are rare difficult cases caused by the scarcity of samples, or confusing difficult cases caused by the high overlap of features between classes and the large differences within classes.
[0027] The present invention also discloses an electronic device and a computer-readable storage medium. The electronic device includes a memory and a processor, the memory storing a program that supports the processor in executing any of the aforementioned long-tail target detection methods, the processor being configured to execute the program stored in the memory. A computer-readable storage medium storing a computer program thereon is characterized in that the computer program, when executed by a processor, performs the steps of any of the aforementioned long-tail target detection methods.
[0028] The beneficial effects of this invention are as follows:
[0029] This invention overcomes the limitations of traditional methods that only balance the number of samples per category. It systematically addresses the long-tail problem from the perspective of key difficult examples, achieving synergistic enhancement of feature optimization and loss adjustment. Furthermore, the deformable feature optimization module proposed in this invention pre-enhances key regions from both channel and spatial dimensions through a dual-path attention mechanism, then guides deformable convolutions to adaptively adjust sampling positions, significantly enhancing the feature representation capability for geometrically deformable targets and the robustness to detecting difficult examples. Simultaneously, the dynamically difficulty-aware category reweighted loss function designed in this invention integrates static prior knowledge of category frequency and dynamic evaluation of prediction difficulty, enabling the training process to adaptively tilt towards difficult classification decisions, further improving the classification accuracy of tail categories and confused categories. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This is a schematic diagram of the dual-path attention layer of the present invention.
[0032] Figure 2 This is a schematic diagram of the deformable feature optimization module of the present invention.
[0033] Figure 3 This is a schematic diagram of the framework of the YOLO-APM model of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] This invention discloses a long-tail target detection method based on adaptive feature perception and weight adjustment, comprising the following steps:
[0036] S1. Construct a Deformable Feature Refinement (DFR) module; guide the deformable convolution operation through a dual-path attention layer to enhance the model's adaptability to the geometric deformation of the target and its ability to capture key features.
[0037] S11. Through the Dual-Path Attention Layer (DAL), channel attention weights and spatial attention weights are calculated in parallel on the input feature map. The input feature map is enhanced by the channel attention weights and spatial attention weights to obtain an enhanced feature map; thereby enhancing the adaptability of the target detection network model to the geometric deformation of the target and its ability to capture key features.
[0038] Specifically, a dual-path attention layer is constructed, which collaboratively enhances the input feature map by parallel computation of channel attention and spatial attention. The channel attention then... We avoid information loss from single pooling by using average pooling (preserving overall features) and max pooling (preserving salient features) respectively. Then, we use fully connected layers to achieve dimensionality reduction → nonlinear activation → dimensionality increase, reducing the number of parameters and enhancing nonlinearity. Finally, we sum the results and output the enhancement coefficients for each channel using the sigmoid function. The mathematical expression is:
[0039] ;
[0040] in This indicates that in DAL, for the input feature map Channel attention weight output, This indicates the sigmoid calculation. Indicates a fully connected layer. and These represent the feature maps respectively. Average pooling and max pooling calculations.
[0041] The spatial attention process calculates the mean (global background) and maximum (local salient features) along the channel dimension, generating two spatial feature maps, which are then stitched together. This is followed by a... Standard convolutional processing fuses dual-path features to learn spatial dependencies. Finally, a sigmoid function is used to generate a spatial weight matrix, highlighting important regions. Spatial attention is defined as follows:
[0042] ;
[0043] in This indicates that in DAL, for the input feature map Spatial attention weight output, This indicates the sigmoid calculation. express Standard convolution calculation, This indicates that a concatenation operation is performed on two feature maps. and These represent the calculation of the mean and maximum value of the feature map, respectively.
[0044] Finally, DAL uses channel attention weights... and spatial attention The input feature map is processed by a cascaded multiplication operation. Perform dual optimization. The specific process can be described as follows:
[0045] ;
[0046] The output feature map Both the channels and key regions in the spatial dimension are significantly enhanced, providing high-quality guiding information for subsequent deformable convolutions.
[0047] In specific implementation, such as Figure 1 As shown, the input feature map Weights are calculated via both channel attention and spatial attention branches. In the channel attention branch, the fully connected layer first performs dimensionality reduction using a linear layer, then performs non-linear activation using a ReLU function, and finally performs dimensionality increase using another linear layer. This reduces the number of parameters while enhancing non-linearity. Finally, the calculated attention weights are compared with the input feature map. Multiplying them yields the final enhanced output feature map. .
[0048] S12. The enhanced feature map is input into a deformable convolution, which predicts the offset and modulation factor based on the enhanced feature map, and performs a deformable convolution operation on the enhanced feature map using the offset and modulation factor to obtain an optimized feature map.
[0049] Specifically, a DFR module is constructed by combining a dual-path attention layer and deformable convolution. The output feature map from step S11 is then processed. As input to deformable convolution, it is used to predict its offset. and modulation factor This allows the convolutional kernel sampling position to adaptively fit the geometry of the target, enhancing the ability to capture key features. The final calculation process of the DFR module is shown below:
[0050] ,
[0051] in This indicates that the DFR module is working with the input feature map. The output results, Representation: Feature map after DAL enhancement The offset is first calculated using the built-in convolutional layers in Deformable Convolution v2 (DCNv2). and modulation factor Then, they are combined through deformable convolution to output the final result.
[0052] In specific implementation, such as Figure 2 As shown, the input feature map The enhanced output feature map is obtained after DAL calculation. The feature map will then be output. It is computed as input to deformable convolution. Deformable convolution is based on the enhanced output feature map. Calculate the corresponding offset and modulation factor Then, the offset and modulation factor are applied together to the output feature map. It adaptively adjusts the sampling area to better fit the geometry of the target, thereby enhancing the ability to capture key features. (See figure.) Represents the output of the convolutional layer One channel, front Each channel corresponds to a 2D offset, and finally... Each channel is fed into the sigmoid function to generate the modulation factor.
[0053] S2. Design a dynamic difficulty-aware category reweighted loss function, calculate the category frequency factor and prediction difficulty factor for each category, add the category frequency factor and the prediction difficulty factor together, and use them as weight coefficients to incorporate into the binary cross-entropy loss function to obtain the dynamic difficulty-aware category reweighted loss function.
[0054] The category frequency factor is obtained based on the inverse frequency of the cumulative occurrence frequency of the category during training, and the prediction difficulty factor is obtained based on the cosine similarity between the predicted probability of the category in the current iteration and the true label, updated using an exponential moving average.
[0055] Specifically, S21, calculate the category frequency factor. First, calculate the cumulative frequency of each category during the training process. The calculation formula is as follows:
[0056] ;
[0057] in Indicates category Category frequency, Indicates the total number of categories. It is a category The cumulative occurrence count during training. Then, the class frequency factor is calculated by normalizing its inverse frequency, giving higher base weights to classes with lower frequencies.
[0058] ;
[0059] in, This represents the category frequency factor. It is the set hyperparameter used to adjust the sensitivity to frequency differences.
[0060] In practice It is the cumulative sum of the number of images of each category in each batch. The initial value is set to 1 to avoid division by zero errors.
[0061] S22. Calculate the prediction difficulty factor. First, a prediction difficulty evaluation factor is defined: the prediction difficulty is evaluated by the cosine similarity between the prediction probability and the category label. The formula for calculating the cosine similarity is:
[0062] ,
[0063] in Indicates for the first Predicted probability vector of the category and real label vector Calculate the cosine similarity. Then, use the exponential moving average method to dynamically update the global prediction difficulty estimate. The calculation process is as follows:
[0064]
[0065] in, Indicates the first In the next iteration, the category The prediction difficulty. Meanwhile, the momentum hyperparameter of the exponential moving average method is set to... . The higher the value, the more distinct the category. In the current number The prediction difficulty decreases with each iteration. Therefore, the final prediction difficulty factor is calculated using the following formula:
[0066] ,
[0067] in, This represents the prediction difficulty factor, which has been normalized. This design ensures that categories with higher prediction difficulty have higher weighting factors. The larger the value, the higher its weight in the loss, forcing the model to learn more about it.
[0068] In practice, the momentum hyperparameter When calculating cosine similarity, the predicted probability of each category in all samples of the current batch of images is calculated along the sample dimension, and the cosine similarity is then calculated between the predicted probability and the true label. The prediction difficulty is then dynamically updated, while the historical prediction difficulty remains unchanged for categories not appearing in the current batch.
[0069] S23. The category frequency factor and prediction difficulty factor are added together and used as weighting coefficients in the binary cross-entropy loss function to form the DDCRL. The specific calculation process is as follows:
[0070] ,
[0071] in This represents the calculation result of DDCRL. and These represent the total number of samples and the total number of categories in a batch, respectively. This represents the binary cross-entropy loss function.
[0072] In practice, the class frequency factor and the prediction difficulty factor are added together and then used as the weight coefficient to be multiplied with the existing binary cross-entropy loss. This allows the loss to be adjusted from two perspectives, making the model pay more attention to the difficult cases of classification decisions.
[0073] S3. Embed the deformable feature optimization module into the bottleneck structure of the backbone network of the object detection network, and use the dynamic difficulty-aware category reweighted loss function to replace the original classification loss of the object detection network during the training phase to form the final long-tail object detection model.
[0074] The target detection network is a YOLO network architecture, and the bottleneck structure is the Bottleneck structure of the C3 or C2f module in the YOLO network backbone; embedding the deformable feature optimization module into the bottleneck structure means replacing the original convolutional module in the Bottleneck structure with the deformable feature optimization module.
[0075] The method addresses two key types of challenging cases: the feature representation challenge corresponding to step S1, which arises from the deformation, occlusion, or scale change of the target, making it difficult for standard convolution to effectively capture features; and the classification decision challenge corresponding to step S2, which arises from the scarcity of samples, resulting in rare challenging cases, or from confusing challenging cases caused by high overlap of features between classes and large differences within classes.
[0076] Specifically, S31 defines two types of key difficult examples: feature-representation hard examples and classification-decision hard examples.
[0077] The difficulty in feature representation stems from the complexity of the target itself, such as severe deformation, occlusion, and varying scale. Effective features of such samples are difficult to capture by the fixed sampling grid structure of standard convolutional networks, leading to low detection accuracy.
[0078] Classification decision difficulties stem from the difficulties encountered during the classifier's decision-making stage. These difficulties can be further subdivided into: (a) Rare difficult examples: caused by the scarcity of samples in the tail category, making it impossible for the model to learn clear and robust decision boundaries; (b) Confusing difficult examples: certain categories become high-difficulty samples that the model consistently mispredicts due to the high overlap of features between them and similar categories, or the large differences within each category.
[0079] S32. Integrating DFR and DDCRL into the YOLO network architecture to construct the detection model YOLO-APM (YOLO with Adaptive Feature Perception and Weight Modulation). First, the DFR module is integrated into the key nodes of the backbone network; specifically, it is embedded in the Bottleneck structures of each C3 / C2f in the backbone. This design ensures that the model obtains enhanced feature representation capabilities robust to geometric deformation at each stage of multi-scale feature extraction, thus directly addressing the challenge of difficult examples in feature representation. Next, during the training phase, the DDCRL function is used to replace the original classification loss of YOLO. DDCRL, through its dynamic weight adjustment mechanism, ensures that the training process adaptively balances the focus on difficult examples in classification decisions. Finally, synergistic enhancement of feature extraction and loss optimization is achieved, effectively improving the model's overall performance and generalization ability in long-tail scenarios.
[0080] In specific implementation, such as Figure 3 As shown, the DFR module is integrated into the YOLO architecture, modifying the Bottleneck structures of each C3 / C2f in the Backbone. This design ensures that the model achieves enhanced, geometrically robust feature representation capabilities at each stage of multi-scale feature extraction, thus directly addressing the challenge of difficult feature representations. Subsequently, the DDCRL function replaces the original YOLO classification loss. DDCRL, through its dynamic weight adjustment mechanism, ensures that the training process adaptively balances the focus on difficult classification decisions.
[0081] In practice, to verify the experiments of this invention, the dataset used was a manually constructed long-tail version of the MS COCO-2017 dataset. Specifically, this dataset was sampled using a Pareto distribution, and its probability density function is... ,in This is used to control the rate of data decay. Operationally, it is first determined based on the frequency of each category in the original COCO dataset. All 80 categories were sorted and processed sequentially from head categories (high frequency) to tail categories (low frequency). For each category, the size of the tail category was strictly constrained by adding or removing instances containing that category to match the desired Pareto distribution, ultimately resulting in a subset containing 9620 images. This method ensures the long-tail characteristics of the data while preserving the co-occurrence relationships of categories in multi-label scenarios.
[0082] In specific implementation, to illustrate the performance of the above-mentioned solution of the present invention, experiments were conducted on YOLO architecture v5 / v8 / v10 s version models. The mean average precision (mAP), mean average precision for frequency (mAPf), mean average precision for common (mAPc), and mean average precision for rare (mAPr) were used as indicators to measure the target detection level. For each indicator, a higher value indicates a better target detection effect. The experimental results are as follows:
[0083] Table 1 Comparison of detection performance of different models
[0084]
[0085] As can be seen from Table 1, the present invention can significantly improve the target detection accuracy by integrating DFR and DDCRL on the YOLO architecture, and has better long-tail target detection performance.
[0086] The present invention also discloses an electronic device and a computer-readable storage medium. The electronic device includes a memory and a processor, the memory storing a program that supports the processor in executing any of the aforementioned long-tail target detection methods, the processor being configured to execute the program stored in the memory. A computer-readable storage medium storing a computer program thereon is characterized in that the computer program, when executed by a processor, performs the steps of any of the aforementioned long-tail target detection methods.
[0087] Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps are described above in a generalized manner in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art may implement the described functionality in different ways for each specific application, but such implementation decisions should not be construed as departing from the scope of the invention.
[0088] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A long-tail target detection method based on adaptive feature perception and weight adjustment, characterized in that, Includes the following steps: S1. Construct a deformable feature optimization module, which calculates channel attention weights and spatial attention weights in parallel on the input feature map through a dual-path attention layer, and enhances the input feature map using the channel attention weights and spatial attention weights to obtain an enhanced feature map; The enhanced feature map is input into a deformable convolution, which predicts the offset and modulation factor based on the enhanced feature map. The deformable convolution is then used to perform a deformable convolution operation on the enhanced feature map to obtain an optimized feature map. S2. Design a dynamic difficulty-aware category reweighted loss function, calculate the category frequency factor and prediction difficulty factor for each category, add the category frequency factor and the prediction difficulty factor together, and use them as weight coefficients to incorporate into the binary cross-entropy loss function to obtain the dynamic difficulty-aware category reweighted loss function. The category frequency factor is obtained based on the inverse frequency of the cumulative occurrence frequency of the category during training, and the prediction difficulty factor is obtained based on the cosine similarity between the predicted probability of the category in the current iteration and the true label, and updated using an exponential moving average. S3. Embed the deformable feature optimization module into the bottleneck structure of the backbone network of the object detection network, and use the dynamic difficulty-aware category reweighted loss function to replace the original classification loss of the object detection network during the training phase to form the final long-tail object detection model.
2. The method according to claim 1, characterized in that, The parallel computation of channel attention weights and spatial attention weights in the dual-path attention layer described in step S1 specifically includes: The input feature map is subjected to average pooling and max pooling respectively. The results of the two pooling are passed through a dimension-reducing fully connected layer, a non-linear activation function and an increasing-dimensional fully connected layer respectively, and then summed. Finally, the channel attention weights are obtained by passing the sigmoid function. The mean and maximum values are calculated along the channel dimension of the input feature map to obtain two spatial feature maps, which are then concatenated. The spatial attention weights are then obtained through standard convolution and the sigmoid function. In step S1, enhancing the input feature map using the channel attention weights and spatial attention weights involves sequentially multiplying the channel attention weights, the spatial attention weights, and the input feature map element by element.
3. The method according to claim 1, characterized in that, The prediction of offset and modulation factor by the deformable convolution based on the enhanced feature map in S1 specifically involves passing the enhanced feature map through the built-in convolutional layer of the deformable convolution to output a feature map with a number of channels, wherein the first part of the channels corresponds to the two-dimensional offset, and the remaining second part of the channels generates the modulation factor through the sigmoid function.
4. The method according to claim 1, characterized in that, The calculation of the category frequency factor in S2 includes: During the training process, the cumulative occurrence count of each category was statistically analyzed, and the cumulative frequency of each category was calculated. Based on the inverse frequency (i.e., the reciprocal of the cumulative frequency of each category) and normalized, combined with a hyperparameter used to adjust the sensitivity to frequency differences, the category frequency factor is obtained, so that the category with the lower cumulative frequency of occurrence receives a higher base weight.
5. The method according to claim 1, characterized in that, The calculation of the prediction difficulty factor in S2 includes: In the current iteration batch, the cosine similarity between the predicted probability vector of each category and the true label vector is calculated as the prediction difficulty evaluation value for the current batch. The global prediction difficulty for each category is updated using the exponential moving average method, based on the prediction difficulty assessment value of the current batch and the historical prediction difficulty. The updated global prediction difficulty is reciprocalized and normalized to obtain the prediction difficulty factor, so that categories with higher current prediction difficulty receive higher weights.
6. The method according to claim 1, characterized in that: The target detection network described in S3 is a YOLO network architecture, and the bottleneck structure is the Bottleneck structure of the C3 or C2f module in the YOLO network backbone; embedding the deformable feature optimization module into the bottleneck structure means replacing the original convolutional module in the Bottleneck structure with the deformable feature optimization module.
7. The method according to any one of claims 1 to 6, characterized in that, The method addresses two key types of challenging cases: feature representation challenges, which arise from the deformation, occlusion, or scale changes of the target, making it difficult for standard convolution to effectively capture features; and classification decision challenges, which arise from the scarcity of samples, resulting in rare challenging cases, or from confusing challenging cases caused by high overlap of features between classes and large differences within classes.
8. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the long-tailed target detection method according to any one of claims 1 to 7, and the processor is configured to execute the program stored in the memory.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by the processor to perform the steps of the long-tail target detection method according to any one of claims 1 to 7.
