## 3 The Proposed Method
### Long-Tail Data Detection Module
#### 3.4.1 Feature Generation Module  
The main function of this module is to generate fake features for the tail categories in the dataset, preventing the classifier from overfitting small category samples, and helping the network learn more robust features. This module works on the ROI feature extractor of the network and performs data enhancement operations on the proposed area generated by the original RPN classifier. To generate better pseudo labels without losing the features of the original category of objects, we forge the original label multiple times and send it to the network for feature extraction to collect the forged features. The data augmentation operation is described mathematically as shown in Equation (6). In the equation, \((x,y,w,h,\theta)\) represents the center point (\(x\),\(y\)), width (\(w\)), height (\(h\)), and rotation angle (\(\theta\)) of the original label and the random number \(\eta\) ranges from \(-1\) to \(1\), which randomly offsets the length, width, and rotation angle of the object in the original label relative to itself within plus or minus \(1/6\), and randomly offsets the angle within plus or minus \(\pi/12\). As shown in Figure 5, the pseudo labels generated after offset are not significantly different from the original labels in terms of visual results. But certain differences were retained.  
\[label^{\prime}=(x,y,w+\frac{\eta_{1}}{6}w,h+\frac{\eta_{2}}{6}h,\theta+\frac{ \eta_{3}\pi}{12}\theta) \tag{6}\]  
After feature extraction, the pseudo labels will be collected for generating pseudo features. It should be noted that we use a decay process with momentum to collect the mean and variance of features corresponding to each category. The advantage of doing this is that it can enable the network to quickly adapt to the characteristics of the current sample without losing previously learned features too quickly. The specific implementation process is shown in Equation (7). In the equation, \(\mu,\sigma\) are the mean and variance of the accumulated features and \(u,v\) are the mean and variance of the current feature. When this part of the features needs to be used later, the approximate feature distribution can be  
Figure 5: Visualization of pseudo labels. (**a**) Original image (with background). (**f**) Original label (black background). (**b**,**d**,**g**,**i**) Add counterclockwise random angles based on the original labels. (**c**,**e**,**h**,**j**) Add clockwise random angles based on the original labels. (**b**–**e**) Extend the length based on the original label. (**g**–**j**) Shorten the length based on the original label. (**b**,**c**,**g**,**h**) Widen the width based on the original label. (**d**,**e**,**i**,**j**) Narrow the width based on the original label.  
restored to the original through Equation (8); in the equation, \(f_{i}\) is the approximate feature and \(\varepsilon\) is data that follow the standard normal distribution.  
\[\left\{\begin{array}{l}\mu_{i}\gets 0.9\mu_{i}+0.1u_{i}\\ \sigma_{i}\gets 0.9\sigma_{i}+0.1v_{i}\end{array}\right. \tag{7}\]  
\[f_{i}=\mu_{i}+\varepsilon\times\sigma_{i},\varepsilon\in\text{N}(0,1) \tag{8}\]