Visual target detection method oriented to intelligent driving and based on cross-exchange distillation

By adopting a visual object detection method based on cross-swap distillation in the intelligent driving system, the target conflict problem in knowledge distillation is solved, and the performance of visual object detection and the ability to adapt to diverse scenarios is improved.

CN119445539AActive Publication Date: 2025-02-14TIANJIN NORMAL UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510032769.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-02-14
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

The visual object detection method for knowledge distillation in the prior art has a problem of target conflict, which leads to interference in the training process, affecting the optimization effect, which leads to low average accuracy of visual object detection and poor adaptability to diverse scenarios. powerful.

Method used

A visual object detection method based on cross-swap distillation for intelligent driving is proposed. By constructing a deep learning visual transformation object detection teacher network and student network, it uses cross-entropy loss, square error loss, cross-swap loss and distillation loss to optimize , realize the cross-exchange of visual feature maps between teacher networks and student networks to solve the problem of target conflicts.

Benefits of technology

Effectively convey the soft label and bounding box information of the target category of the teacher network, solve the goal conflict problem in the training process, enable the student model to approach the performance of the teacher model under limited resources, and improve the visual goals in the intelligent driving system. Average accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445539A_ABST
    Figure CN119445539A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an intelligent driving-oriented visual target detection method based on cross-exchange distillation. The method comprises the following steps: constructing a visual transformation target detection teacher network; inputting the training detection image in the training set into a teacher network to optimize the training detection image; constructing a detection image feature depth transformation student network; calculating a loss value of a generated target category soft label by using adaptive focus loss, and calculating a loss value of a generated target category bounding box by using hybrid intersection-parallel ratio loss; and jointly optimizing the student network by combining the two loss values so as to realize visual target detection by utilizing the optimized student network. According to the method, visual target detection is carried out by fully utilizing a cross interchange distillation method, and a student network can learn more accurate target category bounding box positioning under the supervision of a teacher network. According to the method, the average precision of visual target detection is effectively improved, and the adaptability to diversified scenes is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision and artificial intelligence, and specifically relates to a visual target detection method based on cross-interchange distillation for intelligent driving. Background Art

[0002] In recent years, with the rapid development of autonomous driving and intelligent transportation systems, visual object detection methods for intelligent driving have received widespread attention, aiming to achieve accurate recognition and positioning of objects in the environment to improve the vehicle's autonomous perception capabilities. However, since deep learning models usually have a large number of parameters and complex calculation processes, efficient deployment in resource-limited embedded devices or vehicle systems faces huge challenges. Therefore, how to optimize the model structure to reduce computational complexity and memory usage while ensuring model performance has become an important research direction in this field.

[0003] At present, a feasible solution is to perform knowledge distillation. Knowledge distillation is a technology that improves the performance of lightweight models by transferring knowledge between teacher models and student models. Its core idea is to let the more complex and high-performance teacher model guide the smaller and simplified student model, so that the student model can also approach the performance of the teacher model under limited resource conditions. Wang et al. proposed a fine-grained feature imitation method, which guides the student model to imitate the feature response of the teacher model at a position close to the true bounding box of the target category by utilizing the prior knowledge of the target category's true bounding box. Li et al. designed a Rank Mimicking method, which passes the target category ranking distribution of the teacher model to the student model in a global manner by comparing the detection results of the teacher model and the student model, thereby narrowing the gap in detection performance between the two. Yang et al. proposed focal distillation and global distillation methods. Focal distillation enables the student model to focus on the key pixels and channels of the teacher model's visual feature map, while global distillation transfers the global relationship between pixels, thereby compensating for the information lost in focal distillation. Bang et al. used radar data to train a visual target detection network, divided the radar image features into active and inactive regions according to the activation intensity, and performed selective feature distillation on these regions, thereby promoting the effective transfer of radar image features from the teacher network to the student network.

[0004] In the process of implementing the present invention, the inventors found that the visual target detection method for knowledge distillation in the prior art has a target conflict problem. Specifically, the student model needs to imitate both the real target category and the prediction of the teacher model during training, which causes the student model to be disturbed during the training process, affecting the optimization effect, and further resulting in low average accuracy of visual target detection and poor adaptability to diverse scenarios. Summary of the invention

[0005] The present invention provides a visual target detection method based on cross-interchange distillation for intelligent driving. The purpose of the present invention is to solve the technical problem of target conflict existing in the visual target detection method based on knowledge distillation, so as to effectively improve the average accuracy of visual target detection and enhance the adaptability to diversified scenes.

[0006] In order to achieve the above object, the present invention proposes a visual target detection method based on cross-interchange distillation for intelligent driving, which comprises the following steps:

[0007] Step S1, constructing a visual transformation target detection teacher network based on deep learning;

[0008] Step S2, determining a training set, inputting the training detection images in the training set into the visual transformation target detection teacher network based on deep learning, so as to optimize the visual transformation target detection teacher network based on deep learning, and obtain a trained visual transformation target detection teacher network;

[0009] Step S3, based on the trained visual transformation target detection teacher network, construct a detection image feature deep transformation student network, freeze the weight of the trained visual transformation target detection teacher network, and input the training detection images in the training set into the constructed detection image feature deep transformation student network and the visual transformation target detection teacher network with frozen weights, respectively, to obtain corresponding prediction results;

[0010] Step S4, based on the prediction results generated by the detection image feature deep transformation student network and the trained visual transformation target detection teacher network, for the soft label and bounding box of the target category, calculate the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of the training detection image;

[0011] Step S5, randomly selecting M detection images in each small batch to form a small batch sample, and calculating the total loss of the small batch sample according to the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of each detection image in the small batch sample, so as to optimize the detection image feature deep transformation student network to obtain an optimized detection image feature deep transformation student network;

[0012] Step S6, based on the optimized detection image feature deep transformation student network, extract the features of the image to be detected for target recognition, and obtain the result of visual target detection.

[0013] Optionally, the step S1 includes the following steps:

[0014] Step S11, constructing a feature extraction module in the deep learning-based visual transformation target detection teacher network ;

[0015] Step S12, constructing a feature transformation module in the deep learning-based visual transformation target detection teacher network ;

[0016] Step S13, constructing a result prediction module in the deep learning-based visual transformation target detection teacher network , combining the feature extraction modules , feature transformation module And the result prediction module , and obtain the deep learning-based visual transformation target detection teacher network.

[0017] Optionally, step S2 includes the following steps:

[0018] Step S21, preprocessing the training detection images in the training set;

[0019] Step S22, the training detection images obtained after preprocessing are sequentially input into the feature extraction module of the visual transformation target detection teacher network based on deep learning and feature transformation module , obtaining a visual feature map of the training detection image;

[0020] Step S23, inputting the visual feature map of the training detection image into the result prediction module of the visual transformation target detection teacher network based on deep learning , predicting the target category soft label and target category bounding box of the training detection image;

[0021] Step S24, based on the predicted target category soft label and target category bounding box of the training detection image, using cross entropy loss Sum squared error loss The deep learning-based visual transformation target detection teacher network is jointly optimized to obtain a trained visual transformation target detection teacher network.

[0022] Optionally, in step S24, the cross entropy loss Sum squared error loss The overall optimization loss function composed of It is expressed as:

[0023] ,

[0024] in, and They respectively represent the weights of controlling the corresponding losses.

[0025] Optionally, step S3 includes the following steps:

[0026] Step S31, constructing a feature extraction module in the student network for deep transformation of the detected image features , Feature Transformation Module And the result prediction module , and then combine them to obtain the detected image feature deep transformation student network;

[0027] Step S32: input the training detection images in the training set into the feature extraction module of the detection image feature depth transformation student network in sequence. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the detected image feature deep transformation student network result prediction module The prediction result corresponding to the training detection image is obtained ;

[0028] Step S33, under the supervision of the trained visual transformation target detection teacher network, the weights of the trained visual transformation target detection teacher network are kept in a frozen state, and the training detection images are sequentially input into the feature extraction module of the trained visual transformation target detection teacher network. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network The prediction result corresponding to the training detection image is obtained ;

[0029] Step S34, exchanging the visual feature map and visual feature maps , the visual feature map Input to the detected image feature deep transformation student network result prediction module Get the prediction results , and the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network Get the prediction results .

[0030] Optionally, step S4 includes the following steps:

[0031] Step S41, deeply transforming the prediction result generated by the student network based on the detected image features and the actual target category of the training detection image, using the cross entropy loss Sum squared error loss Calculate the cross entropy loss value for each training detection image Sum squared error loss ;

[0032] Step S42, generating prediction results based on the detected image feature depth transformation student network and the trained visual transformation target detection teacher network and , using adaptive focal loss and mixed intersection-over-union loss Calculate the cross-interchange loss value for each training test image ;

[0033] Step S43, generating prediction results based on the trained visual transformation target detection teacher network and , using adaptive focal loss and mixed intersection-over-union loss Calculate the distillation loss value for each training detection image .

[0034] Optionally, in step S42, adaptive focus loss It is expressed as:

[0035] ,

[0036] in, represents the weight used to adjust the loss function, Indicates that it is used to control The strength of represents the soft label predicted by the student network for each target category, represents the soft label predicted by the teacher network for each target category, is the predicted soft label and The KL divergence between and The difference between.

[0037] Optionally, in step S42, the mixed intersection-and-combination ratio loss It is expressed as:

[0038] L mix = l 1 [ 1 − IoU ( b S , b T )] + l 2 d cent 2 ( b S , b T ) k 2 + l 3 | c − ( b S ∪ b T ) | | c | ,

[0039] in, , and They represent the weights for adjusting the corresponding losses, represents the target category bounding box coordinate value predicted by the student network, represents the target category bounding box coordinate value predicted by the teacher network, express and The intersection ratio between express and The Euclidean distance between the center points, express and The length of the diagonal of the minimum enclosing rectangle, express and The minimum bounding rectangle of represents the area difference between the two, express and The area of ​​the minimum enclosing rectangle.

[0040] Optionally, in step S42, the cross-exchange loss value It is expressed as:

[0041] ,

[0042] in, Represents the weight controlling the adaptive focal loss.

[0043] Optionally, in step S43, the distillation loss value It is expressed as:

[0044] ,

[0045] in, Represents the weight controlling the mixed intersection-over-union loss.

[0046] The beneficial effects of the present invention are as follows: the present invention proposes a cross-interchange distillation visual target detection method, which not only effectively transfers the target category soft label and bounding box information of the teacher network by cross-interchanging the visual feature maps of the teacher network and the student network, but also solves the problem of target conflict in the training process. As a result, the student model can approach the performance of the teacher model under the condition of limited resources, and improves the average accuracy of visual target detection in the intelligent driving system. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1It is a flowchart of a visual target detection method based on cross-interchange distillation for intelligent driving according to one embodiment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0049] Figure 1 is a flow chart of a visual target detection method based on cross-interchange distillation for intelligent driving according to an embodiment of the present invention. Figure 1 Take some specific implementation processes of the present invention as an example. Figure 1 As shown, the visual target detection method based on cross-interchange distillation for intelligent driving includes the following steps:

[0050] Step S1, constructing a visual transformation target detection teacher network based on deep learning;

[0051] Furthermore, the step S1 includes the following steps:

[0052] Step S11, constructing a feature extraction module in the deep learning-based visual transformation target detection teacher network ;

[0053] In one embodiment of the present invention, the feature extraction module in the deep learning-based visual transformation target detection teacher network It is obtained by sequentially connecting a convolutional layer with a stride of 2 and 4 residual blocks. Each residual block is composed of three convolutional layers of 1×1, 3×3, and 1×1 connected in sequence. The 1×1 convolutional layer is used for dimensionality reduction and dimensionality increase, respectively, and the 3×3 convolutional layer is used for feature extraction.

[0054] Step S12, constructing a feature transformation module in the deep learning-based visual transformation target detection teacher network ;

[0055] In one embodiment of the present invention, the feature transformation module in the deep learning-based visual transformation target detection teacher network It includes a visual feature encoding layer, a visual feature construction layer and a fully connected layer in sequence. The visual feature encoding layer includes a layer normalization structure, a multi-head self-attention structure and a multi-layer perceptron structure in sequence. In one embodiment of the present invention, the number of layers of the visual feature encoding layer is set to 8, wherein each layer includes the above three structures; the visual feature construction layer includes a multi-head cross-attention structure and a multi-layer perceptron structure in sequence. In one embodiment of the present invention, the number of layers of the visual feature construction layer is set to 1.

[0056] Among them, the layer normalization structure, multi-head self-attention structure, multi-layer perceptron structure and multi-head cross-attention structure are commonly used deep learning algorithm structures in the field, and the present invention will not introduce them in detail.

[0057] Step S13, constructing a result prediction module in the deep learning-based visual transformation target detection teacher network , combining the feature extraction modules , feature transformation module And the result prediction module , and obtain the deep learning-based visual transformation target detection teacher network.

[0058] In one embodiment of the present invention, the result prediction module in the deep learning-based visual transformation target detection teacher network It consists of 5 sequentially connected fully connected layers.

[0059] Step S2, determining a training set, inputting the training detection images in the training set into the visual transformation target detection teacher network based on deep learning, so as to optimize the visual transformation target detection teacher network based on deep learning, and obtain a trained visual transformation target detection teacher network;

[0060] Furthermore, the step S2 comprises the following steps:

[0061] Step S21, preprocessing the training detection images in the training set;

[0062] In one embodiment of the present invention, preprocessing the training detection image includes: adjusting the size of the training detection image to a predetermined size, such as 512 512, scale down all pixel values ​​in the training detection image to a preset range, such as between 0 and 1. Then subtract the global average value of each pixel value in the training detection image from the global average value of the image and divide it by the standard deviation of the image to reduce the brightness difference between different images.

[0063] Step S22, the training detection images obtained after preprocessing are sequentially input into the feature extraction module of the visual transformation target detection teacher network based on deep learning and feature transformation module , obtaining a visual feature map of the training detection image;

[0064] In one embodiment of the present invention, the size of the visual feature map is P 1024, where P is the preset maximum number of targets in a detection image, and 1024 is the dimension of the visual feature map. When training under the COCO dataset, the size of P can be set to 20.

[0065] Step S23, inputting the visual feature map of the training detection image into the result prediction module of the visual transformation target detection teacher network based on deep learning , predicting the target category soft label and target category bounding box of the training detection image;

[0066] In one embodiment of the present invention, the result prediction module The size of the output prediction result is 20 6. Among them, 6 represents the dimension of the output result. The first 4 dimensions represent the coordinate values ​​of the target category bounding box, the fifth dimension represents the confidence of the target category, and the sixth dimension represents the soft label of the target category.

[0067] Step S24, based on the predicted target category soft label and target category bounding box of the training detection image, using cross entropy loss Sum squared error loss The deep learning-based visual transformation target detection teacher network is jointly optimized to obtain a trained visual transformation target detection teacher network.

[0068] Among them, the cross entropy loss is Sum squared error loss The overall optimization loss function composed of It is expressed as:

[0069] ,

[0070] in, and Respectively represent the weights of controlling the corresponding losses. In one embodiment of the present invention, the weights and The value can be set to 1 and 3.

[0071] The process of optimizing a deep learning-based network model through a loss function is a technique that those skilled in the art should master, and the present invention does not provide too many explanations on the specific optimization process.

[0072] Furthermore, in step S24, the cross entropy loss It can be expressed as:

[0073] ,

[0074] Where N represents the number of target categories, represents the first soft labels for target categories, is the one-hot encoding of the true target category. Class time ,otherwise .

[0075] Furthermore, in step S24, the square error loss It can be expressed as:

[0076] ,

[0077] in, represents the first The coordinate values ​​of the bounding box of the target category, Represents the coordinate value of the corresponding real bounding box, Represents the squared error of each bounding box coordinate value.

[0078] Step S3, based on the trained visual transformation target detection teacher network, construct a detection image feature deep transformation student network, freeze the weight of the trained visual transformation target detection teacher network, and input the training detection images in the training set into the constructed detection image feature deep transformation student network and the visual transformation target detection teacher network with frozen weights, respectively, to obtain corresponding prediction results;

[0079] Furthermore, step S3 includes the following steps:

[0080] Step S31, constructing a feature extraction module in the student network for deep transformation of the detected image features , Feature Transformation Module And the result prediction module , and then combine them to obtain the detected image feature deep transformation student network;

[0081] In one embodiment of the present invention, the feature extraction module in the detection image feature deep transformation student network It is obtained by sequentially connecting a convolutional layer with a stride of 2 and 4 residual blocks, where each residual block is composed of 2 sequentially connected 3×3 convolutional layers for feature extraction. The feature transformation module in the student network of the detection image feature deep transformation It includes a visual feature encoding layer, a visual feature construction layer and a fully connected layer in sequence. The visual feature encoding layer includes a layer normalization structure, a multi-head self-attention structure and a multi-layer perceptron structure in sequence. In one embodiment of the present invention, the number of layers of the visual feature encoding layer is set to 4, wherein each layer includes the above three structures; the visual feature construction layer includes a multi-head cross-attention structure and a multi-layer perceptron structure in sequence. In one embodiment of the present invention, the number of layers of the visual feature construction layer is set to 1.

[0082] Step S32: input the training detection images in the training set into the feature extraction module of the detection image feature depth transformation student network in sequence. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the detected image feature deep transformation student network result prediction module The prediction result corresponding to the training detection image is obtained ;

[0083] In one embodiment of the present invention, the visual feature map of the training detection image The size is 20 1024, where 20 indicates that 20 target categories may be detected in the image, and 1024 is the visual feature map The dimension of The size is 20 6.

[0084] Step S33, under the supervision of the trained visual transformation target detection teacher network, the weights of the trained visual transformation target detection teacher network are kept in a frozen state, and the training detection images are sequentially input into the feature extraction module of the trained visual transformation target detection teacher network. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network The prediction result corresponding to the training detection image is obtained ;

[0085] In one embodiment of the present invention, the visual feature map The size is 20 1024, the prediction result The size is 20 6.

[0086] Step S34, exchanging the visual feature map and visual feature maps , the visual feature map Input to the detected image feature deep transformation student network result prediction module Get the prediction results , and the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network Get the prediction results .

[0087] In one embodiment of the present invention, the prediction result and Size is 20 6.

[0088] Step S4, based on the prediction results generated by the detection image feature deep transformation student network and the trained visual transformation target detection teacher network, for the soft label and bounding box of the target category, calculate the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of the training detection image;

[0089] Furthermore, the step S4 comprises the following steps:

[0090] Step S41, deeply transforming the prediction result generated by the student network based on the detected image features and the actual target category of the training detection image, using the cross entropy loss Sum squared error loss Calculate the cross entropy loss value for each training detection image Sum squared error loss ;

[0091] In one embodiment of the present invention, the Kuhn-Munkres matching algorithm is first used to transform the prediction results generated by the student network in the detection image feature depth for each target category. Match an optimal prediction result, that is, the result closest to the true value, and then use the cross entropy loss Sum squared error loss Calculate the cross entropy loss value for each training detection image Sum squared error loss .

[0092] Step S42, generating prediction results based on the detected image feature depth transformation student network and the trained visual transformation target detection teacher network and , using adaptive focal loss and mixed intersection-over-union loss Calculate the cross-interchange loss value for each training test image ;

[0093] In one embodiment of the present invention, the cross-interchange loss value of the training detection image is for:

[0094] ,

[0095] in, represents the weight for controlling the adaptive focus loss. In one embodiment of the present invention, the weight The value can be set to 0.4.

[0096] The prediction results generated by calculating the detection image feature depth transformation student network and the trained visual transformation target detection teacher network and By cross-exchanging the loss values ​​between them, the prediction ability of the student network can be made close to that of the teacher network. At the same time, this method avoids the student network from imitating both the prediction results of the teacher network and the true target category.

[0097] Furthermore, the adaptive focus loss It is expressed as:

[0098] ,

[0099] in, represents the weight used to adjust the loss function, Indicates that it is used to control The strength of represents the soft label predicted by the student network for each target category, represents the soft label predicted by the teacher network for each target category, is the predicted soft label and The KL divergence between and The difference between.

[0100] In one embodiment of the present invention, the The value of is set to 0.25, The value of can be expressed as:

[0101] ,

[0102] in, The value of is related to the soft label of the target category predicted by the student network.

[0103] Furthermore, the mixed intersection-to-combination ratio loss It is expressed as:

[0104] L mix = l 1 [ 1 − IoU ( b S , b T )] + l 2 d cent 2 ( b S , b T ) k 2 + l 3 | c − ( b S ∪ b T ) | | c | ,

[0105] in, , and They represent the weights for adjusting the corresponding losses, represents the target category bounding box coordinate value predicted by the student network, represents the target category bounding box coordinate value predicted by the teacher network, express and The intersection ratio between express and The Euclidean distance between the center points, express and The length of the diagonal of the minimum enclosing rectangle, express and The minimum bounding rectangle of represents the area difference between the two, express and The area of ​​the minimum enclosing rectangle. Weight , and Can be set to 1, 2 and 2 respectively.

[0106] Step S43, generating prediction results based on the trained visual transformation target detection teacher network and , using adaptive focal loss and mixed intersection-over-union loss Calculate the distillation loss value for each training detection image .

[0107] In one embodiment of the present invention, the distillation loss value of the training detection image for:

[0108] ,

[0109] in, represents the weight for controlling the loss of the mixed intersection-over-combination ratio. In one embodiment of the present invention, the weight The value can be set to 0.7.

[0110] By transforming the detected image features deeply into the visual feature map of the student network Input the trained visual transformation target detection teacher network result prediction module Get the prediction results ,calculate and The distillation loss between , which can make the visual feature map of the student network closer to the visual feature map of the teacher network, thereby effectively improving the feature representation ability and detection performance of the student network.

[0111] Step S5, randomly selecting M detection images in each small batch to form a small batch sample, and calculating the total loss of the small batch sample according to the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of each detection image in the small batch sample, so as to optimize the detection image feature deep transformation student network to obtain an optimized detection image feature deep transformation student network;

[0112] Among them, the total loss function It is expressed as:

[0113] L S = 1 M ∑ i = 1 M [ β ( L cro i + L msm i ) + ( 1 − β )( L cex i + L dis i )] ,

[0114] in, represents the weight coefficient used to adjust between the two types of losses, represents the cross entropy loss value of the i-th detection image in the mini-batch sample, Represents the square error loss value of the i-th detection image in the small batch sample, represents the cross-exchange loss value of the i-th detection image in the mini-batch sample, represents the distillation loss value of the i-th detection image in the small batch sample. In one embodiment of the present invention, The value of is 0.6.

[0115] In one embodiment of the present invention, when optimizing the detection image feature deep transformation student network, the number of detection images M selected is 32, and the parameters of the detection image feature deep transformation student network are adjusted by iterative calculation so that the total loss Minimum.

[0116] Step S6, based on the optimized detection image feature deep transformation student network, extract the features of the image to be detected for target recognition, and obtain the result of visual target detection.

[0117] In one embodiment of the present invention, the dimension of the visual feature map of the image to be detected extracted by the student network for detecting image features is 512.

[0118] Among them, using the feature extraction module After obtaining the visual feature map of the image to be detected, the feature transformation module can be used based on the extracted visual feature map. It is further processed and finally used in the result prediction module Get the result of visual target detection.

[0119] Using a large-scale online public person re-identification database as the test object, for example, when tested on the COCO database, the average precision of visual target detection of the present invention reaches 45.1% (AP). The visual target detection method based on cross-interchange distillation of the present invention effectively enhances the detection capability of the student model and improves its adaptability in different environments. It can not only be deployed in resource-constrained devices, but also greatly improves the average precision of target detection, which shows the effectiveness of the method of the present invention.

[0120] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

Claims

1. A visual target detection method based on cross-interchange distillation for intelligent driving, characterized in that: The method comprises the following steps: Step S1, constructing a visual transformation target detection teacher network based on deep learning; Step S2, determining a training set, inputting the training detection images in the training set into the visual transformation target detection teacher network based on deep learning, so as to optimize the visual transformation target detection teacher network based on deep learning, and obtain a trained visual transformation target detection teacher network; Step S3, based on the trained visual transformation target detection teacher network, construct a detection image feature deep transformation student network, freeze the weight of the trained visual transformation target detection teacher network, and input the training detection images in the training set into the constructed detection image feature deep transformation student network and the visual transformation target detection teacher network with frozen weights, respectively, to obtain corresponding prediction results; Step S4, based on the prediction results generated by the detection image feature deep transformation student network and the trained visual transformation target detection teacher network, for the soft label and bounding box of the target category, calculate the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of the training detection image; Step S5, randomly selecting M detection images in each small batch to form a small batch sample, and calculating the total loss of the small batch sample according to the cross entropy loss value, square error loss value, cross exchange loss value and distillation loss value of each detection image in the small batch sample, so as to optimize the detection image feature deep transformation student network to obtain an optimized detection image feature deep transformation student network; Step S6, based on the optimized detection image feature deep transformation student network, extract the features of the image to be detected for target recognition, and obtain the result of visual target detection.

2. The method according to claim 1, characterized in that The step S1 comprises the following steps: Step S11, constructing a feature extraction module in the deep learning-based visual transformation target detection teacher network ; Step S12, constructing a feature transformation module in the deep learning-based visual transformation target detection teacher network ; Step S13, constructing a result prediction module in the deep learning-based visual transformation target detection teacher network , combining the feature extraction modules , feature transformation module And the result prediction module , and obtain the deep learning-based visual transformation target detection teacher network.

3. The method according to claim 1, characterized in that The step S2 comprises the following steps: Step S21, preprocessing the training detection images in the training set; Step S22, the training detection images obtained after preprocessing are sequentially input into the feature extraction module of the visual transformation target detection teacher network based on deep learning and feature transformation module , obtaining a visual feature map of the training detection image; Step S23, inputting the visual feature map of the training detection image into the result prediction module of the visual transformation target detection teacher network based on deep learning , predicting the target category soft label and target category bounding box of the training detection image; Step S24, based on the predicted target category soft label and target category bounding box of the training detection image, using cross entropy loss Sum squared error loss The deep learning-based visual transformation target detection teacher network is jointly optimized to obtain a trained visual transformation target detection teacher network.

4. The method according to claim 3, characterized in that In step S24, the cross entropy loss Sum squared error loss The overall optimization loss function composed of It is expressed as: ; in, and They respectively represent the weights of controlling the corresponding losses.

5. The method according to claim 1, characterized in that The step S3 comprises the following steps: Step S31, constructing a feature extraction module in the student network for deep transformation of the detected image features , Feature Transformation Module And the result prediction module , and then combine them to obtain the detected image feature deep transformation student network; Step S32: input the training detection images in the training set into the feature extraction module of the detection image feature depth transformation student network in sequence. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the detected image feature deep transformation student network result prediction module The prediction result corresponding to the training detection image is obtained ; Step S33, under the supervision of the trained visual transformation target detection teacher network, the weights of the trained visual transformation target detection teacher network are kept in a frozen state, and the training detection images are sequentially input into the feature extraction module of the trained visual transformation target detection teacher network. and feature transformation module In the above example, the visual feature map of the training detection image is obtained. , and then the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network The prediction result corresponding to the training detection image is obtained ; Step S34, exchanging the visual feature map and visual feature maps , the visual feature map Input to the detected image feature deep transformation student network result prediction module Get the prediction results , and the visual feature map Input to the result prediction module of the trained visual transformation target detection teacher network Get the prediction results .

6. The method according to claim 1, characterized in that The step S4 comprises the following steps: Step S41, deeply transforming the prediction result generated by the student network based on the detected image features and the actual target category of the training detection image, using the cross entropy loss Sum squared error loss Calculate the cross entropy loss value for each training detection image Sum squared error loss ; Step S42, based on the detected image feature depth transformation student network and the trained Predictions generated by a teacher network for visually transformed object detection and , using adaptive focal loss and mixed intersection-over-union loss Calculate the cross-interchange loss value for each training test image ; Step S43, generating prediction results based on the trained visual transformation target detection teacher network and , using adaptive focal loss and mixed intersection-over-union loss Calculate the distillation loss value for each training detection image .

7. The method according to claim 6, characterized in that In step S42, adaptive focus loss It is expressed as: ; in, represents the weight used to adjust the loss function, Indicates that it is used to control The strength of represents the soft label predicted by the student network for each target category, represents the soft label predicted by the teacher network for each target category, is the predicted soft label and The KL divergence between and The difference between.

8. The method according to claim 6, characterized in that In step S42, the mixed intersection-and-combination ratio loss It is expressed as: ; in, , and They represent the weights for adjusting the corresponding losses, represents the target category bounding box coordinate value predicted by the student network, represents the target category bounding box coordinate value predicted by the teacher network, express and The intersection ratio between express and The Euclidean distance between the center points, express and The length of the diagonal of the minimum enclosing rectangle, express and The minimum bounding rectangle of represents the area difference between the two, express and The area of ​​the minimum enclosing rectangle.

9. The method according to claim 6, characterized in that In step S42, the cross-exchange loss value It is expressed as: ; in, Represents the weight controlling the adaptive focal loss.

10. The method according to claim 6, characterized in that In step S43, the distillation loss value It is expressed as: ; in, Represents the weight controlling the mixed intersection-over-union loss.

Citation Information

Patent Citations

  • Neural network training method and device

    CN107247989A

  • Distraction driving detection method based on generative adversarial network and knowledge chart distillation

    CN116386013A

  • Knowledge distillation-based end-to-end spiking neural network target detection method

    CN117875377A

  • High-fidelity lightweight face exchange method

    CN118115354A

  • Target detection method based on knowledge distillation, electronic equipment and medium

    CN118135201A