Remote sensing rotating target detection method and system based on comparative heterogeneous knowledge distillation
By comparing heterogeneous knowledge distillation methods and utilizing bidirectional feature transformation and adaptive sample allocation strategies, the problems of low efficiency of heterogeneous distillation and inaccurate sample allocation in remote sensing rotating target detection are solved, the accuracy and efficiency of remote sensing rotating target detection are improved, and it is suitable for edge device deployment.
Patent Information
- Application Number
- CN202510851232.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-17
AI Technical Summary
In existing remote sensing rotating target detection methods, the low performance of heterogeneous distillation and poor sample allocation robustness lead to unstable detection performance and difficulty in effective deployment on edge devices.
A method based on contrastive heterogeneous knowledge distillation is adopted to alleviate the architectural differences between CNN and Transformer through a bidirectional feature transformation module and an assistant transformation model. A dual-attention-guided adaptive sample allocation strategy is designed to improve the accuracy of feature expression and positive and negative sample division.
The lightweight model can effectively detect complex and small-scale rotating targets in remote sensing images, while reducing computational overhead and power consumption, and improving the deployment efficiency of the model on edge devices.
Smart Images

Figure CN120807880A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of remote sensing image target detection, and particularly relates to a remote sensing rotating target detection method and system based on contrast heterogeneous knowledge distillation. BACKGROUND
[0002] With the wide application of the Transformer in remote sensing target detection, its global modeling capability has significantly improved the detection accuracy, especially in processing of the remote sensing scene with variable posture and dense small targets. However, the Transformer model usually has large parameters and high calculation overhead, and is difficult to be directly deployed on an edge device. In order to improve the inference efficiency of the model while ensuring the detection performance, the existing researches widely adopt the knowledge distillation technology to migrate the discrimination ability of the high-performance teacher model to the lightweight student model, so as to realize the model compression and acceleration. In this background, researchers try to take the Transformer as the teacher model to guide the convolutional neural network (CNN) student model with simpler structure to learn its semantic representation, so as to realize the collaborative optimization of performance and efficiency.
[0003] However, when facing different architectures such as CNN and Transformer, due to different inductive biases, there is a serious shift in feature distribution, and direct distillation cannot achieve ideal results. In addition, the existing knowledge distillation methods often only use the shallow or output layer information of the teacher model in the feature transmission process, and lack efficient guidance of the deep semantic features of the intermediate layers, especially under the heterogeneous architecture, the student model is difficult to fully learn the expression ability of the teacher model, resulting in low distillation efficiency and weak generalization ability. Therefore, it is urgent to build an efficient distillation mechanism suitable for heterogeneous structures to realize the knowledge transfer across architectures and improve the representation ability of the lightweight model.
[0004] In addition, the traditional positive and negative sample allocation strategy depends on the fixed IoU threshold, which is easily disturbed by factors such as rotation angle and scale change, especially in the case of dense targets and complex postures in remote sensing images, which is easy to cause mismatch and affect the model performance.
[0005] A general knowledge distillation framework for dense detection tasks, BCKD, is proposed to improve the distillation effect of classification and regression subtasks simultaneously. The overall structure of the method is shown in the figure. First, the dense prediction output is obtained through the feature extractor and the detection head, including the classification logic and the bounding box regression offset of each candidate position. In terms of classification distillation, BCKD converts the multi-class Softmax classification structure into multiple independent binary classification subtasks. The Sigmoid function is used to activate the output confidence score of each class, and a binary cross-entropy-based classification distillation loss function is constructed to avoid interference between different classes and realize independent transfer of cross-class knowledge. In terms of regression distillation, BCKD no longer relies on specific parameterization or intermediate feature alignment, but directly calculates the IoU loss between the predicted bounding boxes of the student and teacher models to measure the positioning difference and construct a unified regression distillation objective function. Finally, the two are weighted and summed to form the total distillation loss and guide the training of the student model.
[0006] A generative feature alignment mechanism is constructed to improve the feature representation ability of the student model. The core idea is to guide the student model to actively reconstruct the high-quality features of the teacher model under the condition of information loss by introducing random mask perturbation. A mask is randomly generated on the intermediate feature map output by the student model at a certain proportion, and the feature map is covered with the mask to simulate information loss. Then, a lightweight projection module containing two 3x3 convolution layers and a ReLU activation function is used to map the student network features after the mask to the generated teacher features. Finally, the L2 distance between the generated student network features and the real teacher network features is minimized as the distillation loss term. In the training stage, the original task loss and the generated distillation loss are weighted and fused to optimize the student model.
[0007] A heterogeneous distillation method for object detection tasks, PKD, is proposed. The core idea is to maximize the Pearson correlation between the teacher and student features to achieve efficient knowledge transfer. First, the normalized features of the teacher and student models are extracted to have zero mean and unit variance, eliminating the interference caused by feature amplitude and scale differences. Then, the mean square error between the normalized features is calculated as the distillation loss, which is essentially equivalent to maximizing the Pearson correlation coefficient between the original features to strengthen the structural alignment of the teacher and student in the feature space. Finally, the distillation loss and the standard loss of the detection task are weighted and fused to jointly optimize the student model.
[0008] The existing remote sensing rotating target detection method has the following two main shortcomings in practical application:
[0009] The first point is that the heterogeneous distillation performance is limited. The existing knowledge distillation methods are mostly designed for homogeneous networks, which are difficult to adapt to the inconsistency of feature spaces between CNN and Transformer due to the induction bias, resulting in low knowledge transfer efficiency, difficulty for the student model to fully learn the global semantic information of the teacher model, and affecting the detection performance. To solve this problem, the application introduces an assistant transformation model and a bidirectional feature transformation module to effectively alleviate the feature structure difference and improve the cross-architecture distillation effect.
[0010] The second is that the sample allocation is not robust. The traditional rotating target detection method often uses the fixed threshold Intersection over Union (IoU) matching strategy, which is prone to inaccurate positive and negative sample division when facing dense, small-scale and directionally variable targets in remote sensing images, resulting in unstable training process and obvious performance fluctuations. To solve this problem, the application designs a double attention guided adaptive sample allocation mechanism, dynamically adjusts the matching threshold combined with feature similarity, realizes more robust positive and negative sample selection, and improves the overall detection accuracy and training efficiency.
[0011] Remote sensing images have a bird's eye view from a certain angle, complex background, dense targets and arbitrary direction, which leads to obvious deficiencies in positioning accuracy and geometric adaptability of traditional horizontal box detection methods, thus giving birth to the rotating bounding box (OBB) method. However, most of the existing rotating target detection models have complex structure and large number of parameters, which is not conducive to the deployment and application of edge platforms. To improve the deployment efficiency of edge devices, researchers have gradually focused on lightweight detection models, and knowledge distillation has become an effective means to improve the performance of lightweight models. Existing distillation methods can be roughly divided into logical distillation and feature distillation, which have achieved remarkable results in natural image target detection, but still face difficulties in the field of remote sensing. Traditional homogeneous distillation relies on network structure consistency, which is difficult to fully transfer the deep semantic knowledge of the intermediate layers of the teacher model, while heterogeneous distillation has a large difference in feature space between CNN and Transformer due to the induction bias, resulting in poor direct distillation effect.
[0012] To solve the above problems, although existing research has explored heterogeneous distillation strategies in the field of natural images to alleviate the difficulty of feature alignment caused by structural inconsistency, in the context of remote sensing images, due to the characteristics of large target size variation, complex posture distribution and dense small targets, heterogeneous distillation faces greater challenges in feature matching, semantic preservation and distillation stability. At present, the research on heterogeneous distillation in the field of remote sensing is still in its infancy, and there are few related methods, lacking systematic structure design and targeted mechanisms, which makes it difficult to balance performance improvement and model efficiency in actual deployment. Therefore, it is urgent to build a more robust and efficient heterogeneous distillation framework for remote sensing images to realize precise transfer of cross-architecture knowledge and effective improvement of lightweight model performance. SUMMARY
[0013] The technical problem to be solved by the present application is to provide a remote sensing rotating target detection method and system based on comparative heterogeneous knowledge distillation to solve the technical problems of low efficiency of heterogeneous distillation and poor robustness of sample allocation, and improve the overall precision and practicability of high remote sensing rotating target detection.
[0014] The present application adopts the following technical solutions:
[0015] The remote sensing rotating target detection method based on comparative heterogeneous knowledge distillation comprises the following steps:
[0016] A comparative heterogeneous knowledge distillation network detection framework comprising a teacher network, a student network and an assistant transformation model is constructed.
[0017] A forward heterogeneous feature transformation module is constructed to convert the Token sequence of the teacher network into a two-dimensional feature map, match the inductive bias of the CNN of the student network, and obtain the transformed teacher features. A reverse heterogeneous feature transformation module is constructed to convert the two-dimensional feature map of the student network into a Token sequence, input the teacher network for global interaction, and obtain the transformed student features.
[0018] An assistant transformation model is constructed by sharing the teacher network weight, fusing the transformed teacher features and student features.
[0019] A double-attention-guided adaptive sample allocation strategy is designed to enhance feature expression through spatial attention and channel attention, and combine cosine similarity matching and dynamic threshold division strategy to divide the positive and negative sample sets. and
[0020] The teacher network, the student network and the assistant transformation model are combined with the positive and negative sample sets. and A comparative learning knowledge distillation is constructed to realize knowledge transfer through feature distillation loss and logical distillation loss, and output the detection result image.
[0021] Preferably, the comparative heterogeneous knowledge distillation network detection framework comprises a feature extraction stage and a comparative learning stage. The feature extraction stage aligns the features of the teacher network and the student network through a bidirectional heterogeneous feature transformation module. The comparative learning stage establishes a dynamic comparative relationship based on the DAG-AS strategy and performs multi-model collaborative distillation.
[0022] Preferably, the teacher model adopts a global modeling structure based on Transformer, and the student model adopts a lightweight convolution architecture.
[0023] Preferably, the forward heterogeneous feature transformation module is used to convert the Token sequence generated by the Transformer teacher model into a two-dimensional feature map, specifically:
[0024] The token sequence is reshaped, and then the channel number is adjusted through a 1x1 convolution to match the input dimension of the CNN, processed using batch normalization, and the normalized teacher model features F T As the input of the CNN student model, residual calculation is performed with the feature map of the student model, and the residual features obtained are used for fusion and enhancement of the student network features of the next layer.
[0025] Preferably, the reverse feature transformation module aims to convert the two-dimensional feature map generated by the convolutional neural network into a token representation suitable for the Transformer, specifically:
[0026] The two-dimensional convolutional features extracted by the student network are divided into fixed-size image blocks through Patch Embedding and mapped into an initial token sequence, realizing the conversion from spatial features to sequence representation; the token features are standardized through layer normalization; at the same time, a rotation and size change attention mechanism RVSA is introduced; high-order semantic information is extracted through layer normalization and feedforward neural network, and consistency alignment with the token dimension of the teacher model is completed.
[0027] Preferably, the double-attention-guided adaptive sample allocation strategy includes:
[0028] The double-attention semantic enhancement module fuses the spatial attention weight and the channel attention weight to generate enhanced features;
[0029] The adaptive matching strategy based on dynamic threshold adaptively calculates the dynamic threshold based on the mean, standard deviation and cosine similarity of IoU, and divides the positive and negative sample sets and
[0030] Preferably, the dynamic threshold τ th is calculated as follows:
[0031] τ th =μ IoU +α th ·σ IoU -β th ·S(in,gt)
[0032] Where μ IoU and σ IoU represent the mean and standard deviation of the IoU between the candidate box and the GT, respectively, and α th and β th are hyperparameters.
[0033] Preferably, the assistant transformation model is specifically:
[0034] The first and second-layer multi-head attention modules of the teacher model reconstruct their own token sequences into two-dimensional feature maps through the forward feature transformation module, aligning their scales with the feature maps of the corresponding layers of the student network. After scale normalization, the shallow feature representation of the student model is enhanced with the help of the residual cascade isomorphic feature fusion module. The two-dimensional feature maps output by the third layer of the student model are projected into token sequences through the reverse feature transformation module, and the token sequences are input into the third and fourth-layer multi-head attention modules that share weights with the teacher model for global information interaction. The assistant transformation model can simultaneously capture the local features of the student model and the global representation of the teacher model.
[0035] Preferably, the characteristic distillation loss Specifically:
[0036]
[0037] Among them, f S and f T is the final feature obtained by the teacher network and the student network through the dual attention semantic enhancement module, F T represents a batch-encoded teacher network feature set, f T + is a positive sample, τ1 is the temperature parameter;
[0038] Logistic Distillation Loss Specifically:
[0039]
[0040] in, and c represent the true target category of the input image and the predicted category of the model, respectively. C is the total number of all categories in the dataset. and are the predicted probabilities of the teacher and student models on category c, respectively, and γ is the modulation factor.
[0041] In a second aspect, an embodiment of the present invention provides a remote sensing rotating target detection system based on contrastive heterogeneous knowledge distillation, comprising:
[0042] Framework module, which builds a comparative heterogeneous knowledge distillation network detection framework including teacher network, student network and assistant transformation model;
[0043] The transformation module constructs a forward heterogeneous feature transformation module to transform the teacher network's token sequence into a two-dimensional feature map, matches the inductive bias of the student network's CNN, and obtains the transformed teacher features. The reverse heterogeneous feature transformation module is constructed to transform the student network's two-dimensional feature map into a token sequence, input into the teacher network for global interaction, and obtain the transformed student features.
[0044] The fusion module fuses the transformed teacher features and student features by sharing the teacher network weight to construct an assistant transformation model;
[0045] The sample module designs a double-attention guided adaptive sample allocation strategy, cooperates spatial attention and channel attention to enhance feature expression, and combines cosine similarity matching and dynamic threshold division strategy to divide positive and negative sample sets and
[0046] The detection module combines the teacher network, the student network and the assistant transformation model with the positive and negative sample sets and to construct a contrast learning knowledge distillation, realizes knowledge transfer through feature distillation loss and logical distillation loss, and outputs a detection result image.
[0047] In a third aspect, a computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation when executing the computer program.
[0048] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium including a computer program, and the computer program implements the steps of the above-mentioned remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation when executed by a processor.
[0049] In a fifth aspect, a chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above-mentioned remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation when executing the computer program.
[0050] In a sixth aspect, an embodiment of the present application provides an electronic device including a computer program, and the computer program implements the steps of the above-mentioned remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation when executed by the electronic device.
[0051] Compared with the prior art, the present application has at least the following beneficial effects:
[0052] A remote sensing rotating target detection method based on comparative heterogeneous knowledge distillation, through a bidirectional feature transformation module, the architectural differences between CNN and Transformer are bridged, the feature space offset problem is solved, the feature alignment error is reduced, the assistant transformation model is used as a bridge, the teacher global semantic and student local features are fused, the student model mAP is improved, the double attention mechanism (space + channel) enhances the rotating target feature expression, and the recall rate of small targets is improved, the dynamic threshold strategy combines the IoU statistical quantity and the cosine similarity, and the mis-matching rate in dense scenes is reduced, the comparative distillation combines the feature loss and the logical loss, the inference speed on the edge device is improved, and the teacher model accuracy is maintained.
[0053] Further, the bidirectional transformation realizes cross-architecture feature alignment, so that the lightweight student network inherits 83% of the global modeling capability of the teacher; the residual cascade fusion enhances the shallow features, and the small target detection accuracy is improved by 7.3%; the DAG-AS strategy generates high-quality positive and negative sample pairs, and the convergence speed of the comparative learning is accelerated by 35%. Three model collaborative distillation, knowledge transfer efficiency is improved by 48%, and the noise interference of heterogeneous architecture is suppressed.
[0054] Further, the global attention mechanism accurately models the direction of the rotating target, and the rotating IoU on the HRSC2016 dataset reaches 89.1%; the architecture parameter amount of MobileNetV3 is only 1 / 8 of that of the teacher model, and the power consumption of the edge device is reduced by 76%; the local convolution feature retains the detail features, and the recognition rate of small parts such as ship masts is improved by 12%.
[0055] Further, the convolution reshaping operation preserves the spatial structure, the compatibility of the converted feature map with the CNN student network reaches 96%, the channel adjustment eliminates the dimension difference, the feature fusion error is reduced by 58%, the batch normalization stabilizes the training process, and the convergence iteration number is reduced by 30%; the teacher features enhance the student shallow features in a residual form, and the F1-score of the continuous target detection such as road network is improved by 5.7%.
[0056] Further, the image block division preserves the local structure, the semantic integrity of the reconstructed Token sequence reaches 91, the rotating size attention adaptively adjusts the receptive field, the multi-scale target recall balance is improved by 34%, and the teacher-student Token dimension difference is eliminated. The efficiency of global information interaction is improved by 40%.
[0057] Further, the spatial attention focuses on the target main body, the channel attention strengthens the rotating sensitive features, and the false detection rate is reduced by 22%; based on the IoU distribution adjustment threshold, the dense parking lot vehicle detection positive sample coverage is improved by 28%; the cosine similarity supplements the geometric matching, and the rotating target angle tolerance rate is improved to ±15°.
[0058] Further, μ reflects the average positioning accuracy, σ quantifies the target scale dispersion, and the threshold is dynamically adjusted according to the scene; α adjusts the IoU fluctuation tolerance, and β controls the semantic similarity weight, and the mAP on the NWPU VHR-10 dataset is improved by 4.5%; the traditional fixed threshold has a misclassification rate of 19% in remote sensing images, and the strategy reduces to 6.2%.
[0059] Further, the teacher 1-2 layer shallow feature is enhanced by the student shallow layer, and the student 3rd layer deep feature is globally optimized by the teacher 3-4 layer, and the multi-level semantic alignment error is reduced by 51%; the assistant model reuses the teacher high layer weight, and the parameter quantity is only increased by 3%, but the feature transmission efficiency is improved by 37%; the student local details and the teacher global context are coordinated, and the complex scene detection robustness is improved by 29%.
[0060] Further, the contrast learning narrows the positive sample pair and pushes away the negative sample, the feature discriminativeness is enhanced, the detection rate of the camouflage target in the SAR image is improved by 18%; when the modulation factor γ=2, the target class probability is strengthened and the background noise is suppressed, and the classification accuracy is improved by 4.8%; the feature loss and the logical loss are jointly optimized, and the mAP on the DIOR dataset is 81.3%, which is 4.2 higher than the mainstream distillation method.
[0061] It can be understood that the beneficial effects of the above-mentioned second aspect to the sixth aspect can be referred to the related description in the first aspect, which will not be repeated here.
[0062] In summary, the present application solves the problems of heterogeneous distillation and sample allocation of remote sensing rotating target detection through the CAHD framework innovation, bidirectional transformation / DAG-AS, InfoNCE+OFA loss three-level linkage, and realizes breakthroughs in precision, efficiency and robustness.
[0063] The technical solutions of the present application will be further described in detail below with the help of the drawings and examples. DESCRIPTION OF DRAWINGS
[0064] Figure 1 The network framework diagram of the present application;
[0065] Figure 2 The forward heterogeneous feature transformation module diagram of the present application;
[0066] Figure 3 The reverse heterogeneous feature transformation module diagram of the present application;
[0067] Figure 4 The method flowchart of the present application;
[0068] Figure 5 The schematic diagram of the computer equipment provided by an embodiment of the present application;
[0069] Figure 6A block diagram of a chip according to an embodiment of the present application.
[0070] In the description of the present application, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. DETAILED DESCRIPTION
[0071] The technical solutions in the embodiments of the present application will be clearly and completely described in connection with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort fall within the protection scope of the present application.
[0072] In the description of the present application, it should be understood that the terms "comprising" and "including" indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0073] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing the specific embodiments and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0074] It should be further understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.
[0075] It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe the preset ranges, etc., these preset ranges should not be limited to these terms. These terms are only used to distinguish the preset ranges from each other. For example, the first preset range can also be referred to as the second preset range, and similarly, the second preset range can also be referred to as the first preset range without departing from the scope of the embodiments of the present application.
[0076] Depending on the context, the word "if" as used herein can be interpreted to mean "when" or "while" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "when it is determined" or "in response to determining" or "when [a stated condition or event] is detected" or "in response to detecting [a stated condition or event]."
[0077] The various structural diagrams according to the disclosed embodiments of the present application are shown in the drawings. These diagrams are not drawn to scale, in which certain details are exaggerated for clarity and others omitted. The shapes and relative sizes of the various regions, layers, and their relative positions illustrated in the drawings are merely exemplary and may, in actuality, deviate from what is shown in the interest of manufacturing tolerances, or technical limitations, and regions / layers with different shapes, sizes, relative positions can be additionally designed by those skilled in the art according to actual needs.
[0078] The present application provides a remote sensing rotating target detection method based on comparative heterogeneous knowledge distillation, which adopts a heterogeneous feature transformation module to realize bidirectional mapping of feature spaces between CNN and Transformer, effectively alleviates the information gap caused by architectural differences, and improves the knowledge transfer efficiency between heterogeneous models. At the same time, the present application introduces a double-attention-guided adaptive sample allocation mechanism, dynamically adjusts the IoU threshold combined with feature similarity, and significantly improves the accuracy and training stability of positive and negative sample division. Through the collaborative design of the above mechanisms, the present application effectively improves the detection accuracy of complex and small-scale targets in remote sensing images while maintaining the inference efficiency.
[0079] The present application proposes a heterogeneous knowledge distillation method based on comparative learning, which establishes effective mapping between the token representation of Transformer and the feature map of CNN by introducing an assistant transformation model and a bidirectional heterogeneous feature transformation module, bridges the representation gap caused by structural differences, and thus realizes effective knowledge transfer between different architectures.
[0080] The present application designs a residual cascade feature fusion mechanism in the feature distillation part, guides the student model to align the multi-level semantic information of the teacher model layer by layer, enhances the feature expression ability, and thus significantly improves the modeling and detection ability of the lightweight model for the complex morphology of remote sensing targets.
[0081] The present application designs a double-attention-guided adaptive sample allocation strategy, which combines spatial attention and channel attention mechanisms, and combines cosine similarity and dynamic threshold strategy to realize more robust and accurate positive and negative sample division, and further improve the quality of supervision information in the distillation training process.
[0082] The application improves the detection capability of a lightweight student model on a complex target, effectively balances the precision and computing overhead, and breaks through the key bottleneck of existing remote sensing rotating target detection technology in model migration and practical deployment.
[0083] Please refer to Figure 4 The application is a remote sensing rotating target detection method based on comparative heterogeneous knowledge distillation, comprising the following steps:
[0084] S1, constructing a comparative heterogeneous knowledge distillation network detection framework CAHD;
[0085] The comparative heterogeneous knowledge distillation network detection framework CAHD innovatively constructs a cooperative training mechanism of a teacher model, a student model and an assistant transformation model, as shown in Figure 1 The teacher model adopts a global modeling structure based on Transformer, the student model adopts a lightweight convolution architecture, and the assistant transformation model serves as a feature bridge between the two. The overall process of CAHD includes a feature extraction stage and a comparative learning stage, which are respectively responsible for constructing the assistant transformation model and establishing positive and negative sample comparison distillation, and realizing effective knowledge migration of heterogeneous features.
[0086] In the feature extraction process, the first and second multi-head attention modules of the teacher model first reconstruct the token sequence into a two-dimensional feature map through the forward feature transformation module to match the inductive bias of CNN, so that the corresponding layer feature map of the student network is aligned in scale. After scale normalization, the proposed residual cascade isomorphic feature fusion module is used to enhance the shallow feature representation of the student model. Subsequently, the two-dimensional feature map output by the third layer of the student model is projected into a token sequence through the reverse feature transformation module, and the sequence is input into the third and fourth multi-head attention modules sharing the weights with the teacher model for global information interaction. This hybrid path enables the assistant transformation model to capture both the local features of the student model and the global representation advantages of the teacher model.
[0087] In the comparative learning stage, the final features of the teacher, student and assistant transformation models are input into the benchmark detector sharing the weights after independent average pooling. Then, the proposed double attention guided positive and negative sample distribution strategy is used to establish a dynamic comparative relationship in the feature space. At the same time, the high-order semantic features of the three are flattened into logic vectors by the fully connected layer, and the feature distillation and logic distillation between each other (teacher-student, teacher-assistant transformation and student-assistant transformation) are performed, and the comprehensive supervision of knowledge migration is realized through the multi-task loss function.
[0088] S2, constructing a forward heterogeneous feature transformation module and a reverse heterogeneous feature transformation module;
[0089] (1) Forward Isomorphic Feature Transformation Module
[0090] The forward feature transformation module is used to convert the token sequence generated by the Transformer teacher model into a two-dimensional feature map, so that it can adapt to the CNN induction bias, as shown in Figure 2
[0091] Specifically, let the token sequence of the teacher model be represented as where N is the number of tokens, and d is the feature dimension.
[0092] In order to convert into a two-dimensional feature map that can be processed by CNN, first reshape the token by the following formula:
[0093]
[0094] where Reshape is a convolution operation for reshaping, C T , H T and W T represent the number of channels, height and width after conversion, respectively, and F T is the converted teacher model feature.
[0095] Subsequently, adjust the number of channels by 1x1 convolution to match the input dimension of CNN, in order to stabilize training and accelerate convergence, further use batch normalization for processing, as shown in the following formula:
[0096] F T ' = BN(Conv 1×1 (F T ))
[0097] where BN is a layer normalization operation.
[0098] Finally, the normalized teacher model feature F T ' as the input of the CNN student model, and the feature map of the student model is calculated by residual, and the residual feature obtained is used to fuse and enhance the student network feature of the next layer.
[0099] (2) Reverse Isomorphic Feature Transformation Module
[0100] The reverse feature transformation module aims to convert the two-dimensional feature map generated by the convolutional neural network (CNN) into a token representation suitable for the Transformer, to realize global information interaction, as shown in Figure 3
[0101] In the reverse feature transformation module, the two-dimensional convolutional features extracted by the student network are first divided into fixed-size image blocks by PatchEmbedding and mapped into initial token sequences, realizing the conversion from spatial features to sequence representation;
[0102] Subsequently, the layer normalization standardizes the token features, which helps stabilize the training process of the Transformer module; and the rotation and size attention mechanism RVSA is introduced to improve the robustness of the model to remote sensing target posture and scale changes.
[0103] Finally, after layer normalization and feedforward neural network, high-order semantic information is further extracted, and consistency alignment with the token dimension of the teacher model is completed.
[0104] S3, design a double attention guided adaptive sample allocation strategy;
[0105] The application designs a double attention guided adaptive sample allocation strategy, which enhances feature expression through spatial attention (SA) and channel attention (CA) in cooperation, and combines cosine similarity matching and dynamic threshold division strategy to improve the consistency of the feature space, thereby improving the robustness of sample allocation. DAG-AS mainly includes a double attention semantic enhancement module and a dynamic threshold based adaptive matching strategy.
[0106] S301, constructing a double attention semantic enhancement module;
[0107] DAG-AS adopts a double attention mechanism to enhance the feature expression ability of the candidate frame from two dimensions of space and channel to improve the discriminability of matching. For a given input feature, first, calculate the spatial attention weight matrix to highlight the key area of the target and suppress background noise interference;At the same time, calculate the channel attention weight vector to filter the feature channels sensitive to the detection task, so as to improve the representation ability of the rotating target. The calculation formulas of spatial attention and channel attention are as follows:
[0108] W SA =σ(Conv[GMP(F in );GAP(F in )])
[0109] W CA =σ(MLP(GAP(F in ))+MLP(GAP(F in )))
[0110] Wherein, sigma (·) is a Sigmoid activation function, GMP represents global maximum pooling, GAP represents global average pooling, MLP represents calculation through a multi-layer perception, W SA and W CA are spatial attention weight and channel attention weight respectively.
[0111] After that, the weights of spatial attention and channel attention are fused to obtain an enhanced feature representation, which is shown in the following formula:
[0112] F in '=W SA ⊙W CA ⊙F in
[0113] Where ⊙ represents element-wise multiplication, F in ' is the enhanced feature. This fusion method ensures the complementary enhancement of spatial and channel dimensions, providing more robust feature representation for subsequent sample assignment.
[0114] S302, an adaptive sample matching strategy based on dynamic threshold is adopted. In the sample assignment process, the traditional IoU matching method is easily affected by target scale change and angle change, leading to mismatching. Therefore, DAG-AS additionally adopts a dynamic threshold strategy based on cosine similarity matching to improve matching stability.
[0115] The similarity calculation between the rotated candidate box region and the real box region after double attention semantic enhancement is shown in the following formula:
[0116]
[0117] Where S(in,gt) represents the similarity between the rotated candidate box region and the real box region, using cosine similarity matching. F' in represents the enhanced rotated box candidate region feature, F gt represents the real box region feature.
[0118] The traditional IoU threshold is a fixed hyperparameter designed by humans. In remote sensing image target detection, the fixed IoU threshold often leads to inaccurate positive and negative sample division due to ignoring target scale, pose, and dense distribution characteristics. For example, small targets are difficult to exceed the set threshold even with high overlap, while large targets are easily misjudged as positive samples. DAG-AS, when dividing positive and negative samples, adaptively adjusts the matching threshold based on the distribution information of target features to adapt to the feature distribution of different target classes.
[0119] Specifically, the dynamic threshold τ th is calculated as follows:
[0120] τ th =μ IoU +α th ·σ IoU -β th ·S(in,gt)
[0121] Where μ IoU and σIoU respectively represent the mean and standard deviation of the IoU between the bounding box and the GT, and α th and β th are hyperparameters, which control the influence of the standard deviation and the cosine similarity on the dynamic threshold.
[0122] Through the dynamic threshold, the DAG-AS divides the positive and negative sample sets according to the following formula:
[0123]
[0124] wherein, and respectively represent the positive sample set and the negative sample set.
[0125] S4, constructing an assistant transformation model;
[0126] In the feature extraction process, the first and second multi-head attention modules of the teacher model first reconstruct the token sequence into a two-dimensional feature map through the forward feature transformation module, so as to match the inductive bias of the CNN;
[0127] so that it is aligned in scale with the corresponding level feature map of the student network. After scale normalization, the proposed residual cascade isomorphic feature fusion module is used to enhance the shallow feature representation of the student model;
[0128] Subsequently, the two-dimensional feature map output by the third layer of the student model is projected into a token sequence through the reverse feature transformation module, and the sequence is input into the third and fourth multi-head attention modules sharing the weights with the teacher model for global information interaction;
[0129] This hybrid path enables the assistant transformation model to capture both the local features of the student model and the global representation advantages of the teacher model.
[0130] S5, constructing a contrastive learning knowledge distillation.
[0131] In the contrastive learning phase, the final features of the teacher, student, and assistant transformation models are independently averaged and pooled, and then input into the benchmark detector sharing the weights. Then, through the dual attention guided positive and negative sample allocation strategy proposed in this paper, a dynamic contrastive relationship is established in the feature space. At the same time, the high-order semantic features of the three are flattened into logical vectors through the fully connected layer, and the feature distillation and logical distillation between each other (teacher-student, teacher-assistant transformation, and student-assistant transformation) are performed, as shown in the following formula:
[0132]
[0133] wherein, K T , K A , and K Srespectively represent the knowledge contained in the teacher, assistant transformation and student model, is the distillation loss function used, which is composed of two parts: feature distillation loss and logical distillation loss, as shown in the following formula:
[0134]
[0135] where f T and f S represent the final features of the teacher network and the student network obtained through the double attention semantic enhancement module, p T and p S are the final logical outputs of the teacher network and the student network. This structure makes the training of the model not only rely on the consistency of the feature space, but also achieve higher alignment accuracy at the decision level.
[0136] S501, feature distillation loss;
[0137] The feature distillation loss adopts the spatial-agnostic InfoNCE loss function in contrast learning, focusing on aligning the structural information of feature embeddings. In this process, this chapter first generates positive and negative samples for the three models (teacher, student, and assistant transformation) according to the double attention guided adaptive sample allocation strategy (DAG-AS) proposed above. And in the positive sample set of each model, a positive sample pair is formed by random sampling. Specifically, the positive sample pair contains two feature pairs between the teacher-student, teacher-assistant transformation, and student-assistant transformation, as shown in the following formula:
[0138]
[0139] The negative sample pair is the pairing of the student network feature in the positive sample set with other features that are not in the positive sample set, as shown in the following formula:
[0140]
[0141] Traditional mean square error loss is less effective when dealing with features with large spatial distribution differences. Unlike the traditional mean square error loss, the InfoNCE loss can effectively capture the complex interdependence between features and is not limited by the information in the feature space, making it more suitable for cases where the spatial features of cross-architecture models differ significantly. The feature distillation loss is calculated by the following formula:
[0142]
[0143] where f S and f Tis the final feature of the teacher network and the student network through the double-attention semantic enhancement module, F T represent a small batch of encoded teacher network features, in F T , there is only one positive sample f S matching f T + , that is, the positive sample pair composed of the student network and the teacher network features from the same image, and the temperature parameter τ1 is learnable.
[0144] S502, logical distillation loss.
[0145] Because different model architectures have induction bias, for example, CNN has stronger local perception ability in small target detection, and multi-head attention structure has global advantage in processing large targets, therefore, directly using traditional cross-entropy loss to measure the logical output may not fully play the strengths of different models. Therefore, the present application adopts OFA loss as the logical distillation loss, and adds a modulation factor to the original distillation loss to enhance the information of the target class, thereby preventing the learning of the student model from being disturbed by irrelevant information of the teacher model, and the formula is as follows:
[0146]
[0147] wherein, and c represent the real target class and the predicted class of the model of the input image respectively, C is the total number of all classes in the data set, and are the prediction probabilities of the teacher and student models on class c respectively, and γ is a modulation factor for enhancing the target class information; when γ = 1, the loss degenerates into a cross-entropy distillation loss with temperature τ2 = 1.
[0148] Through the above steps, the teacher network and the student network are jointly trained to obtain a detection result image.
[0149] In another embodiment of the present application, a remote sensing rotating target detection system based on contrast heterogeneous knowledge distillation is provided, which can be used to implement the remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation described above. Specifically, the remote sensing rotating target detection system based on contrast heterogeneous knowledge distillation includes a framework module, a transformation module, a fusion module, a sample module and a detection module.
[0150] Among them, the framework module constructs a contrast heterogeneous knowledge distillation network detection framework containing a teacher network, a student network and an assistant transformation model;
[0151] The transformation module is constructed to convert the Token sequence of the teacher network into a two-dimensional feature map, match the inductive bias of the CNN of the student network, and obtain the transformed teacher feature.
[0152] The fusion module fuses the transformed teacher feature and the student feature by sharing the teacher network weight to construct an assistant transformation model.
[0153] The sample module designs a double-attention-guided adaptive sample allocation strategy, cooperatively enhances feature expression through spatial attention and channel attention, and combines cosine similarity matching and a dynamic threshold division strategy to divide positive and negative sample sets. and
[0154] The detection module combines the teacher network, the student network and the assistant transformation model, combines the positive and negative sample sets and to construct a contrast learning knowledge distillation, realizes knowledge transfer through feature distillation loss and logical distillation loss, and outputs a detection result image.
[0155] The application provides a terminal device, which comprises a processor and a memory, the memory is used for storing a computer program, the computer program comprises program instructions, and the processor is used for executing the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and the like. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions to realize a corresponding method process or a corresponding function. The processor in the embodiments of the application can be used for the operation of the remote sensing rotating target detection method based on contrast heterogeneous knowledge distillation, which comprises the following steps:
[0156] The comparative heterogeneous knowledge distillation network detection framework is constructed by including a teacher network, a student network and an assistant transformation model; the forward heterogeneous feature transformation module is constructed to convert the Token sequence of the teacher network into a two-dimensional feature map, match the inductive bias of the CNN of the student network, and obtain the transformed teacher feature; the reverse heterogeneous feature transformation module is constructed to convert the two-dimensional feature map of the student network into a Token sequence, input the teacher network for global interaction, and obtain the transformed student feature; the assistant transformation model is constructed by sharing the teacher network weight, fusing the transformed teacher feature and the student feature; the double attention guided adaptive sample allocation strategy is designed, the feature expression is enhanced through the cooperation of spatial attention and channel attention, and the positive and negative sample sets are divided by combining the cosine similarity matching and dynamic threshold division strategy and The teacher network, the student network and the assistant transformation model are combined with the positive and negative sample sets and The comparative learning knowledge distillation is constructed, the knowledge transfer is realized through the feature distillation loss and the logical distillation loss, and the detection result image is output.
[0157] Please refer to Figure 5 , the terminal device is a computer device, the computer device 60 of the embodiment includes a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, and the computer program 63 realizes the method for estimating the concentration of radioactive iodine species in the post-accident containment when executed by the processor 61, in order to avoid repetition, which will not be described here. Alternatively, the computer program 63 is executed by the processor 61 to realize the functions of each model / unit in the remote sensing rotating target detection system based on comparative heterogeneous knowledge distillation, in order to avoid repetition, which will not be described here.
[0158] The computer device 60 can be a desktop computer, a notebook computer, a palm computer and a cloud server, etc. The computer device 60 can include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art can understand that Figure 5 is only an example of the computer device 60 and does not constitute a limitation on the computer device 60, and can include more or fewer components than the illustration, or combine certain components, or different components, for example, the computer device can also include an input / output device, a network access device, a bus, etc.
[0159] The processor 61 can be a central processing unit (CPU), and can also be other general-purpose processors, graphics processing units (GPUs), tensor processing units (TPUs), digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0160] The memory 62 can be an internal storage unit of the computer device 60, such as a hard disk or a memory of the computer device 60. The memory 62 can also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 60.
[0161] Further, the memory 62 can include both an internal storage unit and an external storage device of the computer device 60. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 can also be used to temporarily store data that has been output or will be output.
[0162] Please refer to Figure 6 , the terminal device is an electronic device 600, and the electronic device 600 is in the form of a general-purpose computing device. The components of the electronic device can include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0163] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 610, so that the processing unit 610 executes the steps of various exemplary embodiments according to the present application described in the method part of the specification. For example, the processing unit 610 can execute the steps as shown in Figure 4 .
[0164] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0165] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0166] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0167] The electronic device 600 may also communicate with one or more external devices 700 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., a router, a modem). Such communication may occur via an input / output interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network, a wide area network, and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0168] Example 4
[0169] The present application further provides a storage medium, specifically a computer readable storage medium, which is a memory device in the terminal device, and is used to store programs and data. It can be understood that the computer readable storage medium herein can include the built-in storage medium in the terminal device, and of course can include the expansion storage medium supported by the terminal device, and can be any tangible medium containing or storing programs, which can be used by or in combination with an instruction execution system, device or apparatus. The computer readable storage medium provides a storage space, which stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and the instructions can be one or more computer programs (including program codes). It should be noted that more specific examples of the computer readable storage medium include an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical fiber, a portable compact disk read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0170] The computer readable storage medium further includes a data signal carried in baseband or propagated as a carrier wave in a propagated data signal, in which the readable program code is carried. Such a propagated data signal can take any of a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The readable storage medium can also be any readable medium that can be used to carry, propagate, or transmit the program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the readable storage medium can be transmitted in any suitable medium, including but not limited to wireless, wired, optical, radio frequency, or any suitable combination thereof.
[0171] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network or a wide area network, or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. The present application is directed to an apparatus and method for providing improved user interface for a mobile device.
[0172] The one or more instructions stored in the computer readable storage medium can be loaded and executed by the processor to implement the corresponding steps of the remote sensing rotating target detection method based on comparative heterogeneous knowledge distillation in the above embodiments; and the one or more instructions stored in the computer readable storage medium are loaded and executed by the processor to implement the following steps:
[0173] A comparative heterogeneous knowledge distillation network detection framework including a teacher network, a student network and an assistant transformation model is constructed; a forward heterogeneous feature transformation module is constructed to convert the Token sequence of the teacher network into a two-dimensional feature map, match the inductive bias of the CNN of the student network, and obtain the transformed teacher feature; a reverse heterogeneous feature transformation module is constructed to convert the two-dimensional feature map of the student network into a Token sequence, input the teacher network for global interaction, and obtain the transformed student feature; an assistant transformation model is constructed by fusing the transformed teacher feature and the student feature through sharing the teacher network weight; a double-attention guided adaptive sample allocation strategy is designed to cooperatively enhance feature expression through spatial attention and channel attention, and combine the cosine similarity matching and dynamic threshold division strategy to divide the positive and negative sample sets and The teacher network, the student network and the assistant transformation model are combined with the positive and negative sample sets and A comparative learning knowledge distillation is constructed to realize knowledge transfer through feature distillation loss and logical distillation loss, and output a detection result image.
[0174] The database involved in each of the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a blockchain, and the like, without being limited thereto. The processor involved in each of the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, and the like, without being limited thereto.
[0175] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art without creative labor on the basis of the embodiments in the present application belong to the scope of protection of the present application.
[0176] The advantages of the application are specifically illustrated by simulation experiment data and typical application examples, and all data are based on DOTA-v2.0, HRSC2016 and other mainstream remote sensing data set measured results:
[0177] Overall performance comparison
[0178]
[0179]
[0180] 5.2% mAP is improved compared with the optimal baseline (PKD), mainly due to the alignment of heterogeneous features and dynamic sample allocation; the lightweight design reduces the parameter quantity of the student network by 9.3% and improves the inference speed by 8%; the double attention mechanism improves the recall rate of <32px target by 8.3%.
[0181] Comparison on the HRSC2016 ship detection data set:
[0182] Module combination mAP Angle error (°) False detection rate Baseline (no distillation) 68.5% 8.7 23.1% + Bidirectional feature transformation 74.2% 5.3 18.6% + Bidirectional feature transformation + assistant model 77.8% 3.9 14.2% + Bidirectional feature transformation + assistant model + DAG-AS 81.3% 2.1 9.7%
[0183] The bidirectional feature transformation eliminates 73% of the feature offset caused by the architecture difference, the assistant model improves the cross-architecture knowledge transfer efficiency, and the DAG-AS strategy significantly reduces the rotation target angle error and the mis-detection rate in dense scenes.
[0184] Performance in dense port ship detection scenarios:
[0185] Sample allocation strategy Positive sample coverage Matching time-consuming (ms) Missed detection rate Fixed IoU threshold (0.5) 64.7% 2.3 22.5% ATSS (adaptive) 73.1% 3.1 18.3% DAG-AS (the application) 89.4% 1.8 7.6%
[0186] The space-channel attention enhances the features of key parts such as ship masts, improving matching accuracy; the dynamic threshold formula adapts to targets of different scales, reducing the miss-detection rate; and the improved calculation efficiency meets the real-time detection requirements.
[0187] Compared with the prior art BCKD, MGD and PKD, the application has the following advantages in structure design and adaptation to remote sensing scenarios:
[0188] Firstly, although BCKD has constructed a unified classification and regression distillation mechanism, its regression distillation is completely based on the bounding box IoU, ignoring the rich semantic information in the intermediate layers of the teacher model, and does not address the feature alignment problem of rotating targets. The application introduces a heterogeneous feature transformation module, which realizes the bidirectional mapping of CNN and Transformer feature spaces through an assistant model, significantly enhances the semantic alignment capability, and has better adaptability.
[0189] Secondly, MGD promotes feature reconstruction through the mask mechanism, but it only focuses on the reconstruction ability of the student's own features, and the semantic guiding role between heterogeneous structures is limited. The application utilizes three model collaborative distillation structure, combines forward and reverse transformation, realizes efficient knowledge transfer across architectures, and enhances the discriminative characteristics of the student model through the contrast learning mechanism, which is more suitable for small targets and high attitude change scenes in remote sensing images.
[0190] Thirdly, PKD aligns the feature map through Pearson correlation, which can alleviate the heterogeneity to a certain extent, but ignores the problem of easy-to-mistake matching of positive and negative samples in remote sensing images. The application designs a double-attention-guided adaptive sample matching module, dynamically adjusts the IoU threshold, and accurately divides the samples by combining spatial and channel attention, which significantly improves the training robustness and detection accuracy.
[0191] In summary, the application significantly outperforms the above-mentioned general distillation framework in the remote sensing scene through structure alignment (bidirectional mapping), semantic guidance (contrast distillation), and training optimization (sample matching), and is particularly suitable for efficient remote sensing target detection systems deployed on resource-constrained devices.
[0192] In summary, the application is a remote sensing rotating target detection method and system based on contrast heterogeneous knowledge distillation. The assistant model realizes feature alignment between Transformer and CNN, which can also be replaced by a shared attention mechanism or a general projection module (such as a multi-layer perception or residual connection module) to perform cross-domain feature mapping, thereby realizing semantic fusion and knowledge transfer between heterogeneous models. Forward and reverse mapping can be replaced by a one-way high-dimensional space alignment strategy, such as using a self-attention enhancement module, a Transformer encoder-decoder structure, or a feature alignment loss (such as KL divergence or Bregman divergence) to realize representation consistency. Dynamic IoU threshold strategy can also be realized by attention-weighted target confidence sorting, adaptive sample re-weighting (such as Focal Loss variants), or graph neural network to construct sample relationship graph to achieve more robust positive and negative sample division.
[0193] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0194] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0195] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0196] In the embodiments provided by the present application, it should be understood that the disclosed devices / terminals and methods can be implemented by other ways. For example, the device / terminal embodiments described above are only schematic, and the division of the modules or units is only a logical function division, and there can be another division way in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection between each displayed or discussed unit can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0197] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0198] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0199] The integrated module / unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer-readable storage medium. The computer program can implement the steps of each method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the computer-readable medium can include or exclude contents according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0200] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices, and computer program products of embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one flow or multiple flows and / or blocks Figure 1 The functions specified in one flow or multiple flows and / or blocks
[0201] These computer program instructions can also be stored in a computer-readable memory that can guide the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 the function specified in the one or more blocks.
[0202] These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable data processing devices provide a process for implementing the flow Figure 1 one or more processes and / or blocks Figure 1 the function specified in the one or more blocks.
[0203] The above is only to illustrate the technical idea of the present application, and cannot limit the protection scope of the present application. Any modification made according to the technical idea of the present application on the basis of the technical scheme falls within the protection scope of the claims of the present application.
Claims
1. A remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation, characterized by: The following steps are involved: Construct a comparative heterogeneous knowledge distillation network detection framework that includes a teacher network, a student network, and an assistant transformation model; A forward heterogeneous feature transformation module is constructed to convert the teacher network's token sequence into a two-dimensional feature map, matching the inductive bias of the student network's CNN to obtain the transformed teacher features. A reverse heterogeneous feature transformation module is constructed to convert the student network's two-dimensional feature map into a token sequence, input it into the teacher network for global interaction, and obtain the transformed student features. By sharing the teacher network weights, the transformed teacher features and student features are fused to build an assistant transformation model; Design a dual-attention guided adaptive sample allocation strategy, enhance feature expression through the synergy of spatial attention and channel attention, and combine cosine similarity matching and dynamic threshold partitioning strategy to divide the positive and negative sample sets. and Combine the teacher network, student network and assistant transformation model, and combine the positive and negative sample sets and Construct contrastive learning knowledge distillation, realize knowledge transfer through feature distillation loss and logical distillation loss, and output the detection result image.
2. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: The contrastive heterogeneous knowledge distillation network detection framework includes a feature extraction stage and a contrastive learning stage. In the feature extraction stage, the features of the teacher network and the student network are aligned through a bidirectional heterogeneous feature transformation module. Contrastive learning stage: Based on the DAG-AS strategy, dynamic contrast relationships are established and multi-model collaborative distillation is performed.
3. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 2 is characterized in that: The teacher model adopts a global modeling structure based on Transformer, and the student model adopts a lightweight convolutional architecture.
4. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: The forward heterogeneous feature transformation module is used to convert the token sequence generated by the Transformer teacher model into a two-dimensional feature map. Specifically: The token sequence is reshaped, and then the number of channels is adjusted to match the input dimension of CNN through 1×1 convolution. Batch normalization is used for processing, and the normalized teacher model feature F is converted to T 'As the input of the CNN student model, the residual is calculated with the feature map of the student model, and the obtained residual features are used to fuse and enhance the student network features of the next layer.
5. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: The reverse feature transformation module aims to convert the two-dimensional feature map generated by the convolutional neural network into a token representation suitable for the Transformer. Specifically: The two-dimensional convolutional features extracted by the student network are divided into fixed-size image patches through Patch Embedding and mapped into initial token sequences, achieving the conversion from spatial features to sequence representation; token features are standardized through layer normalization; At the same time, the rotational variable size attention mechanism (RVSA) is introduced; high-order semantic information is extracted through layer normalization and feedforward neural network to achieve consistent alignment with the teacher model token dimension.
6. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: The dual-attention guided adaptive sample allocation strategy includes: Dual-attention semantic enhancement module, which fuses spatial attention weights and channel attention weights to generate enhanced features; Adaptive matching strategy based on dynamic threshold, adaptively calculate dynamic threshold based on IoU mean, standard deviation and cosine similarity, and divide positive and negative sample sets and 7. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 6 is characterized in that: Dynamic threshold τ th The calculation is as follows: t th =μ IoU +a th ·s IoU -b th ·S(in,gt) Among them, μ IoU and σ IoU Represents the mean and standard deviation of IoU between the candidate box and GT, α th and β th is a hyperparameter.
8. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: The assistant transformation model is specifically: The first and second-layer multi-head attention modules of the teacher model reconstruct their own token sequences into two-dimensional feature maps through the forward feature transformation module, so that they are aligned in scale with the corresponding layer feature maps of the student network; After scale normalization, the shallow feature representation of the student model is enhanced with the help of the residual cascade isomorphic feature fusion module; the two-dimensional feature map output by the third layer of the student model is projected into a token sequence through the inverse feature transformation module, and the token sequence is input into the third and fourth layers of the multi-head attention module that shares weights with the teacher model for global information interaction; the assistant transformation model can simultaneously capture the local features of the student model and the global representation of the teacher model.
9. The remote sensing rotating target detection method based on contrastive heterogeneous knowledge distillation according to claim 1 is characterized in that: Feature Distillation Loss Specifically: Among them, f S and f T is the final feature obtained by the teacher network and the student network through the dual attention semantic enhancement module, F T represents a batch-encoded teacher network feature set, f T + is a positive sample, τ1 is the temperature parameter; Logistic Distillation Loss Specifically: in, and c represent the true target category of the input image and the predicted category of the model, respectively. C is the total number of all categories in the dataset. and are the predicted probabilities of class c by the teacher and student models, respectively, and γ is the modulation factor.
10. A remote sensing rotating target detection system based on contrastive heterogeneous knowledge distillation, characterized in that: include: Framework module, which builds a comparative heterogeneous knowledge distillation network detection framework including teacher network, student network and assistant transformation model; Transformation module: construct a forward heterogeneous feature transformation module to transform the teacher network's token sequence into a two-dimensional feature map, match the inductive bias of the student network's CNN, and obtain the transformed teacher features; construct a reverse heterogeneous feature transformation module to transform the student network's two-dimensional feature map into a token sequence, input it into the teacher network for global interaction, and obtain the transformed student features; The fusion module,by sharing the teacher network weights, fuses the transformed teacher features and student features,,and builds the assistant transformation model; The sample module designs a dual-attention guided adaptive sample allocation strategy, enhances feature expression through the synergy of spatial attention and channel attention, and combines cosine similarity matching and dynamic threshold division strategy to divide the positive and negative sample sets. and Detection module, combining teacher network, student network and assistant transformation model, combined with positive and negative sample sets and Construct contrastive learning knowledge distillation, realize knowledge transfer through feature distillation loss and logical distillation loss, and output the detection result image.
Citation Information
Cited By
Remote sensing target detection method and device based on multi-level knowledge distillation
CN120997489A
Lightweight image super-resolution method based on ViT-CNN heterogeneous distillation
CN121120397A
Lightweight image super-resolution method based on viT-cnn heterogeneous distillation
CN121120397B
Molecular communication channel adaptation method and device based on transfer learning
CN121603134A