Target detection model training method for coping with long-tail problem

By using the method of using image data to increase and optimize the loss function in the target detection model training, the problem of insufficient classification capabilities of the target detection model under the long -tail distribution, and achieve better detection effect and model stability.

CN119360151APending Publication Date: 2025-01-24BEIJING HUAHANG RADIO MEASUREMENT & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310909393.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively solve the problem of insufficient classification capabilities of the object detection model under long-tail distribution, and existing methods such as resampling, modifying loss functions and fine-tuning models are difficult to achieve ideal results.

Method used

By obtaining an initial training sample set that conforms to the long-tail distribution, the preset background image is used to augment the image data to form an updated training sample set, and based on this, the target detection model is trained. Specific steps include randomly selecting the target sample image, filling the target frame position and surrounding image areas into the background image, forming an augmented target sample image, and adding labels to it, and finally through sample set data enhancement and decoupling reconstruction detection. Model training is performed by combining the head and optimized adaptive loss function.

Benefits of technology

It effectively alleviates the problem of insufficient classification ability of the target detection model under long-tail distribution, improves the detection effect, and avoids the problems of model overfitting and training convergence difficulties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119360151A_ABST
    Figure CN119360151A_ABST
Patent Text Reader

Abstract

The invention relates to a target detection model training method for coping with a long-tail problem, relates to the technical field of target detection, and solves the problem that it is difficult to enable a target detection model to achieve an ideal classification effect in an existing mode. The method comprises the following steps: acquiring an initial training sample set conforming to long-tail distribution; wherein the initial training sample set comprises a plurality of target sample images and labels thereof, and the label of each target sample image comprises the category and the target frame position of each target in the target sample image; performing image data augmentation on the target sample image in the initial training sample set by using a preset background image to obtain an updated training sample set; and training a target detection model based on the updated training sample set. According to the method, for the problems existing in the existing target detection model training process, an optimization method combining sample set data enhancement, detection head decoupling and reconstruction and adaptive loss function optimization is provided, and the detection effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology, and in particular to a target detection model training method for coping with long-tail problems. Background Art

[0002] Target detection technology has become an increasingly critical part of optoelectronic systems because it can automatically mark the position and size of target boxes in complex backgrounds. During the training process of the target detection model, the model is required to input a certain number of target sample images of each category, and the number of target sample images of each category is relatively balanced. However, under actual application conditions, the number of target sample images of each category is often not balanced enough, and even has large differences, resulting in a long-tail effect, which causes the classification ability of the target detection model training results to fail to reach the expected level.

[0003] Existing methods for dealing with long-tail problems mainly include:

[0004] (1) Resample the target sample images of the categories with fewer numbers in the training set. By repeatedly sampling the target sample images of the categories with fewer numbers, the number of target sample images of each category can be balanced. The disadvantage of this method is that a large number of repeated samples are introduced during the repeated sampling process, which can easily lead to overfitting of the target detection model, thereby affecting the generalization ability of the target detection model.

[0005] (2) By modifying the loss function, the target detection model's response to the category loss during training can be strengthened, which can alleviate the impact of the long tail effect to a certain extent. However, after experimental testing, this method is difficult to achieve ideal results when the number of categories varies greatly when used alone. At the same time, due to the large difference in the number of target sample images of different categories, using a unified loss function to strengthen the category may even make it difficult for the target detection model to converge.

[0006] (3) First, treat each category of target as a single foreground and train it to obtain a network that can extract foreground targets. Then fine-tune the network and finally obtain a target detection model with target classification capabilities. This method has better foreground detection capabilities. However, due to the large difference in the number of target sample images of different categories, it is often impossible to achieve the ideal classification capability when fine-tuning the model.

[0007] In summary, the existing methods for dealing with long-tail problems are difficult to enable the target detection model to achieve ideal classification results. Summary of the invention

[0008] In view of the above analysis, an embodiment of the present invention aims to provide a target detection model training method for coping with the long-tail problem, so as to solve the problem that it is difficult for the target detection model to achieve an ideal classification effect using the existing method.

[0009] The present invention discloses a target detection model training method for coping with the long-tail problem, comprising:

[0010] Acquire an initial training sample set that conforms to a long-tail distribution; wherein the initial training sample set includes a plurality of target sample images and their labels, and the label of each target sample image includes the category and target frame position of each target in the target sample image;

[0011] Using a preset background image to augment the target sample image in the initial training sample set, to obtain an updated training sample set;

[0012] The target detection model is trained based on the updated training sample set.

[0013] On the basis of the above scheme, the present invention also makes the following improvements:

[0014] Further, the updated training sample set is obtained by performing the following operations:

[0015] Randomly select a number of target sample images from the initial training sample set, fill the target frame position of the target in the randomly selected target sample images and the surrounding image area of ​​the target frame position into the same background image to form an augmented target sample image, and add a label to the formed augmented target sample image;

[0016] Repeat the operation of forming an augmented target sample image and its label to obtain multiple augmented target sample images and their labels;

[0017] Adding the obtained multiple augmented target sample images and their labels to the initial training sample set to obtain an updated training sample set;

[0018] The background image has the same size as the target sample image.

[0019] Further, the augmented target sample image is obtained by performing the following operations:

[0020] Divide the background image into N×N parts, and get N 2 predetermined areas; wherein N is a positive integer;

[0021] Randomly select M target sample images from the initial training sample set, and fill the target frame position of the target in each selected target sample image and the image area around the target frame position into the unique corresponding predetermined area to form an augmented target sample image;

[0022] Where M is a positive integer and M≤N 2 .

[0023] Further, the augmented target sample image is labeled by performing the following operations:

[0024] Keeping the category of each target in the augmented target sample image consistent with the category of the corresponding target in the selected corresponding target sample image;

[0025] Fill each target in the augmented target sample image into the target frame position in the background image as the target frame position of the corresponding target in the augmented target sample image;

[0026] According to the category and target frame position of each target in the augmented target sample image, a label of the corresponding augmented target sample image is formed.

[0027] Further, based on the updated training sample set, the target detection model is trained by executing:

[0028] Treating all target sample images in the updated training sample set as one class, training the initial target detection model to obtain a trained initial target detection model; the initial target detection model is composed of a backbone network and a plurality of conventional detection head structures connected in series;

[0029] Decoupling the regression branch and the classification branch of each conventional detection head structure in the initial target detection model, and obtaining the optimized detection head structure corresponding to each conventional detection head structure;

[0030] The parameters of the backbone network in the trained initial target detection model are fixed, and the backbone network with fixed parameters is connected in series with several optimized detection head structures to obtain an optimized target detection model;

[0031] The target detection model is trained and optimized using target sample images of all categories in the updated training sample set until the loss function converges to obtain the trained optimized target detection model.

[0032] Further, in the initial target detection model,

[0033] The input end of the backbone network receives the target sample image, and the output end of the backbone network outputs K feature maps of different scales through FPN; each feature map of each scale is input into a corresponding conventional detection head structure;

[0034] Each conventional detection head structure includes: 1 1*1*c convolutional layer, 1 3*3*c convolutional layer, c represents the number of output channels;

[0035] The output tensor of the 3*3*c convolutional layer in the kth conventional detection head structure is H k *W k*(5+nc); where (5+nc) represents the number of channels of the output result tensor, nc is the total number of target categories, 5 represents the 4 target box position parameters of the target and 1 target detection confidence, H k , W k They represent the width and height of the feature map of the input k-th conventional detection head structure respectively; the value range of k is 1 to K.

[0036] Further, the optimized detection head structure is obtained by performing the following operations:

[0037] The output of the 3*3 convolutional layer in the conventional detection head is used as the input of the classification branch and the regression branch respectively;

[0038] The classification branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, a CBAM, and an output layer connected in series.

[0039] The regression branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, and an output layer connected in series.

[0040] Perform channel superposition on the output tensor of the output end of the CBAM in the classification branch and the output tensor of the output end of the 3*3*c convolutional layer in the regression branch, and input the tensors after channel superposition into the output layer of the classification branch and the output layer of the regression branch respectively;

[0041] The output layer of the classification branch in the kth optimized detection head structure outputs H k *W k *nc,

[0042] The output layer of the regression branch in the kth optimized detection head structure outputs H k *W k *5.

[0043] Further, the trained optimized object detection model is obtained by performing the following operations:

[0044] The parameters of the backbone network are loaded into the optimized target detection model and fixed, and the parameters of the optimized detection head structure are initialized;

[0045] In the first m training cycles, the parameters of the backbone network are fixed; the target detection model is trained and optimized using the target sample images of all categories in the updated training sample set;

[0046] Afterwards, the parameters of the backbone network are unsealed, and then the target detection model is trained and optimized using target sample images of all categories in the updated training sample set until the loss function of the optimized target detection model converges.

[0047] Furthermore, the loss function of the optimized target detection model is calculated as follows:

[0048] Counting the sampling frequencies of target sample images of each category in the updated training sample set to obtain sampling frequency coefficients of target sample images of each category;

[0049] According to the predicted category probability of the optimized target detection model in each training cycle and the sampling frequency coefficient of the target sample images of each category, the loss function of the optimized target detection model in the corresponding training cycle is obtained.

[0050] Furthermore, the sampling frequency coefficient θ of the target of the i-th category clsi It is expressed as:

[0051]

[0052] Among them, S i represents the total number of targets in the i-th category in the updated training sample set, S all represents the total number of targets of all categories;

[0053] Optimize the loss function L of the target detection model regloss :

[0054] L totalloss =L regloss +λL clsloss (2)

[0055] Among them, L regloss represents the loss of the regression branch, L clsloss represents the loss of the classification branch; λ is an adjustable hyperparameter used to control the impact of the classification loss;

[0056]

[0057] Among them, a t and γ are both adjustable hyperparameters. To optimize the predicted category probability of the i-th category of the target in the target detection model.

[0058] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0059] The target detection model training method provided by the present invention copes with the long-tail problem. Aiming at the problems existing in the existing target detection model training process, an optimization method combining sample set data enhancement, decoupling and reconstruction of the detection head, and optimization of the adaptive loss function is proposed. A feasible solution is proposed to actually alleviate the long-tail effect problem of target detection, which effectively improves the detection effect.

[0060] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. In the entire drawings, the same reference symbols represent the same components;

[0062] Figure 1 A flow chart of a method for training a target detection model to address the long-tail problem provided by an embodiment of the present invention;

[0063] Figure 2 It is a schematic diagram of the structure of the initial target detection model;

[0064] Figure 3 Schematic diagram of the optimized detection head structure. DETAILED DESCRIPTION

[0065] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0066] A specific embodiment of the present invention discloses a method for training a target detection model to deal with the long-tail problem. The flow chart is as follows: Figure 1 The method comprises the following steps:

[0067] Step S1: obtaining an initial training sample set that conforms to the long-tail distribution; wherein the initial training sample set includes a plurality of target sample images and their labels, and the label of each target sample image includes the category and target frame position of each target in the target sample image.

[0068] Step S2: using a preset background image to perform image data augmentation on the target sample image in the initial training sample set to obtain an updated training sample set.

[0069] In step S2, considering that the number of targets in the target sample image is small and the background accounts for a large proportion, it is necessary to select a confidence region around the target to ensure that the region contains positive samples. Therefore, this embodiment obtains an updated training sample set by performing the following operations:

[0070] Step S21: randomly select several target sample images from the initial training sample set, fill the target frame position of the target in the randomly selected target sample images and the surrounding image area of ​​the target frame position into the same background image to form an augmented target sample image, and add a label to the augmented target sample image; wherein the background image has the same size as the target sample image. Specifically, the following steps are included:

[0071] Step S211: Obtain an augmented target sample image by performing the following operations:

[0072] Divide the background image into N×N parts (N is a positive integer; usually, N is 2 or 3 to ensure that the number of fill targets is not too large) to obtain N 2 predetermined areas; wherein N is a positive integer;

[0073] Randomly select M target sample images from the initial training sample set, and fill the target frame position of the target in each selected target sample image and the image area around the target frame position into the unique corresponding predetermined area to form an augmented target sample image;

[0074] Where M is a positive integer and M≤N 2 , at this time, the augmented target sample image can include at most N 2 Different goals of the same category.

[0075] Step S212: forming an augmented target sample image and adding a label by performing the following operations:

[0076] Keeping the category of each target in the augmented target sample image consistent with the category of the corresponding target in the selected corresponding target sample image;

[0077] Fill each target in the augmented target sample image into the target frame position in the background image as the target frame position of the corresponding target in the augmented target sample image;

[0078] According to the category and target frame position of each target in the augmented target sample image, a label of the corresponding augmented target sample image is formed.

[0079] Step S22: Repeat the operation of forming an augmented target sample image and its label to obtain multiple augmented target sample images and their labels.

[0080] Step S23: adding the obtained multiple augmented target sample images and their labels to the initial training sample set to obtain an updated training sample set.

[0081] Step S3: Training the target detection model based on the updated training sample set.

[0082] First, by treating the targets as the same category for training, a feature extraction network with foreground extraction capability is obtained, thereby increasing the detection rate of the final model. For the specific process, see step S31.

[0083] Step S31: treating all target sample images in the updated training sample set as one class, training the initial target detection model to obtain a trained initial target detection model; the initial target detection model is composed of a backbone network and several conventional detection head structures connected in series.

[0084] In the initial target detection model provided in this embodiment, the input end of the backbone network receives the target sample image, and the output end of the backbone network outputs K feature maps of different scales through FPN; each feature map of each scale is input into a conventional detection head structure. In the specific implementation process, K is generally 3, the minimum is 2, and the maximum is generally not more than 4. The purpose of outputting multiple feature maps of different scales is to output feature maps of different scales separately to achieve the purpose of detecting targets of different scales. Therefore, it can be determined according to the scale distribution characteristics of the targets in the data set.

[0085] Each conventional detection head structure includes: 1 1*1*c convolution layer, 1 3*3*c convolution layer, c represents the number of output channels. The output result tensor of the 3*3*c convolution layer in the kth conventional detection head structure is Hk*Wk*(5+nc). (5+nc) represents the number of channels of the output result tensor, nc is the total number of target categories, 5 represents the 4 target box position parameters and 1 target detection confidence, Hk ... k , W k They represent the width and height of the feature map of the kth conventional detection head structure. The value range of k is 1 to K.

[0086] During the training of the initial object detection model, feature maps of different sizes are scaled according to their scaling ratio with the original image, and the loss is calculated with the label results respectively. After the calculations are completed, the respective loss results are added together as the total loss.

[0087] Step S32: Decoupling the regression branch and the classification branch of each conventional detection head structure in the initial target detection model to obtain an optimized detection head structure corresponding to each conventional detection head structure.

[0088] The optimized detection head structure is obtained by performing the following operations:

[0089] The output of the 3*3 convolutional layer in the conventional detection head is used as the input of the classification branch and the regression branch respectively;

[0090] The classification branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, a CBAM (Convolutional Block Attention Module) and an output layer connected in series.

[0091] The regression branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, and an output layer connected in series.

[0092] Perform channel superposition on the output tensor of the output end of the CBAM in the classification branch and the output tensor of the output end of the 3*3*c convolutional layer in the regression branch, and input the tensors after channel superposition into the output layer of the classification branch and the output layer of the regression branch respectively;

[0093] The output layer of the classification branch in the kth optimized detection head structure outputs H k *W k *nc, represents the confidence level of target detection of each category corresponding to each target box position output by the classification branch.

[0094] The output layer of the regression branch in the kth optimized detection head structure outputs H k *W k *5, represents the confidence of target detection of each category and four parameters of the target box position.

[0095] It should be noted that the output layer of the classification branch and the output layer of the regression branch are respectively provided with a fully connected layer, and 1*1 convolution is used as the fully connected layer. The number of output channels of the fully connected layers of the two branches is not the same. The function is to convert the number of output channels into the required value.

[0096] Step S33: fixing the parameters of the backbone network in the trained initial target detection model, connecting the backbone network with fixed parameters in series with a plurality of optimized detection head structures to obtain an optimized target detection model;

[0097] Step S34: Utilize the target sample images of all categories in the updated training sample set to jointly train the optimized target detection model until the loss function converges, thereby obtaining the trained optimized target detection model.

[0098] Step S341: Load the parameters of the backbone network into the optimized target detection model and fix them, and initialize the parameters of the optimized detection head structure; specifically, the parameter initialization here refers to assigning initial values ​​to the parameter weights of the convolution kernel, generally using KaiMing initialization.

[0099] Step S342: in the first m training cycles, the parameters of the backbone network are fixed; the target detection model is trained and optimized using the target sample images of all categories in the updated training sample set;

[0100] Step S343: Afterwards, the parameters of the backbone network are unsealed, and then the target detection model is trained and optimized using the target sample images of all categories in the updated training sample set until the loss function of the optimized target detection model converges.

[0101] In step S34, the loss function of the optimized target detection model is calculated in the following manner:

[0102] (1) Count the sampling frequencies of target sample images of each category in the updated training sample set to obtain the sampling frequency coefficients of target sample images of each category. Among them, the sampling frequency coefficient θ of the target of the i-th category is clsi It is expressed as:

[0103]

[0104] Among them, S i represents the total number of targets in the i-th category in the updated training sample set, S all Represents the total number of objects in all categories.

[0105] That is, while strengthening the classification capability, this embodiment allocates different weight coefficients to target sample images of different categories according to their sampling frequencies. By increasing the consideration of sample sampling frequency, while strengthening the small sample category, suppressing the samples of the large number category, and making the loss function adaptively fit the target sample set, more efficient training efficiency is obtained.

[0106] (2) According to the predicted category probability of the optimized target detection model in each training cycle and the sampling frequency coefficient of the target sample images of each category, the loss function of the optimized target detection model in the corresponding training cycle is obtained.

[0107] Optimize the loss function L of the target detection model regloss :

[0108] L totalloss =L regloss +λL clsloss (2)

[0109] Among them, L regloss represents the loss of the regression branch, L clsloss Represents the loss of the classification branch; λ is an adjustable hyperparameter used to control the impact of the classification loss, with a value range of 0-1;

[0110]

[0111] Among them, a t and γ are both adjustable hyperparameters. To optimize the predicted category probability of the target of the i-th category in the target detection model, the confidence level of the target detection output by the optimized target detection model is matched. The specific matching is in the existing way and will not be repeated here. For example, a t The value range of is 0 to 1, usually 0.25. The value range of γ is 0 to 5, usually 2 or 1.5.

[0112]

[0113] Among them, I OU Represents the intersection-over-union ratio of the predicted box and the GT box (the target box in the label), ρ 2 (b,b gt ) represents the square of the distance between the centers of the prediction box and the GT box, and l is the diagonal length of the minimum bounding rectangle of the prediction box and the GT box.

[0114] To sum up, the target detection model training method for coping with the long-tail problem provided in this embodiment aims at the problems existing in the training process of the existing target detection model, and proposes an optimization method that combines sample set data enhancement, decoupling and reconstruction of the detection head, and optimization of the adaptive loss function. It proposes a feasible solution to actually alleviate the long-tail effect problem of target detection, and effectively improves the detection effect.

[0115] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0116] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A target detection model training method for dealing with long-tail problems, characterized in that: include: Acquire an initial training sample set that conforms to a long-tail distribution; wherein the initial training sample set includes a plurality of target sample images and their labels, and the label of each target sample image includes the category and target frame position of each target in the target sample image; Using a preset background image to augment the target sample image in the initial training sample set, to obtain an updated training sample set; The target detection model is trained based on the updated training sample set.

2. The object detection model training method for coping with the long-tail problem according to claim 1 is characterized in that: The updated training sample set is obtained by performing the following operations: Randomly select a number of target sample images from the initial training sample set, fill the target frame position of the target in the randomly selected target sample images and the surrounding image area of ​​the target frame position into the same background image to form an augmented target sample image, and add a label to the formed augmented target sample image; Repeat the operation of forming an augmented target sample image and its label to obtain multiple augmented target sample images and their labels; Adding the obtained multiple augmented target sample images and their labels to the initial training sample set to obtain an updated training sample set; The background image has the same size as the target sample image.

3. The target detection model training method for coping with the long-tail problem according to claim 2 is characterized in that: The augmented target sample image is obtained by performing the following operations: Divide the background image into N×N parts, and get N 2 predetermined areas; wherein N is a positive integer; Randomly select M target sample images from the initial training sample set, and fill the target frame position of the target in each selected target sample image and the image area around the target frame position into the unique corresponding predetermined area to form an augmented target sample image; Where M is a positive integer and M≤N 2 .

4. The target detection model training method for coping with the long-tail problem according to claim 3 is characterized in that: The augmented target sample image is labeled by performing the following operations: Keeping the category of each target in the augmented target sample image consistent with the category of the corresponding target in the selected corresponding target sample image; Fill each target in the augmented target sample image into the target frame position in the background image as the target frame position of the corresponding target in the augmented target sample image; According to the category and target frame position of each target in the augmented target sample image, a label of the corresponding augmented target sample image is formed.

5. The object detection model training method for coping with the long-tail problem according to any one of claims 1 to 4, characterized in that: Based on the updated training sample set, train the target detection model and execute: Treating all target sample images in the updated training sample set as one class, training the initial target detection model to obtain a trained initial target detection model; the initial target detection model is composed of a backbone network and a plurality of conventional detection head structures connected in series; Decoupling the regression branch and the classification branch of each conventional detection head structure in the initial target detection model, and obtaining the optimized detection head structure corresponding to each conventional detection head structure; The parameters of the backbone network in the trained initial target detection model are fixed, and the backbone network with fixed parameters is connected in series with several optimized detection head structures to obtain an optimized target detection model; The target detection model is trained and optimized using target sample images of all categories in the updated training sample set until the loss function converges to obtain the trained optimized target detection model.

6. The object detection model training method for coping with the long-tail problem according to claim 5 is characterized in that: In the initial target detection model, The input end of the backbone network receives the target sample image, and the output end of the backbone network outputs K feature maps of different scales through FPN; The feature maps of each scale are input into a conventional detection head structure respectively; Each conventional detection head structure includes: 1 1*1*c convolutional layer, 1 3*3*c convolutional layer, c represents the number of output channels; The output tensor of the 3*3*c convolutional layer in the kth conventional detection head structure is H k *W k *(5+nc); where (5+nc) represents the number of channels of the output result tensor, nc is the total number of target categories, 5 represents the 4 target box position parameters of the target and 1 target detection confidence, H k , W k They represent the width and height of the feature map of the input k-th conventional detection head structure respectively; the value range of k is 1 to K.

7. The object detection model training method for coping with the long-tail problem according to claim 6 is characterized in that: The optimized detection head structure is obtained by performing the following operations: The output of the 3*3 convolutional layer in the conventional detection head is used as the input of the classification branch and the regression branch respectively; The classification branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, a CBAM, and an output layer connected in series. The regression branch includes a 1*1*c convolutional layer, a 3*3*c convolutional layer, and an output layer connected in series. Perform channel superposition on the output tensor of the output end of the CBAM in the classification branch and the output tensor of the output end of the 3*3*c convolutional layer in the regression branch, and input the tensors after channel superposition into the output layer of the classification branch and the output layer of the regression branch respectively; The output layer of the classification branch in the kth optimized detection head structure outputs H k *W k *nc, The output layer of the regression branch in the kth optimized detection head structure outputs H k *W k *5.

8. The object detection model training method for coping with the long-tail problem according to claim 7 is characterized in that: The trained optimized object detection model is obtained by performing the following operations: The parameters of the backbone network are loaded into the optimized target detection model and fixed, and the parameters of the optimized detection head structure are initialized; In the first m training cycles, the parameters of the backbone network are fixed; the target detection model is trained and optimized using the target sample images of all categories in the updated training sample set; Afterwards, the parameters of the backbone network are unsealed, and then the target detection model is trained and optimized using target sample images of all categories in the updated training sample set until the loss function of the optimized target detection model converges.

9. The object detection model training method for coping with the long-tail problem according to claim 8, characterized in that: The loss function for optimizing the object detection model is calculated as follows: Counting the sampling frequencies of target sample images of each category in the updated training sample set to obtain sampling frequency coefficients of target sample images of each category; According to the predicted category probability of the optimized target detection model in each training cycle and the sampling frequency coefficient of the target sample images of each category, the loss function of the optimized target detection model in the corresponding training cycle is obtained.

10. The object detection model training method for coping with the long-tail problem according to claim 9, characterized in that: The sampling frequency coefficient θ of the target of the i-th category clsi It is expressed as: Among them, S i represents the total number of targets in the i-th category in the updated training sample set, S all represents the total number of targets of all categories; Optimize the loss function L of the target detection model regloss : THE totalloss =L regloss +λL clsloss (2) Among them, L regloss represents the loss of the regression branch, L clsloss represents the loss of the classification branch; λ is an adjustable hyperparameter used to control the impact of the classification loss; Among them, a t and γ are both adjustable hyperparameters. To optimize the predicted category probability of the i-th category of the target in the target detection model.