Model distillation real-time target detection method and device based on pseudo label filtering

By employing a model distillation method based on pseudo-label filtering, combined with random affine transformation and depthwise separable convolution, and optimizing the student model structure, the problems of high computational resource requirements and sensitivity to illumination and viewing angle in existing real-time object detection methods are solved, achieving high-precision and efficient real-time object detection.

CN117011640BActive Publication Date: 2025-10-24NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310815686.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2025-10-24
Estimated Expiration
2043-07-04

AI Technical Summary

Technical Problem

Existing real-time target detection methods require a large amount of computing resources and are sensitive to changes in lighting and viewing angle, making it difficult to accurately detect and locate targets in complex and ever-changing environments.

Method used

A model distillation method based on pseudo-label filtering is adopted. The student model is trained by the teacher model, the dataset is expanded by combining random affine transformation, the student model structure is optimized by using a depthwise separable convolution module, and the knowledge distillation loss is adjusted to improve the model's generalization ability and real-time performance.

Benefits of technology

It improves the generalization ability and real-time performance of the target detection model, reduces model overfitting, and achieves high-precision detection under multi-view and occlusion conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117011640B_ABST
    Figure CN117011640B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of model distillation real-time target detection method and device based on pseudo-label filtering, based on teacher model to student model is trained, then input the data to be measured into the student model trained and obtains real-time target detection result.Based on teacher model to student model is trained first to obtain expansion data set, then input expansion data set into the teacher model trained, again the generated pseudo-label data set is input quality classifier to generate new pseudo-label data set, then the new pseudo-label data set and the union of original data are respectively input student model and the teacher model trained, then based on detection result, the original loss of student model and the knowledge distillation loss between two models are calculated, finally according to original loss and knowledge distillation loss, the overall loss is calculated to update student model parameter reversely.The present application target detection model is high in real-time and strong in generalization ability, and the method is high in detection precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target detection, in particular to a model distillation real-time target detection method and device based on pseudo-label filtering. BACKGROUND

[0002] The purpose of real-time target detection is to detect and identify objects in images or videos under real-time requirements. Real-time target detection has a wide range of applications in automatic driving, security monitoring, smart home, medical imaging, and other fields.

[0003] In recent years, the development of deep learning technology has provided strong support for the research of real-time target detection. Currently, the application of deep learning in real-time target detection mainly falls into two categories: (1) single-stage detection method: single-stage detection method usually uses convolutional neural network (CNN) structure for feature extraction and classification, and detects objects by the position and size of the regression box. Typical single-stage detection algorithms include YOLO and SSD, etc.; (2) two-stage detection method: two-stage detection method usually generates candidate boxes through convolutional neural network first, and then classifies and locates the candidate boxes. Typical two-stage detection algorithms include RCNN, Fast RCNN, and Faster-RCNN, etc. In general, real-time target detection technology has developed rapidly and improved in recent years, and new methods and algorithms are constantly being proposed, which makes real-time target detection have a more extensive application prospect in practical applications.

[0004] However, the training of existing target detection methods usually requires a large amount of labeled data to learn the features and context information of the target. Due to the complexity and diversity of the target detection task, in order to obtain better performance, deep network models need to be used, such as convolutional neural network (CNN) based or Transformer based models. These models usually have millions to billions of parameters, requiring a large amount of computing resources and storage space, and have poor real-time performance in the model inference stage. And the existing real-time target detection method is usually sensitive to changes in light and angle. Different angles, angles, occlusions, etc. will cause the appearance of the target in the image to change, which will affect the size and shape of the target, making it difficult for existing target detection methods to accurately detect and locate the target. When the camera zooms in, the angle changes, and the target is occluded, the generalization ability of the existing target detection method becomes poor. SUMMARY

[0005] Therefore, it is necessary to provide a model distillation real-time target detection method and device based on pseudo-label filtering with high real-time performance and strong generalization ability to solve the above technical problems.

[0006] In a first aspect, the present application provides a model distillation real-time target detection method based on pseudo label filtering, a student model is trained based on a teacher model, and then a to-be-detected data image is input into the trained student model to obtain a real-time target detection result, the teacher model and the student model are both target detection models, the teacher model has more layers than the student model, and the teacher model has a larger depth than the student model;

[0007] The training of the student model based on the teacher model specifically includes the following steps:

[0008] An augmented data set image is obtained;

[0009] The teacher model is trained based on the augmented data set image, the augmented data set image is input into the trained teacher model, and a pseudo label data set is generated;

[0010] The pseudo label data set is input into a quality classifier to generate a new pseudo label data set;

[0011] The new pseudo label data set and a union of original data are respectively input into the student model and the trained teacher model to obtain a detection result and a pre-training result, respectively;

[0012] The original loss of the student model is calculated based on the detection result, and a knowledge distillation loss is calculated based on the detection result and the pre-training result;

[0013] The overall loss is calculated according to the original loss of the student model and the knowledge distillation loss;

[0014] The parameters of the student model are adjusted based on the overall loss to obtain a trained student model.

[0015] In one of the embodiments, the augmented data set image is obtained by:

[0016] An original data set is obtained;

[0017] The original data set is subjected to random affine transformation.

[0018] In one of the embodiments, the teacher model is a YOLOv5-l model, and the teacher model is trained based on the augmented data set image for 300 epochs;

[0019] The quality classifier is a positive and negative sample quality separator.

[0020] In one of the embodiments, the original loss of the student model includes a confidence loss, a category loss and a bounding box regression loss;

[0021] The confidence is

[0022] L CE_obj =-αlog(β)-(1-α)log(1-β) (1).

[0023] In the formula, element β represents the probability that the sample belongs to the foreground or the background, that is, the confidence value of the bounding box, and α is a flag indicating whether the target is contained in the real label, α = 1 indicating that the target is contained, and α = 0 indicating that the target is not contained;

[0024] The category loss is

[0025]

[0026] In the formula, p(x) is an actual obtained probability distribution, and each element p i represents the probability that the sample belongs to the i-th category, y i = 1 when the sample belongs to the i-th category, and 0 otherwise, and nc is the total number of categories of the sample.

[0027] The bounding box regression loss is

[0028]

[0029] In the formula, c is the smallest rectangle containing the predicted box and the real box, b gt is the real box, b is the predicted box, ρ(b gt , b) represents the Euclidean distance between the centers of the real box and the predicted box, β is a parameter for balancing the weights of functions, and v is a parameter for measuring the consistency of the length-width ratio between the two boxes, the IoU term and α represent an additional power regularization term.

[0030] The original loss of the student model is

[0031] L STU = λ1×L CE_cls + λ2×L CE_obj + λ3×L α-CIoU (4);

[0032] In the formula, λ1 is 0.3, λ2 is 0.4, and λ3 is 0.3.

[0033] In one embodiment, the knowledge distillation loss is

[0034]

[0035] In the formula, m and n represent the rows and columns of the output result tensor, and output T , output S are the output results of the teacher model and the student model, respectively.

[0036] In one embodiment, the overall loss is

[0037] L total = α1×L STU + α2×LDistill (6);

[0038] In the formula, a1 is 0.8, and a2 is 0.2.

[0039] In one of the embodiments, the parameters of the student model are adjusted based on the overall loss, and the trained student model is obtained by back-propagating the overall loss to the student model to adjust the parameters of the student model and obtain the trained student model.

[0040] In one of the embodiments, the deep separable convolution module is used to replace the traditional convolutional neural network module in the feature extraction part of the student model.

[0041] In one of the embodiments, the training of the student model based on the teacher model further includes, after obtaining the trained student model, performing transfer training on the trained student model using the original data.

[0042] In a second aspect, the present application also provides a model distillation real-time target detection device based on pseudo-label filtering, which comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the model distillation real-time target detection based on the pseudo-label filtering when executing the computer program.

[0043] The present application has the following beneficial effects:

[0044] (1) The present application uses random affine transformation operation to simulate different viewing angles and lighting conditions, including image translation, scaling, rotation, and shearing, to simulate target position changes, target size changes at different distances, targets at different viewing angles, and target partial occlusion, convert the original label, expand the data set image, and improve the detection effect of multi-view targets, occluded targets, and multi-scale targets, improve the generalization ability of the target detection model, i.e., the student model, and reduce the overfitting of the student model.

[0045] (2) The present application simultaneously trains the teacher model and the student model, replaces the traditional convolutional neural network module in the feature extraction part of the student model with the deep separable convolution module, optimizes and designs the structure of the deep learning neural network model, then combines the model distillation method to learn and fuse the model, transfers the knowledge of a complex teacher model to the student model, the student model has fewer layers and smaller depth, achieves the effect of lightweight, and makes the student model have higher detection accuracy while further improving the real-time performance and generalization ability of the student model. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo-label filtering provided by the embodiments of the present application;

[0047] Figure 2 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo label filtering provided by the embodiment of the application;

[0048] Figure 3 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo label filtering provided by the embodiment of the application;

[0049] Figure 4 The student model structure schematic diagram provided by the embodiment of the application after the deep separable convolution module is used to replace the traditional convolutional neural network module of the feature extraction part. DETAILED DESCRIPTION

[0050] In order to make the object, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and not to limit the application.

[0051] In one embodiment, as shown in Figure 1 , Figure 1 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo label filtering provided by the embodiment of the application, which is applied to a computer device and includes the following steps:

[0052] S101, training the student model based on the teacher model.

[0053] Specifically, the student model is trained using the teacher model, that is, the knowledge of the teacher model is transferred to the student model.

[0054] S102, inputting the to-be-tested data image into the trained student model to obtain a real-time target detection result.

[0055] Specifically, the teacher model and the student model are both target detection models, the number of layers of the teacher model is more than that of the student model, and the depth of the teacher model is greater than that of the student model.

[0056] In this embodiment, as shown in Figure 2 , Figure 2 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo label filtering provided by the embodiment of the application, and the training of the student model based on the teacher model specifically includes the following steps:

[0057] S201, obtaining an expanded data set image.

[0058] S202, training the teacher model based on the expanded data set image, inputting the expanded data set image into the trained teacher model, and generating a pseudo label data set.

[0059] Specifically, the output of the teacher model is the pseudo label, and we represent the dataset image as X U , and the teacher model F T : X U → Y U , and a temperature factor T is introduced when training the teacher model to adjust the Softmax probability distribution to generate pseudo labels. When the value of T is small, the negative label will become smaller, and the subsequent student model used for training will also reduce the attention to the negative label. The pseudo label is defined as:

[0060]

[0061] soft_labels=softmax(Y U / T)

[0062] S203, input the pseudo label dataset into the quality classifier to generate a new pseudo label dataset.

[0063] After random affine transformation, many severely deformed original data images are used to train the student model. According to the detection results of the teacher model, the quality classifier is used to select appropriate pseudo label samples, and the filtered samples account for 5% to 20% of the total samples.

[0064] S204, input the new pseudo label dataset and the original data set into the student model and the trained teacher model respectively to obtain the detection results and the pre-training results.

[0065] It should be noted that the student model usually selects a model of the same series algorithm as the teacher model. Then the new pseudo label dataset and the original dataset are input into the student model for training, so that the student model can learn the knowledge in the teacher model.

[0066] The new pseudo label dataset and the original dataset are reconstructed to represent the dataset image as X C , the label as Y C , and the student model F S : The prediction result of the student model is represented as:

[0067]

[0068] S205, calculate the original loss of the student model based on the detection result, and calculate the knowledge distillation loss based on the detection result and the pre-training result. The output of the teacher model is regarded as the pseudo label, and the student model needs to imitate the output of the teacher model as much as possible.

[0069] S206, calculate the overall loss according to the original loss and the knowledge distillation loss of the student model.

[0070] S207, adjust the parameters of the student model based on the overall loss to obtain a trained student model.

[0071] In the embodiment, the knowledge of a complex teacher model is transferred to the student model through model learning and fusion, so that the student model has higher detection accuracy.

[0072] In one of the embodiments, as shown in Figure 3 Figure 3 is one of the process schematic diagrams of the model distillation real-time target detection method based on pseudo-label filtering provided by the embodiment of the application. The embodiment relates to how to obtain an expanded data set image. On the basis of the above embodiment, step S201 comprises:

[0073] S301, obtaining an original data set.

[0074] S302, performing random affine transformation on the original data set.

[0075] Specifically, the random affine transformation is an image distortion method based on random sampling. The following are the basic steps for implementing the random affine transformation:

[0076] Randomly generating affine matrix parameters: the affine matrix parameters include randomly generating a rotation angle, randomly generating a scaling ratio, randomly generating a translation distance, and randomly generating a shear parameter, etc. The random affine transformation can be realized by the above random matrix parameters.

[0077] Constructing an affine transformation matrix: according to the generated affine matrix parameters, an affine transformation matrix is constructed to realize the affine transformation of the image.

[0078] Performing affine transformation on the image: applying the constructed affine transformation matrix to the original data set to realize the random affine transformation. It should be noted that the original data set is a set of originally collected images.

[0079] As shown in Table 1, the parameters of the 3x3 affine transformation matrix are given in detail:

[0080] Table 1 Parameters of the affine transformation matrix

[0081] sx x cos(0) -sy x sin(0 + hx) tx -sx x sin(0 + hy) sy x cos(0) ty 0 0 1

[0082] Wherein, sx and sy represent the scaling ratio of the image along the x-axis and y-axis, tx and ty are the translation distances of the image along the x-axis and y-axis, θ represents the rotation angle, and hx and hy are the shear parameters of the image along the x-axis and y-axis. Random affine transformation can increase the diversity and quantity of the data set, simulate different distances, angles and occlusions of the target through scaling, rotation and shear, and thus improve the detection accuracy and generalization ability of the model.

[0083] ​The random affine transformation operation is used to simulate different viewing angles and lighting conditions, including image translation, scaling, rotation, and shearing, to simulate target position changes, size changes of the target at different distances, targets at different viewing angles, and target parts being occluded. The original data set is converted and the data set image is expanded, which can improve the detection effect of multi-view targets, occluded targets and multi-scale targets, and thus the generalization ability of the target detection model can be improved and the overfitting of the target detection model can be reduced.

[0084] In an optional embodiment, the teacher model is a YOLOv5-l model, and the teacher model is trained for 300 epochs based on the expanded data set image.

[0085] In one of the embodiments, the original loss of the student model includes a confidence loss, a class loss and a bounding box regression loss.

[0086] The confidence is

[0087] L CE_obj =-αlog(β)-(1-α)log(1-β) (1);

[0088] In the formula, the element β represents the probability that the sample belongs to the foreground or the background, that is, the confidence value of the bounding box, and α is a flag indicating whether the target is contained in the real label. α = 1 indicates that the target is contained, and α = 0 indicates that the target is not contained.

[0089] It should be noted that the sample in the present embodiment refers to the data in the data set composed of the new pseudo-label data set and the original data set.

[0090] It should be noted that the confidence loss and the class loss are calculated using cross-entropy. Entropy is a measure of information uncertainty and is widely used in communication and information fields. For a random variable X with probability distribution f(x), the entropy is as shown in formula (9):

[0091] f(x)=-∫p(x)logp(x)dx (9);

[0092] Cross-entropy is used to measure the uncertainty of the predicted class and confidence. The greater the value of entropy, the greater the uncertainty, and the worse the prediction result; the smaller the value of entropy, the smaller the uncertainty, and the more accurate the prediction result.

[0093] For each target, the student model outputs a class probability distribution indicating the probability that the target belongs to each class. For each target, the real label has only one class. Therefore, the cross-entropy loss function can be used to evaluate the gap between the predicted class of the model and the real label.

[0094] The class loss is

[0095]

[0096] where p(x) is an actual obtained probability distribution, each element p i represents the probability that the sample belongs to the i-th class, y i =1 when the sample belongs to the i-th class, and 0 otherwise, and nc is the total number of classes of the sample.

[0097] The bounding box regression loss is

[0098]

[0099] where c is the minimum rectangle containing both the predicted box and the ground truth box, b gt is the ground truth box, b is the predicted box, ρ(b gt ,b) represents the Euclidean distance between the centers of the ground truth box and the predicted box, β is a parameter used to balance the weight of the function, and v is a parameter used to measure the consistency of the length-width ratio between the two boxes. The IoU term and α represent an additional power regularization term.

[0100] In the target detection model, the most commonly used loss function for bounding box regression is the IoU series. The original IoU series expression used to calculate the loss can be represented by equations (10) and (11):

[0101]

[0102] L IoU =1-IoU (11);

[0103] where b gt is the ground truth box, and b is the predicted box. The present embodiment adopts a new power IoU loss series to measure the knowledge distillation loss, which has an IoU term and an additional power regularization term represented by a parameter α. α-IoU is a power intersection family for bounding box regression loss. By adjusting α, the weight of the loss and gradient of high IoU objects is adaptively increased to improve the accuracy of bounding box regression. The above α-IoU loss is extended to a more general form, as shown in equation (12):

[0104]

[0105] where α1=α2=3 is generally taken, represents any penalty term calculated based on b and b gt . The above IoU can be replaced by any GIoU, DIoU, CIoU, , and the corresponding penalty term in its formula. The present patent adopts α-CIoU for the loss function calculation formula of bounding box regression, as shown in equation (3), and the calculation formulas of v and β are shown in equations (13) and (14).

[0106]

[0107] The original loss of the student model is

[0108] L STU =λ1×L CE_cls +λ2×L CE_obj +λ3×L α-CIoU (4);

[0109] Where λ1 is 0.3, λ2 is 0.4, and λ3 is 0.3.

[0110] In one embodiment, the knowledge distillation loss is

[0111]

[0112] In the formula, m, n represent the rows and columns of the output tensor, output T , output S The output results of the teacher model and the student model respectively.

[0113] In one embodiment, the overall loss is

[0114] L total =α1×L STU +α2×L Distill (6);

[0115] Where α1 is 0.8 and α2 is 0.2.

[0116] In one embodiment, the parameters of the student model are adjusted based on the overall loss, and the trained student model is obtained by backpropagating the overall loss to the student model, adjusting the student model parameters, and the obtained student model is the trained student model.

[0117] Commonly used target detectors all use deep convolutional neural networks. In one embodiment, a deep separable convolutional module is used to replace the traditional convolutional neural network module in the feature extraction part of the student model. Figure 4 As shown, Figure 4 A schematic diagram of the student model structure after using a depthwise separable convolution module to replace the traditional convolutional neural network module in the feature extraction part provided by an embodiment of the present invention. Applying the depthwise separable convolution to the last three convolution layers of the feature extraction (Backbone) network of the target detection model can reduce the number of model parameters and the amount of computation while maintaining model accuracy. The depthwise separable convolution module can decompose the convolution operation, decomposing the traditional convolution operation into two operations: depthwise convolution and pointwise convolution. Depthwise separable convolution can be used to accelerate the calculation of convolutional neural networks and reduce the number of model parameters and the amount of computation while maintaining model accuracy.

[0118] In this embodiment, a deep separable convolution module is used instead of a traditional convolution operation, a lightweight network feature extraction structure is designed, and the target detection model structure is optimized to further improve the real-time performance of the model.

[0119] Deep convolution refers to separating the channel convolution (Channel-wise Convolution) and spatial convolution (Spatial Convolution) of the standard convolution. Assuming that the shape of the input feature map is [H, W, C], and the shape of the convolution kernel is [k, k, C, D], where k represents the size of the convolution kernel, C represents the number of channels of the input feature map, and D represents the number of channels of the output feature map. Then the calculation process of deep convolution can be represented as:

[0120] (1) For each output channel d, use a convolution kernel with a size of [k, k, C] to convolve each channel of the input feature map to obtain a two-dimensional feature map of [H, W].

[0121] (2) Concatenate all the two-dimensional feature maps along the channel dimension to obtain an output feature map with a shape of [H, W, D].

[0122] Point-wise convolution refers to using a convolution kernel with a size of [1, 1, D, D'] to convolve the feature map obtained by deep convolution. The role of point-wise convolution is to interact the information between each channel, and to fuse the low-level features and high-level features in the feature map obtained by deep convolution. Assuming that the output feature map obtained by deep convolution has a shape of [H, W, D], and the convolution kernel of point-wise convolution has a shape of [1, 1, D, D'], then the calculation process of point-wise convolution can be represented as:

[0123] (1) For each position [i, j] in the output feature map, use a convolution kernel with a size of [1, 1, D] to perform weighted summation on each channel of the feature map obtained by deep convolution to obtain a vector with a length of D.

[0124] (2) Concatenate all the vectors along the channel dimension to obtain an output feature map with a shape of [H, W, D'].

[0125] Combining the above two operations, the calculation process of deep separable convolution is: first perform deep convolution to obtain a feature map with a shape of [H, W, D], and then perform point-wise convolution to obtain an output feature map with a shape of [H, W, D'].

[0126] In one of the embodiments, the training of the student model based on the teacher model further includes, after obtaining the trained student model, performing transfer training on the trained student model using the original data.

[0127] Preferably, the present application uses a test dataset to evaluate the overall performance of the final generated student model. The detection accuracy of the model is evaluated using indicators such as precision and recall, mAP@0.5, etc. The frame rate (FPS) or inference time (ms) is used to measure the inference speed of the model, and a higher frame rate or shorter inference time indicates that the model has faster real-time performance.

[0128] Based on the same inventive concept, the embodiments of the present application also provide a pseudo-label filtering based model distillation real-time target detection device for implementing the pseudo-label filtering based model distillation real-time target detection method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more pseudo-label filtering based model distillation real-time target detection device embodiments provided below can be referred to the limitations of the pseudo-label filtering based model distillation real-time target detection method described above, which will not be described here again.

[0129] In one embodiment, the pseudo-label filtering based model distillation real-time target detection device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the pseudo-label filtering based model distillation real-time target detection.

[0130] It should be understood that although each step in the flowchart involved in each embodiment described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.

[0131] The above-described embodiments only express several embodiments of the present application, which are described in detail and specifically, but should not be understood as a limitation on the scope of the patent of the present application. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A model distillation real-time target detection method based on pseudo label filtering, characterized in that, The student model is trained based on the teacher model, and then the to-be-tested data image is input into the trained student model to obtain a real-time target detection result, the teacher model and the student model are target detection models, the teacher model has more layers than the student model, and the teacher model has a larger depth than the student model; The training of the student model based on the teacher model specifically includes the following steps: Obtaining an expanded data set image; Training the teacher model based on the expanded data set image, inputting the expanded data set image into the trained teacher model, and generating a pseudo-label data set; Inputting the pseudo-label data set into a quality classifier to generate a new pseudo-label data set; Inputting the new pseudo-label data set and the union of the original data into the student model and the trained teacher model respectively to obtain a detection result and a pre-training result respectively; Calculating the original loss of the student model based on the detection result, and calculating the knowledge distillation loss based on the detection result and the pre-training result; Calculating the overall loss based on the original loss of the student model and the knowledge distillation loss; Adjusting the parameters of the student model based on the overall loss to obtain a trained student model; Obtaining an expanded data set image includes: Obtaining an original data set; Randomly performing affine transformation on the original data set; The teacher model is a YOLOv5-l model, and the teacher model is trained for 300 epochs based on the expanded data set image; The quality classifier is a positive and negative sample quality separator.

2. The model distillation real-time object detection method based on pseudo label filtering according to claim 1, characterized in that, The original loss of the student model includes confidence, class loss and bounding box regression loss; The confidence is L CE_obj = -a log(β) - (1 - a) log(l - β) (1); In the formula, the element β represents the probability that the sample belongs to the foreground or the background, that is, the confidence value of the bounding box, α is a flag indicating whether the target is contained in the real label, α = 1 indicates that the target is contained, and α = 0 indicates that the target is not contained; The class loss is where p(x) is an actual obtained probability distribution, each element p i represents the probability that the sample belongs to the i-th class, y i = 1 when the sample belongs to the i-th class, and 0 otherwise, and nc is the total number of classes of the sample. The bounding box regression loss is where c is the minimum rectangle containing both the predicted box and the ground truth box, b gt is the ground truth box, b is the predicted box, ρ(b gt ,b) represents the Euclidean distance between the centers of the ground truth and predicted boxes, β is a parameter used to balance the weights of the functions, v is a parameter used to measure the consistency of the aspect ratio between two boxes, the IoU term and a represent an additional power regularization term; The original loss of the student model is L STU = λ1 x L CE_cls + λ2 x L CE_obj + λ3 x L α-CIoU (4); In the formula, λ1 is 0.3, λ2 is 0.4, and λ3 is 0.

3.

3. The model distillation real-time object detection method based on pseudo label filtering according to claim 2, characterized in that, The knowledge distillation loss is In the formula, m, n represent the rows and columns of the output result, output T , output S respectively the output results of the teacher model and the student model.

4. The model distillation real-time object detection method based on pseudo label filtering according to claim 3, characterized in that, The overall loss is L total = a1 x L STU + a2 x L Distill (6) In the formula, α1 is 0.8, and α2 is 0.

2.

5. The model distillation real-time object detection method based on pseudo label filtering according to claim 4, characterized in that, Adjusting the parameters of the student model based on the overall loss to obtain a trained student model is to back-propagate the overall loss to the student model, adjust the parameters of the student model, and obtain a trained student model.

6. The pseudo-label filtering based model distillation real-time object detection method according to claim 1, characterized in that, The deep separable convolution module is used to replace the traditional convolution neural network module in the feature extraction part of the student model.

7. The pseudo-label filtering based model distillation real-time object detection method according to any one of claims 2 to 6, characterized in that, The training of the student model based on the teacher model further includes, after obtaining the trained student model, using the original data to perform transfer training on the trained student model.

8. A pseudo-label filtering based model distillation real-time target detection device, comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to realize the steps of the method in any one of claims 1 to 7. The processor executes the computer program to realize the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Substation image target detection method based on scale context

    CN114882208A

  • SAR (Synthetic Aperture Radar) image target detection method combined with high-credibility knowledge distillation

    CN115761511A