A method for household garbage image recognition based on knowledge distillation learning

By constructing a garbage image data set and using the knowledge distillation method, the knowledge in the complex model is transferred to a small parameter model, which solves the problem of large parameters and scarcity of data sets in deep learning models in garbage classification, and achieves efficient garbage image classification. Recognition accuracy improvement and model deployment.

CN114529819BActive Publication Date: 2024-08-27HEFEI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210166872.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2024-08-27
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

Existing deep learning models have a large number of parameters and slow inference speed in garbage classification, making it difficult to deploy on mobile terminals. The lack of sufficient garbage image data sets limits the improvement of model performance.

Method used

By constructing a domestic waste image data set and using the knowledge distillation method, the knowledge in the complex model is transferred to a small parameter model, and the SSD teacher model and Mobilenetv2-SSD student model are used for distillation learning to improve the recognition accuracy of the student model.

Benefits of technology

It is possible to improve the accuracy of domestic waste image recognition and the portability of the model while keeping the model parameters unchanged, and solve the problems of insufficient accuracy of small models and scarcity of data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529819B
    Figure CN114529819B
Patent Text Reader

Abstract

A method for identifying domestic garbage images based on knowledge distillation learning relates to the technical field of garbage classification and data information processing. The steps are as follows: by setting different acquisition variables to simulate the surrounding environment of the garbage in its real state; by fine-tuning the teacher model, the teacher model and the student model have the same network detection head, so that they can be distilled and learned; then the fine-tuned teacher model and student model are trained on the data set to obtain weight parameters; loss functions are designed for the backbone network and the network detection head respectively, the obtained weight parameters are loaded, and distillation learning is performed; finally, the recognition results are output. The present invention improves the recognition accuracy of garbage images by a small parameter model through the construction of a domestic garbage image data set and the method of knowledge distillation, thereby realizing rapid and accurate recognition of domestic garbage images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of garbage classification and data information processing, and in particular to a method for recognizing household garbage images based on knowledge distillation learning. Background Art

[0002] In recent years, the revival of artificial intelligence technology and the continuous development of related theories have provided new opportunities for tackling difficulties in other disciplines, such as medicine, finance, education, etc., and it plays an increasingly important role in these fields and has more and more extensive applications. Deep learning in artificial intelligence can learn the inherent laws and representation levels of sample data, and can recognize data such as text, images and sounds. The advantages of deep learning in image recognition make garbage image recognition based on deep learning solve the problem of household garbage classification.

[0003] Although the classification of domestic waste has attracted people's attention, some excellent waste classification methods have been produced. In the Chinese patent CN106005807A, Fu Qiming and others invented an automatic classification trash can through infrared sensing technology. In the journal "Heilongjiang Science and Technology Information", Volume 24, 2015, pages 82-84, Yang Xiuxiu, Ma Libing and others developed an intelligent classification trash can system for garbage classification. In 2018, in the journal "Harbin Institute of Technology", Zhou Yingmin proposed a machine vision-based intelligent sorting system for domestic waste and designed an improved algorithm based on the Faster-RCNN target detection model. Ma Wen, Yu Jiong and others proposed a garbage detection and classification method based on the improved Faster R-CNN in "Computer Engineering" Volume 47, 2021, pages 294-300, achieving an identification accuracy of 81.77%. In Canada, the artificial intelligence trash can equipped with a computer vision system-"Oscar" is widely used in the identification and delivery of domestic waste classification, and has become a model for artificial intelligence technology to assist in the classification of domestic waste.

[0004] The above methods all focus on the design of tools for garbage classification or the improvement of recognition accuracy. Take Faster R-CNN as an example. As a second-order target detection algorithm, although it has good accuracy, the model faces the disadvantages of large number of parameters and slow reasoning speed. As intelligent garbage classification becomes more and more popular, it costs a lot to deploy models with large parameters on mobile terminals, while small models face the problem of insufficient accuracy. In addition, the annotated, public data sets required for deep learning are currently unclear, which seriously limits the development of research fields such as target recognition and garbage classification.

[0005] At the same time, deep learning systems require massive amounts of data to achieve better performance, but currently there is a shortage of garbage image datasets available for research. On the other hand, although some deep models maintain high accuracy, the number of model parameters is extremely large, which makes it very difficult to deploy the model on mobile devices.

[0006] Knowledge distillation is the process of transferring the hidden knowledge in a complex model (teacher model) to a simple model (student model). Generally speaking, the teacher model has more parameters and strong performance, while the student model has fewer parameters and general performance. Through knowledge distillation, the student model can be as close as possible to or even better than the teacher, thereby achieving similar prediction results with less complexity.

[0007] Based on the above technical problems, the present invention aims to provide a method for recognizing domestic waste images based on knowledge distillation learning, which improves the recognition accuracy of waste images by a small-parameter model by constructing a domestic waste image dataset and using an organic knowledge distillation method. Summary of the invention

[0008] The purpose of the present invention is to propose a method for domestic waste image recognition based on knowledge distillation learning, which improves the recognition accuracy of garbage images by a small parameter model by constructing a domestic waste image dataset and using the knowledge distillation method, thereby achieving fast and accurate recognition of domestic waste images.

[0009] In order to achieve the above object, the technical solution adopted by the present invention is:

[0010] A method for household garbage image recognition based on knowledge distillation learning, the steps are as follows:

[0011] (1) The construction of the data set, by setting different acquisition variables, is used to simulate the environment around the real garbage. For samples with fewer images, an automated amplification method is used to balance the sample size.

[0012] (2) By fine-tuning the teacher model, the teacher model and the student model have the same network detection head, so that they can be distilled and learned; then the fine-tuned teacher model and student model are trained on the data set to obtain the weight parameters;

[0013] (3) Design loss functions for the backbone network and the network detection head respectively, load the obtained weight parameters, and perform distillation learning;

[0014] (4) Finally output the recognition result.

[0015] This patent first established 30 common types of household waste, and manually annotated and automatically amplified them, resulting in about 18,000 garbage images after amplification. Then, the SSD model was used to detect and evaluate the dataset, which can identify and locate the types of garbage in the image. Finally, in order to improve the portability of the model and facilitate the deployment of the model on mobile terminals, the teacher model and the student model were distilled through the knowledge distillation method, which improved the accuracy of the student model.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0017] (1) The present invention creates a new garbage dataset that can be used to compare the performance of currently common garbage identification target detection algorithms, solving the problem of lack of datasets for deep learning applications in the field of garbage classification.

[0018] (2) In the face of the problem of low precision of small models, the present invention adopts a knowledge distillation method to improve the recognition performance of the student model for domestic waste images through learning between the SSD teacher model and the Mobilenetv2-SSD student model. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of the method for household waste image recognition based on knowledge distillation learning of the present invention.

[0020] Figure 2 This is an example of automated amplification of samples using a paper cup as an example.

[0021] Figure 3 This is the knowledge distillation structure diagram.

[0022] Figure 4 The following are the visual recognition results of one target (a) and multiple targets (b) using the recognition method of the present invention. DETAILED DESCRIPTION

[0023] like Figure 1As shown, the method for domestic waste image recognition based on knowledge distillation learning proposed in the present invention creates a new data set for waste recognition, and adopts the method of knowledge distillation to improve the performance of the small model in recognizing domestic waste. The method specifically includes: (1) Construction of a data set, by setting different collection variables to simulate the surrounding environment of the garbage in its real state. For samples that are difficult to collect, an automated amplification method is used to balance the sample size. (2) By fine-tuning the teacher model, the teacher model and the student model have the same network detection head, so that they can be distilled and learned. Then the fine-tuned teacher model and student model are trained on the data set to obtain weight parameters. (3) The loss function is designed for the backbone network and the network detection head respectively, and the obtained weight parameters are loaded for distillation learning. (4) The recognition result is finally output.

[0024] The present invention proposes a method for household garbage image recognition based on knowledge distillation learning, and its specific steps are as follows:

[0025] Step 1: Dataset collection ideas and automated amplification methods

[0026] 1.1 Dataset Collection Ideas

[0027] Compared with traditional detection methods, deep learning systems require a large amount of data. Therefore, this step selects some typical residential garbage and builds a residential garbage dataset through self-photography and network collection, which contains 30 small categories of residential garbage, as shown in Table 1.

[0028] Table 1 Classification of household waste

[0029]

[0030]

[0031] Due to the sensitivity of convolutional neural networks to spatial positions, the same object at different positions in the image will be considered as two different objects by the convolutional neural network. Therefore, each type of image collection has different sample examples, complex angles, backgrounds and lighting.

[0032] Taking the photographing of a paper cup as an example, the acquisition conditions are as follows:

[0033] 1) Sample examples: Select multiple paper cups as samples for shooting.

[0034] 2) Angle: Take photos of each paper cup from six angles: top view, left, right, front, and back.

[0035] 3) Lighting: Photograph each paper cup under strong light, indoor light, and dim light.

[0036] 4) Background: Photograph each paper cup on a cement floor, a gravel floor, or a dirt floor.

[0037] Regarding the data set collection, first, the data was collected by 6 researchers with basic knowledge of computer vision using mobile phones of different resolutions according to the above collection conditions. Then, for samples that are difficult to collect or rare in number, they are obtained by web crawling. The final data set is the original data set.

[0038] 1.2 Automated Amplification Method

[0039] Due to the different difficulty levels of collecting and obtaining different types of garbage, the number of images of each type of garbage is also different. In order to ensure that each type of garbage has a relatively balanced number, the types of garbage with fewer images are amplified, which can more fairly and comprehensively evaluate the model performance. On the one hand, data set amplification can increase the complexity of the scene, on the other hand, it can alleviate the overfitting of the model and also give the model stronger generalization capabilities. Therefore, for samples with a small number of original images in the original data set obtained, an automated amplification method is implemented through the Python language, and the following operations are performed for the sparse samples in turn:

[0040] 1) Add Gaussian noise:

[0041] Gaussian noise, as the name implies, is a type of noise that follows a Gaussian distribution (normal distribution). By indexing each pixel in the image, a random Gaussian noise with a variance of 1.5 is added to each pixel.

[0042] 2) Add salt and pepper noise:

[0043] Salt and pepper noise, also known as impulse noise, randomly changes some pixel values ​​in the image and adds salt and pepper noise with a noise density of 1.5 to each image.

[0044] 3) Dim processing: traverse the pixel values ​​of each garbage image and adjust the pixel brightness to 1.6 times the original pixel.

[0045] 4) Brightness processing: traverse the pixel values ​​of each garbage image and adjust the pixel brightness to 0.4 times the original pixel.

[0046] 5) Scaling and rotation processing: The center of each image is the origin, rotated 45° and 135° counterclockwise, and reduced to 0.7 times the original image.

[0047] Taking a paper cup as an example, after amplification, a paper cup image can be formed as follows: Figure 2 After the original dataset was expanded, a total of about 18,000 garbage image datasets HGI-30 were obtained. The number of garbage images in each category is shown in Table 2.

[0048] Table 2 Number of each type of junk images in HGI-30 (18178 images)

[0049]

[0050] Step 2: Model fine-tuning and training results

[0051] The object detection network is mainly composed of a backbone feature network (backbone) and a detection head (head), where the detection head includes regression prediction (reg) and classification prediction (cls) of the target object. The loss function of knowledge distillation is also composed of the loss function of the backbone network and the loss function of the detection head.

[0052] 2.1 Fine-tuning of the teacher model

[0053] The backbone feature network of the teacher model SSD is VGG16, and the network detection head is head-SSD. The network detection head extracts six feature layers from VGG16: conv4_3 (38*38*512), conv7 (19*19*1024), conv6_2 (10*10*1024), conv7_2 (5*5*256), conv8_2 (3*3*256), and conv9_2 (1*1*256). Set 4, 6, 6, 6, 4, and 4 prior frames (num_anchors) on each feature point of these 6 extracted feature layers respectively. Then perform num_anchors×4 and num_anchors×num_classes convolution operations on each extracted feature layer, where num_anchors×4 convolution is used to predict the changes in the four coordinates of each prior frame, and num_anchors×num_classes convolution is used to predict the corresponding object type in each prior frame. The calculation formula for the number of SSD prior frames obtained is as follows:

[0054] Total_number=(38*38*4)+(19*19*6)+(10*10*6)+(5*5*6)+(3*3*4)+(1*1*4)=8732 (1)

[0055] The number of prior frames included in head-Mob corresponding to the student model Mobilenetv2-SSD is 3000, so it is necessary to replace the SSD detection head head-SSD with head-Mob. The replacement method steps are as follows:

[0056] 1) After the feature layer of conv8_2 (3*3*256) in SSD, conv8_2 (3*3*256) is compressed to conv8_3 (2*2*256) through a convolution operation with a convolution kernel size of 2*2 and a step size of 1.

[0057] 2) Select conv7(19*19*1024), conv6_2(10*10*1024), conv7_2(5*5*256), conv8_2(3*3*256), conv8_3(2*2*256), and conv9_2(1*1*256) from VGG16 respectively, and set 6, 6, 6, 6, 6, 6 prior frames (num_anchors) on each feature point of these 6 extracted feature layers respectively. The calculation formula for the number of modified SSD prior frames is as follows:

[0058] Total_number=(19*19*6)+(10*10*6)+(5*5*6)+(3*3*6)+(2*2*6)+(1*1*6)=3000 (2)

[0059] 2.2 Training Results

[0060] First, the garbage image dataset HGI-30 is divided into a training set (trainset), a validation set (validation set) and a test set (testset) in the ratio of 8:1:1. The training set is used to guide the learning of the model, the validation set is used to adjust the hyperparameters and monitor whether the model is overfitting to decide whether to stop training, and the test set is used to evaluate the model performance.

[0061] Then, SSD and the fine-tuned Mobilenetv2-SSD are trained on the training set (trainset) respectively to obtain the training weights of the teacher model and the student model, and the obtained weights are tested on the test set. According to the test results, the performance of the teacher model and the student model is evaluated.

[0062] Step 3: Design of knowledge distillation

[0063] The target detection task can be divided into the target classification task and regression task, which are used to determine the type and location of the target respectively. In knowledge distillation, the student model can improve the accuracy by imitating the output of the backbone network and the output of the network detection head. The core part is the design of the loss function, which will be introduced from the perspective of the backbone network loss, classification loss and regression loss. Since the teacher model and student model used in knowledge distillation are SSD and Mobilenetv2-SSD respectively, the loss function of knowledge distillation is also composed of the loss function of the backbone network and the loss function of the network detection head. When the loss function gradually converges, it means that the gap between the two is gradually narrowing, and the student model is gradually approaching the performance of the teacher model.

[0064] 3.1 Backbone Network Loss Function

[0065] Different backbone networks have different corresponding feature extraction capabilities. The backbone network of the teacher model has better extraction capabilities and learns more features. Distilling the backbone network features can make up for the shortcomings of the backbone network of the student model.

[0066] The garbage image dataset HGI-30 and training weights obtained in step 1 and step 2 are fed into the teacher model and the student model respectively, and the feature layers corresponding to the teacher and student models are selected for distillation learning, namely, conv7 (19*19*1024), conv6_2 (10*10*1024), conv7_2 (5*5*256), conv8_2 (3*3*256), conv8_3 (2*2*256), conv9_2 (1*1*256). In formula (3), V is the feature layer of the student model, and Z is the feature layer of the teacher model. L Hint As the backbone network loss function, this step aims to narrow the gap between the backbone features of the teacher and student models.

[0067]

[0068] 3.2 Classification Loss Function

[0069] Feed the garbage dataset image into the teacher model. The teacher model will first extract the feature layer of the image, and the detection head will then extract the category information P of the target contained in the feature layer in step 3.1. t and coordinate information R t , and output. In formula (4), Z t It represents the category information output by the detection head of the teacher model, which is the part that the student model needs to imitate and learn. T is the temperature. The larger T is, the flatter the distribution of the model output is. When T is 1, it is the original distribution. The temperature T and the softmax function work together to soften the distribution, that is, to adjust the probability distribution of the output result. The teacher model adjusts the probability distribution of the output result according to P. t, adjust the parameters through directional propagation. Similarly, the detection head of the student network outputs category information as P s and coordinate information R s , as shown in formula (5).

[0070]

[0071]

[0072] The obtained P t and P s , through L soft The information in the teacher network can be combined to improve the performance of the student model. c is a weight parameter used to distinguish the target from the background. The classification error rate can be adjusted by adjusting the weights of the target and the background, as shown in formula (6). hard The true label and the output P of the student model s Composition, where y is the true category, P s is the output of the student model. Its purpose is to adjust the probability distribution of the student model output through the true label, as shown in formula (7).

[0073] L soft (P s , P t )=-∑w c P t log(P s ) (6)

[0074] L hard (P s , y) = -∑ylog(P s ) (7)

[0075] In the knowledge distillation method, the classification loss function of the student network is shown in formula (8), which is composed of L hard and L soft The probability distribution of L is composed of. Among them, μ is a hyperparameter used to balance L hard and L soft The proportional relationship between them.

[0076]

[0077] 3.3 Regression Loss Function

[0078] The regression of the target position coordinates is mainly completed by the detection head, which extracts the coordinate information R of the target contained in the feature layer in step 3.2 t and R s , and output. The regression loss mainly consists of two parts. One part is the student's regression output R s and the true label yreg The smoothL1 loss between the coordinate information and the student model R s , Teacher Model R t and the true label y reg Regression composition, the premise is that the student model regression result R s and the true label y reg The L2 distance is greater than the teacher model regression result R t and the true label y reg The L2 distance of is shown in formulas (9) and (10).

[0079]

[0080]

[0081] 3.4 Network Detection Head Loss

[0082] The classification and regression loss functions obtained in steps 3.2 and 3.3, the loss function of the distilled structure detection head part is composed of the classification loss function and the regression loss function in different proportions, as shown in formula (11), where N is the number of positive samples, and λ is used to adjust the ratio between the two.

[0083]

[0084] 3.5 Total Loss Function

[0085] The total loss function of knowledge distillation consists of two parts, including the loss function of the backbone network in step 3.1 and the loss function of the network detection head in step 3.4. γ is a hyperparameter used to adjust the ratio between the loss of the detection head and the loss of the backbone network. When the total loss function is minimized, it means that the performance of the student model is closest to the performance of the teacher model. As shown in formula (12).

[0086] L total =L head +γL nint (12)

[0087] Step 4: Output results

[0088] Using the above knowledge distillation method, through the learning between the SSD teacher model and the Mobilenetv2-SSD student model (the overall structure diagram is as follows Figure 3 As shown in Table 3, the accuracy of the model is improved while keeping the parameters of the student model unchanged.

[0089] Table 3 Test results

[0090] Model Model size (MB) mAP Teacher Model SSD 100 0.807 Undistilled Mobilenetv2-SSD 13.1 0.749 Mobilenetv2-SSD after distillation 13.1 0.765

[0091] pass Figure 4 It can also be clearly seen from the visualization results shown that the recognition method of the present invention can quickly and accurately recognize junk images.

[0092] The above contents are merely examples and explanations of the concept of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A method for household garbage image recognition based on knowledge distillation learning, It is characterized in that Here are the steps: (1) The construction of the data set, by setting different acquisition variables, is used to simulate the environment around the real garbage. For samples with fewer images, an automated amplification method is used to balance the sample size. The automated amplification method performs the following steps for samples that are rare: 1) Add Gaussian noise: by indexing each pixel on the image, add random Gaussian noise with a variance of 1.5 to each pixel; 2) Add salt and pepper noise: Add salt and pepper noise with a noise density of 1.5 to each image; 3) Dim processing: traverse the pixel values ​​of each garbage image and adjust the pixel brightness to 1.6 times the original pixel; 4) Brightness processing: traverse the pixel values ​​of each garbage image and adjust the pixel brightness to 0.4 times the original pixel; 5) Scaling and rotation processing: The center of each image is the origin, and it is rotated 45° and 135° counterclockwise, and reduced to 0.7 times the original image; After the above amplification steps, the garbage image dataset HGI-30 is finally obtained; (2) By fine-tuning the teacher model, the teacher model and the student model have the same network detection head, so that they can be distilled and learned; then the fine-tuned teacher model and student model are trained on the data set to obtain the weight parameters; the specific steps are: ① Fine-tuning of the teacher model The backbone feature network of the teacher model SSD is VGG16, and the network detection head is head-SSD; the network detection head extracts six feature layers conv4_3 (38*38*512), conv7 (19*19*1024), conv6_2 (10*10*1024), conv7_2 (5*5*256), conv8_2 (3*3*256), and conv9_2 (1*1*256) from VGG16; 4, 6, 6, 6, 4, and 4 prior frames are set on each feature point of the 6 extracted feature layers respectively; and then num_anchors×4 and num_anchors×num_classes convolution operations are performed on each extracted feature layer, where num_anchors×4 convolution is used to predict the changes in the four coordinates of each prior frame, and num_anchors×num_classes convolution is used to predict the corresponding object type in each prior frame; the calculation formula for the number of SSD prior frames obtained is as follows: Total_number=(38*38*4)+(19*19*6)+(10*10*6)+(5*5*6)+(3*3*4)+(1*1*4)=8732(1) The number of prior frames included in head-Mob corresponding to the student model Mobilenetv2-SSD is 3000, so it is necessary to replace the SSD detection head head-SSD with head-Mob; the replacement method steps are as follows: 1) After the feature layer of conv8_2 (3*3*256) in SSD, conv8_2 (3*3*256) is compressed to conv8_3 (2*2*256) through a convolution operation with a convolution kernel size of 2*2 and a step size of 1; 2) Select conv7(19*19*1024), conv6_2(10*10*1024), conv7_2(5*5*256), conv8_2(3*3*256), conv8_3(2*2*256), and conv9_2(1*1*256) from VGG16 respectively, and set 6, 6, 6, 6, 6, 6 prior frames on each feature point of these 6 extracted feature layers respectively. The calculation formula for the number of modified SSD prior frames is as follows: Total_number=(19*19*6)+(10*10*6)+(5*5*6)+(3*3*6)+(2*2*6)+(1*1*6)=3000(2) ②Training results First, the garbage image dataset is divided into training set, validation set and test set in the ratio of 8:1:

1. The training set is used to guide the learning of the model, the validation set is used to adjust the hyperparameters and monitor whether the model is overfitting to decide whether to stop training, and the test set is used to evaluate the model performance. Then, SSD and the fine-tuned Mobilenetv2-SSD are trained on the training set to obtain the training weights of the teacher model and the student model, and the obtained weights are tested on the test set. According to the test results, the performance of the teacher model and the student model is evaluated; (3) Design loss functions for the backbone network and the network detection head respectively, load the obtained weight parameters, and perform distillation learning; (4) Finally output the recognition result.

2. A method for recognizing household garbage images based on knowledge distillation learning as claimed in claim 1, It is characterized in that In step (1), typical domestic waste is selected and a domestic waste dataset is constructed through self-photography and network collection. Each type of image collection has different sample examples, complex angles, backgrounds and lighting.

3. The method for recognizing household garbage images based on knowledge distillation learning as claimed in claim 1, It is characterized in that The specific steps in step (3) are: ① Backbone network loss function The obtained garbage image dataset HGI-30 and training weights are fed into the teacher model and the student model respectively, and the feature layers corresponding to the teacher and student models are selected for distillation learning, namely, conv7 (19*19*1024), conv6_2 (10*10*1024), conv7_2 (5*5*256), conv8_2 (3*3*256), conv8_3 (2*2*256), and conv9_2 (1*1*256). In formula (3), V is the feature layer of the student model, and Z is the feature layer of the teacher model; L Hint As the backbone network loss function, this step aims to narrow the gap between the backbone features of the teacher and student models; ②Classification loss function Feed the garbage dataset image into the teacher model. The teacher model will first extract the feature layer of the image, and the detection head will then extract the category information P of the target contained in the feature layer. t and coordinate information R t , and output; In formula (4), Z t It represents the category information output by the detection head of the teacher model, which is the part that the student model needs to imitate and learn; T is the temperature. The larger T is, the flatter the distribution of the model output is. When T is 1, it is the original distribution. The temperature T and the softmax function jointly play a softening role, that is, adjusting the probability distribution of the output result; the teacher model is based on P t , adjust the parameters through directional propagation; similarly, the detection head of the student network outputs category information as P s and coordinate information R s , as shown in formula (5); The obtained P t and P s , through L soft The information in the teacher network can be combined to improve the performance of the student model; where W c is a weight parameter used to distinguish the target from the background. The classification error rate can be adjusted by adjusting the weights of the target and the background, as shown in formula (6); L hard The true label and the output P of the student model s Composition, where y is the true category, P s is the output of the student model; its purpose is to adjust the probability distribution of the student model output through the true label, as shown in formula (7); L soft (P s ,P t )=-Σw c P t log(P s ) (6) L hard (P s ,y)=-∑ylog(P s ) (7) In the knowledge distillation method, the classification loss function of the student network is shown in formula (8), which is composed of L hard and L soft The probability distribution of L hard and L soft The proportional relationship between them; ③Regression loss function The regression of the target position coordinates is mainly completed by the detection head, which extracts the coordinate information R of the target contained in the feature layer. t and R s , and output; the regression loss mainly consists of two parts, one is the student's regression output R s and the true label y reg The smoothL1 loss between the coordinate information and the student model R s , Teacher Model R t and the true label y reg Regression composition, the premise is that the student model regression result R s and the true label y reg The L2 distance is greater than the teacher model regression result R t and the true label y reg The L2 distance of is shown in formulas (9) and (10); ④Network detection head loss The classification and regression loss functions obtained in steps ② and ③, the loss function of the distilled structure detection head part is composed of the classification loss function and the regression loss function in different proportions, as shown in formula (11), where N is the number of positive samples, and λ is used to adjust the ratio between the two; ⑤Total loss function The total loss function of knowledge distillation consists of two parts, including the loss function of the backbone network in step ① and the loss function of the network detection head in step ④; γ is a hyperparameter used to adjust the ratio between the detection head loss and the backbone network loss; when the total loss function is the smallest, it means that the student model performance is closest to the teacher model performance; as shown in formula (12); THE total =L head +γL Hint (12)。