Frequency domain adaptive refining and feature decoupling fused target detection distillation method
By employing frequency domain adaptive refinement and feature decoupling fusion, this method addresses the shortcomings of existing knowledge distillation methods in multi-scale feature alignment and noise reduction in target detection tasks, enabling the student model to perform efficient detection in complex scenarios and making it suitable for edge devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA ACADEMY OF SPACE TECHNOLOGY
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-17
AI Technical Summary
Existing knowledge distillation methods fail to effectively handle the complementarity and cross-scale alignment of multi-scale features in target detection tasks, resulting in insufficient detection accuracy and robustness of student models in complex scenes. Furthermore, noise and redundant information in teacher features are not adequately cleaned up, affecting the effectiveness of the distilled signal.
We employ a frequency-domain adaptive refinement and feature decoupling fusion approach. By using learnable multi-wavelet basis selection and cross-scale collaborative noise reduction, we refine features on the teacher's end and construct a frequency-domain guided feature decoupling fusion structure on the student's end. Combined with a space-frequency-scale three-dimensional collaborative attention mechanism, we achieve adaptive feature refinement and enhanced fusion.
It significantly improves the detection accuracy and robustness of the lightweight student model in complex object detection tasks, ensures the accuracy and efficiency of the knowledge transfer process, and reduces deployment computational overhead, making it suitable for edge devices.
Smart Images

Figure CN121883808A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and computer vision technology, specifically to a target detection distillation method that combines frequency domain adaptive refinement and feature decoupling fusion. Background Technology
[0002] With the widespread application of deep learning in computer vision, object detection models based on convolutional neural networks have achieved significant breakthroughs in accuracy. However, high-precision detection models typically rely on deep and complex network structures, resulting in a large number of parameters and high computational overhead, making them difficult to deploy in edge scenarios with limited computing and storage resources, such as drones, mobile terminals, and embedded devices. Model lightweighting techniques are a key approach to resolving this contradiction.
[0003] Knowledge distillation, as an effective model compression technique, introduces a higher-performance "teacher" model to guide the training of a lightweight "student" model, thereby reducing the model size while maintaining or approximating the performance of the teacher model. The typical approach is to first train the teacher model, then use its output or intermediate features as soft labels or guiding signals, combined with the true labels from the training data, to optimize the student model. This allows the student model to improve inference efficiency and retain detection accuracy as much as possible while significantly reducing the number of parameters and computational complexity.
[0004] However, directly transferring knowledge distillation from classification tasks to object detection tasks is not readily feasible. Object detection typically involves both classification and bounding box regression tasks, and its feature maps possess multi-scale, multi-layered semantic and detailed information. Most existing distillation methods focus on aligning the teacher and student at the prediction output, or performing point-by-point matching on single-scale intermediate layers, failing to adequately address the complementary nature of multi-scale features and cross-scale alignment issues in object detection. This results in the student model struggling to simultaneously achieve good localization accuracy and category recognition capabilities.
[0005] Furthermore, in practical applications, the intermediate features of the teacher model often contain noise and redundant information from data acquisition, preprocessing, or feature extraction processes. If unfiltered teacher features are directly used as the distillation target, noise will be indiscriminately transmitted to the student model, thereby reducing the effectiveness of the distilled signal and affecting the generalization ability and robustness of the student network. Existing publicly available distillation techniques pay little attention to how to perform structured purification of teacher features in the distillation process to improve distillation quality.
[0006] Furthermore, the effective fusion of multi-scale features and the allocation of importance for channels and spatial dimensions are also weaknesses in existing technologies. Even though some works have introduced attention mechanisms or multi-scale distillation, many methods do not simultaneously address these issues: constructing top-down and bottom-up leapfrog multi-scale interaction pathways on the student side to maintain the transmission of semantics and details; performing fine-grained weighting and adaptation of channels and spatial dimensions during the fusion process; and lacking robust alignment strategies, especially when the number of channels or resolutions of teachers and students do not match, thus reducing the improvement effect of distillation in complex scenarios.
[0007] In existing technologies, such as Chinese invention patent CN120656063A, a remote sensing knowledge distillation method based on dual-mode feature spectrum decoupling is disclosed. This method decomposes features into low-frequency and high-frequency components using two-dimensional discrete wavelet transform, and performs explicit and implicit distillation respectively. While this method introduces frequency domain concepts, it still has the following shortcomings: First, its wavelet transform uses fixed basis functions, making it unable to adaptively select the optimal frequency domain decomposition strategy based on the characteristics of features at different levels, thus limiting the noise reduction effect. Second, its feature distillation process does not further decouple features into components with different attributes such as geometric and semantic properties, nor does it utilize frequency domain information to dynamically guide the fusion of multi-scale features, resulting in insufficient enhancement of feature representation capabilities for complex scenes. Another example is Chinese invention patent CN119647555A, which discloses a knowledge distillation method based on frequency domain optimization, which also utilizes wavelet transform for frequency band decomposition. However, this method focuses on finding interest pixels in the frequency domain and does not involve active purification (denoising) of teacher features, nor does it construct a feature decoupling and enhancement fusion mechanism for multi-scale target detection.
[0008] Therefore, a new knowledge distillation scheme is urgently needed. This scheme can achieve adaptive and collaborative frequency domain denoising of intermediate features on the teacher side to improve the quality of knowledge sources. On the student side, it can utilize the frequency domain priors contained in the purified teacher features to guide the decoupling and enhancement fusion of student multi-scale features, thereby comprehensively improving the accuracy and robustness of lightweight student models in complex target detection tasks. Summary of the Invention
[0009] In view of the above-mentioned technical problems, this invention proposes a target detection distillation method that combines frequency domain adaptive refinement and feature decoupling fusion. On the teacher side, feature purification is achieved through learnable multi-wavelet basis adaptive selection and cross-scale collaborative noise reduction. On the student side, a frequency domain-guided feature decoupling fusion structure is constructed, which separates and processes geometric and semantic information and dynamically adjusts the fusion weights through frequency domain priors. At the same time, a spatial-frequency-scale three-dimensional collaborative attention mechanism is embedded, and a robust cross-scale and channel alignment mechanism is provided, enabling feature-level distillation and prediction head distillation to work together. Thus, while ensuring the lightweight nature of the student model, the detection accuracy and robustness of the target detection task are significantly improved.
[0010] The technical solution to the technical problem of this invention is: a target detection distillation method that combines frequency domain adaptive refining and feature decoupling fusion, comprising the following steps:
[0011] Step S1: Construct a teacher-student knowledge distillation framework, in which the teacher network and student network share the target detection task;
[0012] Step S2: Adaptive frequency domain knowledge refinement is performed on the intermediate features of the teacher network. The optimal wavelet transform parameters of each layer of features are dynamically determined by a learnable multi-wavelet basis selection network. The features are decomposed into low-frequency sub-bands and multi-directional high-frequency sub-bands by using two-dimensional discrete wavelet transform. The spatial correlation between different sub-bands is captured by a cross-scale wavelet coefficient spatial correlation module. The high-frequency sub-bands are denoised collaboratively by an adaptive threshold network and a soft threshold function. The teacher denoised features are then reconstructed.
[0013] Step S3: Apply the frequency domain-guided scale-aware feature pyramid module to the student network to decouple the multi-scale features extracted by the student network into geometric structure components and semantic content components. Use the teacher denoising features to generate a frequency domain response map to dynamically guide the fusion weights of features at each level. Combine the bidirectional information flow from top to bottom and bottom to top, and embed channel attention and spatial attention mechanisms to achieve three-dimensional collaborative feature enhancement of space-frequency domain-scale, and output student fusion features.
[0014] Step S4: Align the teacher's denoised features and the student's fused features in the channel dimension and spatial dimension using the cross-scale feature alignment module;
[0015] Step S5: Train the student network based on feature distillation loss and prediction head distillation loss;
[0016] Step S6: In the inference phase, load the trained student network weights and remove the teacher network and the cross-scale feature alignment module to achieve lightweight deployment.
[0017] According to one technical solution of the present invention, step S2 specifically includes:
[0018] Step S21: Analyze the spectral distribution of the input features through the learnable multi-wavelet basis selection network, and dynamically output the wavelet basis type weights, decomposition scale parameters, and direction parameters;
[0019] Step S22: Perform a two-dimensional discrete wavelet transform on the intermediate features of the teachers, decomposing them into one low-frequency sub-band and three high-frequency sub-bands;
[0020] Step S23: Through the cross-scale wavelet coefficient spatial correlation module, deformable convolution and cross-subband attention calculation are performed on the three high-frequency subbands to capture the spatial dependencies between subbands;
[0021] Step S24: Using the adaptive threshold network, a spatial and channel adaptive threshold mapping is generated based on channel statistics, and a soft threshold function is used to shrink and denoise the high-frequency subband after spatial correlation processing.
[0022] Step S25: Perform inverse wavelet transform on the denoised high-frequency sub-band and the low-frequency sub-band to reconstruct the preliminary purification features;
[0023] Step S26: Perform residual fusion of the preliminary purified features and the original teacher intermediate features according to learnable weights to generate the final teacher denoising features.
[0024] According to one technical solution of the present invention, in step S23, the execution process of the cross-scale wavelet coefficient spatial correlation module includes:
[0025] The three high-frequency subbands are respectively input into the deformable convolutional layer to learn the spatial offset;
[0026] The processed subbands are concatenated along the channel dimension, and cross-subband interaction weights are generated through a channel attention mechanism that includes global average pooling and a fully connected layer.
[0027] The cross-subband interaction weights are applied back to each subband respectively.
[0028] According to one technical solution of the present invention, step S3 specifically includes:
[0029] Step S31, Feature Decoupling: For each scale feature extracted by the student network, the geometric structure component is extracted by high-pass filtering and edge detection operator, and the semantic content component is extracted by depthwise separable convolution.
[0030] Step S32, Frequency Domain Guidance: Perform a Fast Fourier Transform on the teacher denoising features, calculate their frequency energy distribution, and generate a frequency domain attention map through a convolutional layer and activation function, which serves as the frequency domain response map;
[0031] Step S33, Bidirectional Fusion: Establish a top-down path, upsample the deep geometric structure components and semantic content components respectively and fuse them with the corresponding shallow components according to the weights of the frequency domain response map to enhance the semantic expressive power of the shallow features; establish a bottom-up path, downsample the shallow geometric structure components and semantic content components respectively and fuse them with the corresponding deep components to supplement the detailed information of the deep features.
[0032] Step S34, Attention Enhancement: The bidirectional fused geometric structure component and semantic content component are enhanced independently by applying the channel attention module and the spatial attention module, respectively.
[0033] Step S35, Feature Reorganization: The enhanced geometric structure component and semantic content component are concatenated in the channel dimension and residually connected with the original student features to generate the student fusion feature.
[0034] According to one technical solution of the present invention, the channel attention module obtains the channel description vector through global average pooling, and generates channel weights through two fully connected layers and a Sigmoid function; the spatial attention module performs max pooling and average pooling on the input features respectively in the channel dimension, concatenates the results, and generates a spatial weight map through a convolutional layer and a Sigmoid function.
[0035] According to one technical solution of the present invention, step S4 specifically includes:
[0036] Step S41, Spatial Size Alignment: Compare the spatial sizes of the teacher denoising features and the student fusion features, and adjust them by bilinear interpolation upsampling or pooling downsampling to make their spatial sizes consistent.
[0037] Step S42, Channel Alignment: When the number of channels is different, adjust it using 1×1 convolutional projection;
[0038] Step S43, Geometric Alignment Optimization: During the alignment process, the geometric components in the teacher denoising features are processed by bilateral filtering to preserve edges;
[0039] Step S44, Semantic Alignment Optimization: During the alignment process, the semantic components in the teacher denoising features are processed using content-aware interpolation.
[0040] According to one technical solution of the present invention, the feature distillation loss in step S5 includes frequency domain feature loss, geometric structure loss, semantic content loss, weighted mean square error loss, and cosine similarity loss;
[0041] The frequency domain feature loss is the difference in the spectrum between the student fusion feature and the teacher denoising feature after Fourier transform;
[0042] The geometric loss is calculated based on structural similarity indices and edge consistency.
[0043] The semantic content loss is calculated based on cosine similarity and differences in high-level perceptual features.
[0044] According to one technical solution of the present invention, the predicted head distillation loss in step S5 includes:
[0045] Classification distillation loss: Calculate the softened cross-entropy loss based on the temperature-scaled teacher and student classification logic values;
[0046] Regression distillation loss: calculated based on the complete crossover ratio between teacher and student predicted bounding boxes.
[0047] According to a technical solution of the present invention, in step S5, the total training loss of the student network is... Characteristic distillation loss Classification of distillation losses Regression distillation loss And the loss of students' original online testing tasks The weighted sum is expressed as:
[0048] ,
[0049] in, , , It is an adjustable balancing weight.
[0050] According to one aspect of the present invention, a target detection distillation system for frequency domain adaptive refining and feature decoupling fusion is proposed, for implementing the method as described in any one of the above technical solutions, comprising:
[0051] The teacher network module is used to extract multi-scale features from the input image;
[0052] An adaptive frequency domain knowledge refinement module, connected to the teacher network module, is used to refine teacher features and output denoised teacher features.
[0053] The frequency domain-guided scale-aware feature pyramid module is connected to the feature extraction part of the student network. It is used to decouple, guide, fuse and enhance student features, and output student fused features.
[0054] A cross-scale feature alignment module is used to align the teacher's denoised features with the student's fused features;
[0055] The loss calculation and optimization module is used to calculate various losses and update student network parameters;
[0056] After training, only the student network module and its frequency-domain guided scale-aware feature pyramid module are retained for inference deployment.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] This invention presents a target detection distillation method that combines frequency-domain adaptive refinement and feature decoupling fusion. Through a learnable multi-wavelet basis selection network and a cross-scale collaborative denoising mechanism, it improves the quality of teacher features and the effectiveness of the distilled signal. It can adaptively filter the frequency-domain characteristics of features at different levels, effectively suppressing noise and redundancy in teacher features while preserving key structural and semantic information. This provides a cleaner, higher-quality knowledge source for student networks, alleviating noise propagation problems at the source and laying the foundation for improved robustness of student models.
[0059] This invention enhances the multi-scale feature representation capability of student networks. By decoupling features into geometric structure components and semantic content components, and utilizing teacher frequency domain priors for dynamic guided fusion, this invention achieves a more discriminative representation of multi-scale features. Combining a bidirectional propagation path and a dual attention mechanism, this design adaptively enhances the key features of targets at different scales (especially small targets) while suppressing background interference, significantly improving the feature capture and discrimination capabilities of student models in complex scenes.
[0060] This invention achieves refined and differentiated feature alignment. The cross-scale feature alignment module designs differentiated alignment strategies that preserve structure and are content-aware for different attributes of geometric and semantic components, ensuring the comparability and accuracy of distillation loss calculation at the spatial and semantic levels, making the knowledge transfer process more accurate and efficient.
[0061] This invention ensures lightweight deployment and practicality. The teacher network and alignment module in the entire distillation framework are only used during the training phase. During the inference phase, only the lightweight student network needs to be loaded, without introducing any additional computational overhead. This perfectly meets the dual requirements of edge devices for model efficiency and accuracy, and has high engineering application value. Attached Figure Description
[0062] Figure 1 This is a schematic diagram illustrating the complete process from model training to deployment of a target detection distillation method that combines frequency domain adaptive refinement and feature decoupling fusion in one embodiment of the present invention.
[0063] Figure 2 This is a schematic diagram of the target detection distillation system that combines frequency domain adaptive refining and feature decoupling fusion in one embodiment of the present invention;
[0064] Figure 3 The schematic structure of the teacher feature adaptive frequency domain knowledge refinement module in one embodiment of the present invention includes a multi-wavelet basis selection network, a cross-scale wavelet coefficient spatial correlation module, and an adaptive threshold network.
[0065] Figure 4This is a schematic structure of a student-side frequency domain-guided scale-aware feature pyramid module in one embodiment of the present invention, including a feature decoupling network, a frequency domain response map generation network, a bidirectional feature propagation path, and a dual attention mechanism. Detailed Implementation
[0066] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0067] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The embodiments cannot be described in detail here, but the embodiments of the present invention are not limited to the following embodiments.
[0068] This invention presents a target detection distillation method that combines adaptive frequency domain refinement with feature decoupling. It innovatively proposes an adaptive frequency domain knowledge refinement mechanism. This mechanism dynamically determines the optimal frequency domain decomposition strategy for each feature layer through a learnable multi-wavelet basis selection network and designs a cross-scale wavelet coefficient spatial correlation module to capture the spatial dependencies between different sub-bands. This achieves collaborative noise reduction rather than independent denoising, significantly improving feature purity. Compared to traditional fixed wavelet basis and independent threshold processing methods, this invention's adaptive frequency domain refinement mechanism can automatically optimize frequency domain decomposition parameters for different detection levels, effectively suppressing noise interference while preserving key structural information. This alleviates the performance degradation problem of student models caused by noise feature propagation in traditional distillation methods.
[0069] To further optimize the feature representation capabilities of the student network, this invention designs a frequency-domain guided scale-aware feature pyramid module. This module innovatively decouples multi-scale features into geometric structural components (edges, textures, contours) and semantic content components (category, location, scale), and dynamically adjusts the fusion weights of features at each level using the teacher network's frequency domain response map as prior knowledge. By implementing top-down and bottom-up information flow and embedding channel attention and spatial attention mechanisms, this module achieves three-dimensional collaborative feature enhancement across space, frequency domain, and scale, dynamically enhancing key features at different scales and spatial locations, and better handling the complex and varied scale changes and background interference in object detection tasks.
[0070] like Figure 1 and Figure 4 As shown, specifically, the target detection distillation method of the present invention, which combines frequency domain adaptive refinement and feature decoupling fusion, includes the following steps:
[0071] Step S1: Construct a teacher-student knowledge distillation framework, in which the teacher network and student network share the target detection task;
[0072] A large-scale object detection model, YOLOv8s, was selected as the teacher network, and a lightweight object detection model, YOLOv8n, was selected as the student network. The teacher network was pre-trained to convergence on the object detection dataset, and its parameters were frozen during distillation training. The student network was randomly initialized or loaded with the pre-trained weights of the lightweight model. Both the teacher and student networks accepted the same input image and output their respective multi-scale features and detection results.
[0073] Step S2: Adaptive frequency domain knowledge refinement is performed on the intermediate features of the teacher network. The optimal wavelet transform parameters of each layer of features are dynamically determined by a learnable multi-wavelet basis selection network. The features are decomposed into low-frequency sub-bands and multi-directional high-frequency sub-bands by using two-dimensional discrete wavelet transform. The spatial correlation between different sub-bands is captured by the cross-scale wavelet coefficient spatial correlation module. The high-frequency sub-bands are denoised collaboratively by an adaptive threshold network and a soft threshold function. The teacher denoised features are then reconstructed.
[0074] Adaptive frequency domain knowledge refinement is performed on the intermediate features of the teacher network. Feature maps at three typical scales (e.g., feature maps with downsampling factors of 8, 16, and 32, denoted as P3, P4, and P5) from the neck region of the teacher network are selected as the processing objects. The refinement module designed in this implementation (structure shown in...) Figure 3 These features are then subjected to adaptive wavelet basis selection, frequency domain decomposition, cross-subband collaborative denoising, and feature reconstruction to obtain purified teacher denoised features. This process aims to filter out noise interference in the feature map while preserving and enhancing key frequency domain information relevant to the target.
[0075] Step S3: Apply the frequency domain-guided scale-aware feature pyramid module in the student network to decouple the multi-scale features extracted by the student network into geometric structure components and semantic content components. Use the teacher's denoising features to generate a frequency domain response map to dynamically guide the fusion weights of features at each level. Combine the bidirectional information flow from top to bottom and bottom to top, and embed channel attention and spatial attention mechanisms to achieve three-dimensional collaborative feature enhancement of space-frequency domain-scale, and output student fusion features.
[0076] A frequency-domain guided scale-aware feature pyramid module is applied in a student network. (The module's structure is shown in...) Figure 4The system receives feature maps of the student network at corresponding scales (P3, P4, P5) and teacher-derived denoised features at the corresponding scales obtained from step S2. First, the student features are decoupled into geometric structural components characterizing edges and textures, and semantic content components implying categories and locations. Then, a frequency domain response map is generated using the teacher-derived features, serving as prior knowledge to dynamically calculate the weights of features at each scale during fusion. Feature propagation and fusion are performed through two paths: top-down (semantic enhancement) and bottom-up (detail enhancement), with channel attention and spatial attention mechanisms embedded in the geometric and semantic branches respectively for enhancement. The final output is the student fused feature enhanced in three dimensions (space-frequency domain-scale).
[0077] Step S4: Align the teacher's denoised features and the student's fused features in the channel dimension and spatial dimension using the cross-scale feature alignment module;
[0078] The teacher's denoised features and the student's fused features are aligned using a cross-scale feature alignment module. Due to the structural differences between the teacher and student networks, their feature maps may differ in spatial size and number of channels. This step first performs bilinear interpolation adjustment of the spatial size and 1×1 convolutional projection of the number of channels to achieve basic alignment. Furthermore, for the geometric structure components, edge-preserving filtering (such as bilateral filtering) is used to maintain structural sharpness; for the semantic content components, content-aware interpolation is used to maintain semantic consistency, thereby completing fine-grained alignment.
[0079] Step S5: Train the student network based on feature distillation loss and prediction head distillation loss;
[0080] Based on the aligned features, a comprehensive distillation loss is calculated to train the student network. The total loss consists of multiple parts: feature distillation loss (including frequency domain loss, geometric structure loss, semantic content loss, etc.), prediction head distillation loss (including classification distillation loss and regression distillation loss), and the student network's own detection task loss (such as classification loss and localization loss). The parameters of the student network are optimized through gradient backpropagation, while the parameters of the teacher network remain unchanged.
[0081] Step S6: During the inference phase, the trained student network weights are loaded, and the teacher network and cross-scale feature alignment module are removed to achieve lightweight deployment. The frequency-domain guided scale-aware feature pyramid module generates frequency-domain guided weights based on the student features themselves during the inference phase, without relying on the teacher network.
[0082] Specifically, after training, the weights of the student network are saved as a separate model file. During actual deployment, only the student network is loaded, removing auxiliary structures such as the teacher network, wavelet denoising module, and cross-scale alignment module, retaining only the backbone, neck, and detection head of the student network. During the inference phase, the frequency domain response map generation network (including 1×1 convolutional layers and their weights) learned during training is embedded as part of the student network. This network directly generates frequency domain guided weights based on the student's own feature maps, no longer relying on the teacher network. This allows the network to benefit from the knowledge guidance and multi-scale fusion performance improvements of the teacher network during training, without adding any additional computational burden or storage overhead during inference, thus meeting the lightweight deployment requirements.
[0083] By utilizing two stages—teacher feature purification and student feature enhancement—the quality of knowledge transferred from the teacher network is improved, and the transmission of invalid or harmful information is reduced. Furthermore, by using the purified knowledge (especially its frequency domain information) to guide the feature representation learning within the student network, decoupling and adaptive enhancement of multi-scale and multi-attribute features are achieved. This enables the lightweight student network to not only mimic the output of the teacher network but also to deeply understand and reconstruct its excellent feature representation mechanism. Thus, while significantly reducing model size and computational cost, the detection performance of the teacher network is effectively approximated, which is particularly helpful in improving performance in challenging scenarios such as small targets, dense targets, and complex backgrounds.
[0084] In some embodiments of the present invention, step S1 further includes: performing data augmentation operations on the acquired training dataset, including a combination of a series of techniques such as random cropping, horizontal or vertical flipping, color dithering, Mosaic stitching, MixUp blending, random scaling, perspective transformation, and noise addition, in order to generate diverse training samples and enhance the model's generalization ability.
[0085] For example, two publicly available and challenging remote sensing image target detection datasets (DIOR and SSDD) were selected as experimental datasets, and training, testing, and validation sets were defined. The original resolution remote sensing images in these datasets were uniformly resized to 512×512 pixels. The mean and variance of the ImageNet dataset were used to standardize the data; specifically, the mean was subtracted from each channel, and then the result was divided by the variance. Data augmentation was then applied to the standardized dataset, including a combination of techniques such as rotation, scaling, cropping, translation, flipping, color transformation, noise addition, image blending, and perspective transformation.
[0086] In some embodiments of the present invention, step S2 involves adaptive frequency domain knowledge refinement of the selected intermediate features of the teacher network to fully suppress noise interference and retain key target feature information. Specifically, this includes:
[0087] Step S21: Analyze the spectral distribution of the input features through a learnable multi-wavelet basis selection network, and dynamically output the wavelet basis type weights, decomposition scale parameters, and orientation parameters.
[0088] Step S22: Perform a two-dimensional discrete wavelet transform on the intermediate features of the teachers, decomposing them into one low-frequency sub-band and three high-frequency sub-bands;
[0089] Step S23: Using the cross-scale wavelet coefficient spatial correlation module, deformable convolution and cross-subband attention calculation are performed on the three high-frequency subbands to capture the spatial dependencies between subbands. The execution process of the cross-scale wavelet coefficient spatial correlation module includes:
[0090] The three high-frequency subbands are respectively input into the deformable convolutional layer to learn the spatial offset;
[0091] The processed subbands are concatenated along the channel dimension, and cross-subband interaction weights are generated through a channel attention mechanism that includes global average pooling and a fully connected layer.
[0092] Apply the cross-subband interaction weights back to each subband respectively;
[0093] Step S24: Using an adaptive thresholding network, a spatial and channel adaptive threshold mapping is generated based on channel statistics, and a soft thresholding function is used to shrink and denoise the high-frequency subband after spatial correlation processing.
[0094] Step S25: Perform inverse wavelet transform on the denoised high-frequency subband and low-frequency subband to reconstruct the preliminary purification features;
[0095] Step S26: Perform residual fusion of the preliminary purified features and the original teacher intermediate features according to learnable weights to generate the final teacher denoising features.
[0096] See Figure 3 (Structure diagram of the adaptive frequency domain knowledge refinement module for teacher features) During the forward propagation of the teacher network, several key intermediate layer feature maps are selected as the objects for refinement and noise reduction. In this embodiment, three scale feature maps (P3, P4, and P5 features corresponding to downsampling factors stride=8, 16, and 32) are selected from the output of the Neck part of the teacher network.
[0097] Design a multi-wavelet basis adaptive selection network. This network analyzes the spectral distribution characteristics of the input features through a lightweight feature encoder and dynamically outputs wavelet basis type weights. Specifically, the process first... Global average pooling is performed to obtain the channel-level description vector z:
[0098] ,
[0099] Then, wavelet basis selection weights are generated through a two-layer fully connected network:
[0100] , ,
[0101] in, Reduce the number of channels from C to C / r (r=16 is the reduction ratio). Map dimensions to (Number of candidate wavelet bases, in this embodiment) (corresponding to four wavelet bases: Haar, db2, db4, and sym2).
[0102] For each selected scale feature map, first determine if its spatial size is greater than a preset threshold (e.g., 16×16). If the condition is met, perform weighted wavelet transform decomposition on the feature map. Perform a two-dimensional discrete wavelet transform on each candidate wavelet basis, and then fuse them according to the weights:
[0103]
[0104] in, This represents the discrete wavelet transform using the i-th wavelet basis, where LL is the low-frequency subband containing the main structural and semantic information; LH, HL, and HH are three high-frequency subbands containing details and noise components.
[0105] Design a cross-scale wavelet coefficient spatial correlation module. This module achieves collaborative noise reduction by capturing the spatial dependencies between different sub-bands, and includes the following sub-modules: a deformable convolution module, which applies deformable convolution to the three high-frequency sub-bands respectively, and learns adaptive sampling offsets, taking LH as an example:
[0106]
[0107] Where DefConv is a deformable convolution operation and offset is the learned spatial offset.
[0108] The cross-subband attention module concatenates the three high-frequency subbands along the channel dimension, generates cross-subband interaction weights through a channel attention mechanism, and then applies these attention weights to each subband.
[0109]
[0110]
[0111] An adaptive threshold generation network is designed to process the high-frequency subbands enhanced by spatial correlation. This network captures channel statistics through a global average pooling layer, then sequentially passes through a 1×1 convolutional layer for dimensionality reduction, a ReLU activation function, a 1×1 convolutional layer for dimensionality increase, and a Sigmoid activation function to finally generate the threshold weight mapping w. The specific calculation process is as follows:
[0112]
[0113]
[0114] Then, the threshold weights are compared with the local standard deviations of each high-frequency sub-band. Multiply by, and multiply by a learnable scaling factor The final adaptive threshold is obtained. :
[0115]
[0116] in, w is obtained by calculating the standard deviation of the high-frequency subband within a local window (such as 3×3 or 5×5), and is extended to the same spatial size as the high-frequency subband through a broadcast mechanism.
[0117] A soft thresholding function is used to shrink each high-frequency subband, achieving adaptive suppression of noise components:
[0118]
[0119] in, Let represent any high-frequency subband obtained through a cross-scale wavelet coefficient spatial correlation module, where 'sign' is the sign function and 'ReLU' is the modified linear unit. The adaptive threshold is calculated above. Compared to hard thresholding, the soft thresholding strategy can maintain the continuity of features and avoid introducing artifacts.
[0120] The cleaned feature map is reconstructed from the processed low-frequency subband LL and the denoised high-frequency subband using inverse wavelet transform.
[0121]
[0122] To further stabilize training and avoid information loss due to over-filtering, the original teacher features were... With denoising features Weighted by learnable residuals To merge:
[0123]
[0124] in, The optimal fusion ratio is automatically learned through backpropagation. The final output... This is the teacher denoising feature, which will be used for subsequent feature decoupling, frequency domain prior generation, and distillation loss calculation.
[0125] In some embodiments of the present invention, step S3, applying a frequency-domain guided scale-aware feature pyramid module in the student network to achieve spatial-frequency-scale three-dimensional collaborative feature enhancement, specifically includes:
[0126] Step S31, Feature Decoupling: For each scale feature extracted by the student network, the geometric structure component is extracted by high-pass filtering and edge detection operator, and the semantic content component is extracted by depthwise separable convolution.
[0127] The geometric decoupling branch uses high-pass filters (such as Sobel operators and Laplacian operators) and edge detection operators to extract structural features such as edges, textures, and contours. After 3×3 convolution and BatchNorm normalization, the geometric components are obtained. The semantic decoupling branch uses depthwise separable convolution to extract content features such as category, location, and scale. After 1×1 convolution projection, the semantic components are obtained.
[0128] Step S32, Frequency Domain Guidance: Perform Fast Fourier Transform on the teacher's denoised features, calculate its frequency energy distribution, and generate a frequency domain attention map through a convolutional layer and activation function, which serves as the frequency domain response map;
[0129] First, a Fast Fourier Transform is performed on the denoised features of the teacher; then, the energy distribution of different frequency components is extracted, and a frequency domain attention map is generated through 1×1 convolution and Sigmoid activation. This frequency domain attention map reflects the response intensity of targets at different scales in the frequency domain space, and is used to dynamically adjust the fusion weights of features at each level in subsequent steps.
[0130] Step S33, Bidirectional Fusion: Upsample the deep geometric structure components and semantic content components respectively and fuse them with the corresponding shallow components according to the weights of the frequency domain response map to enhance the semantic expressive power of the shallow features; establish a bottom-up path, downsample the shallow geometric structure components and semantic content components respectively and fuse them with the corresponding deep components to supplement the detailed information of the deep features.
[0131] Step S34, Attention Enhancement: For the bidirectional fused geometric structure component and semantic content component, the channel attention module and spatial attention module are applied independently to enhance them respectively. The channel attention module obtains the channel description vector through global average pooling, and generates channel weights through two fully connected layers and the Sigmoid function. The spatial attention module performs max pooling and average pooling on the input features in the channel dimension respectively, concatenates the results, and generates a spatial weight map through a convolutional layer and the Sigmoid function.
[0132] Step S35, Feature Reorganization: The enhanced geometric structure component and semantic content component are concatenated in the channel dimension and residually connected with the original student features to generate student fusion features.
[0133] See Figure 4 (Structure diagram of the frequency domain-guided scale-aware feature pyramid module) This module receives three scale feature maps from the Neck part of the student network. , , And denoising features from the corresponding scale of the teacher network. .
[0134] In the feature decoupling stage, the geometric structure components and semantic content components of each scale feature of the student network are separated:
[0135]
[0136]
[0137] in, Sobel and Laplacian are edge detection operators. This indicates feature concatenation. DepthwiseSepConv is a depthwise separable convolution.
[0138] Frequency domain priors are generated using the denoising features of the teacher network. First, a Fast Fourier Transform is performed on the denoising features of the teacher network, then the energy distribution of the frequency components is extracted, and finally, a frequency domain attention map is generated through 1×1 convolution and Sigmoid activation.
[0139] , , ;
[0140] Establish a top-down feature propagation path. Starting from the deepest layer P5, high semantic features are propagated to the shallower layers P4 and P3 through bilinear interpolation upsampling. Geometric and semantic components are processed separately:
[0141] Top-down propagation of semantic components, taking P4 as an example:
[0142] ,
[0143] ,
[0144] Top-down propagation of geometric components:
[0145]
[0146] in, The P4 layer provides learnable fusion weights, where Upsample represents bilinear interpolation upsampling (upsampling factor of 2), and Conv is a 1×1 convolution used for channel alignment. This path enhances the semantic expressiveness of shallow features.
[0147] Establish a bottom-up feature propagation path. Starting from the shallow layer P3, high-resolution features are passed to the deeper layers P4 and P5 through strided convolution or pooling downsampling operations, enabling bottom-up propagation of semantic components:
[0148]
[0149]
[0150] Bottom-up propagation of geometric components:
[0151]
[0152] in, For the learnable fusion weights of layer P4, StrideConv represents a 3×3 convolution downsampling with a stride of 2.
[0153] A dual attention enhancement mechanism is employed. Channel attention and spatial attention are applied to the fused geometric and semantic components, respectively. Taking the semantic component as an example:
[0154] Channel attention module:
[0155]
[0156]
[0157] in, Reduce the number of channels from C to C / 16. The dimension is increased back to C. The channel attention calculation for the geometric components is similar.
[0158] Spatial attention module:
[0159]
[0160]
[0161] Here, MaxPool and AvgPool represent max pooling and average pooling along the channel dimension, respectively, Concat represents the concatenation operation, and Conv is a 7×7 convolution. The spatial attention calculation for the geometric components is similar.
[0162] The geometric components, enhanced by bidirectional propagation and dual attention, are then re-integrated with the semantic components:
[0163]
[0164] The Residual component represents the residual connection, ensuring training stability. The final output is student fusion features at three scales, used for subsequent cross-scale alignment and distillation loss calculations.
[0165] In some embodiments of the present invention, step S4 involves aligning the teacher's denoised features and the student's fused features in both the channel and spatial dimensions using a cross-scale feature alignment module. Alignment strategies are designed for the decoupled geometric and semantic components to ensure the comparability of features during the distillation process. Specifically, this includes:
[0166] Step S41, Spatial Size Alignment: Compare the spatial sizes of the teacher's denoised features and the student's fused features, and adjust them by bilinear interpolation upsampling or pooling downsampling to make their spatial sizes consistent.
[0167] Step S42, Channel Alignment: When the number of channels is different, adjust it using 1×1 convolutional projection;
[0168] Step S43, Geometric Alignment Optimization: During the alignment process, the geometric components in the teacher's denoising features are processed by bilateral filtering to preserve edges;
[0169] Step S44, Semantic Alignment Optimization: During the alignment process, the semantic components in the teacher's denoising features are processed using content-aware interpolation.
[0170] For each scale Denoising features of teachers Features of integration with students .
[0171] Spatial resolution alignment, based on teacher feature size With student feature size The size relationship should be considered, and appropriate adjustment strategies should be adopted: when When adaptive average pooling or bilinear interpolation downsampling is used, Bilinear interpolation upsampling was used to adjust teacher features to the same spatial size as student features.
[0172] ,
[0173] The Resize operation automatically selects either average pooling or upsampling strategy based on the size relationship.
[0174] Channel dimension alignment, when the number of teacher feature channels Number of student characteristic channels When there is a discrepancy, a 1×1 convolutional projection is used to adjust the number of channels in the teacher features to be the same as that in the student features:
[0175] ,
[0176] Where Conv is a 1×1 convolutional layer with the number of input channels being... The number of output channels is .
[0177] Geometric component differentiation alignment strategy. For geometric structure information, a structure-preserving alignment method is adopted, first using an edge-preserving filter (bilateral filtering) during spatial adjustment:
[0178] ,
[0179] Structural similarity constraints are introduced to ensure that the aligned geometric components retain their original structural properties:
[0180] ,
[0181] Semantic component differentiation alignment strategy. For semantic content information, a semantically preserving alignment method is adopted, first using a content-aware interpolation method:
[0182]
[0183] Introducing semantic similarity metrics:
[0184] .
[0185] Fault tolerance. To improve robustness, a fault tolerance strategy is incorporated into the alignment process. If the size difference between the teacher and student feature maps is too large (e.g., the ratio exceeds 4 times), direct interpolation may lead to severe distortion. Therefore, center cropping or edge padding is performed first to make the sizes closer before interpolation. When anomalies occur, such as a size of 0 or a number of channels of 0, the distillation loss calculation for that scale is skipped and a warning log is recorded to ensure the stability of the training process.
[0186] After the above alignment operation, the teacher denoising features and the student fused features are completely consistent in spatial size and number of channels, and can be used for subsequent feature distillation loss calculation.
[0187] In some embodiments of the present invention, the student network is trained using feature distillation loss and prediction head distillation loss, and the trained model weights are saved. During the training phase, both the teacher network and the student network perform forward propagation on the input image simultaneously. The parameters of the teacher network are kept frozen (requires grad=False), and only the parameters of the student network are updated.
[0188] Feature distillation loss includes frequency domain feature loss, geometric structure loss, semantic content loss, weighted mean square error loss, and cosine similarity loss;
[0189] The frequency domain feature loss represents the spectral difference between the student-fused features and the teacher-denoised features after Fourier transform; this loss constrains the consistency of student and teacher features in the frequency domain. The aligned student and teacher features are then subjected to FFT transforms, and the L2 distance of the spectra is calculated.
[0190] ,
[0191] Where K is the number of scales.
[0192] Geometric structure loss is calculated based on structural similarity indices and edge consistency; it constrains the consistency of student and teacher features in their geometric structure components. Using structural similarity loss and edge consistency loss, it is expressed as:
[0193]
[0194] in, The weights are the edge loss weights, and Sobel is the edge extraction operator.
[0195] Semantic content loss is calculated based on cosine similarity and high-level perceptual feature differences; semantic content loss can constrain the consistency of student features and teacher features in semantic content components. Using cosine similarity loss and perceptual loss, it is expressed as:
[0196]
[0197] in, To perceive the loss weights, VGG is a high-level feature extractor with fixed parameters.
[0198] The weighted mean square error and cosine similarity loss can constrain the overall features. For each aligned scale k, calculate:
[0199] ,
[0200] ,
[0201] in, Let i be the number of channels, and i represent the i-th channel. This refers to the attention weighting coefficient based on teacher characteristics.
[0202] The total weighted feature loss is then: ;in, These are the weighting coefficients.
[0203] Total characteristic distillation loss:
[0204] ,
[0205] in, These are the weighting coefficients for each loss term (which can be adjusted based on the performance of the validation set).
[0206] Predicted head distillation losses include:
[0207] Classification distillation loss: Calculate the softened cross-entropy loss based on the temperature-scaled teacher and student classification logic values;
[0208] Categorical distillation employs a soft-target distillation strategy based on temperature T. For the categorical logits of teachers and students (denoted as...),... and First, divide by the temperature T to soften the material, then calculate the binary cross-entropy loss:
[0209] ,
[0210] Where BCE is the binary cross-entropy function, and T is the temperature hyperparameter (T=5 in this embodiment). The squared term of temperature T is used to compensate for the gradient scaling effect.
[0211] Regression distillation loss: calculated based on the complete intersection-union ratio between teacher and student predicted bounding boxes;
[0212] Regression distillation employs an IoU-based metric. First, the bounding box predictions for both teachers and students are uniformly converted to an xyxy format (i.e., top-left and bottom-right corner coordinates). Then, the full IoU (CIoU) loss is calculated:
[0213] ,
[0214] in, and , respectively, are the predicted bounding boxes of the j-th student and the teacher, M is the number of effective detection locations (i.e., the number of positive samples), and CIoU is the complete IoU metric.
[0215] According to one technical solution of the present invention, in step S5, the total training loss of the student network is... Characteristic distillation loss Classification of distillation losses Regression distillation loss And the loss of students' original online testing tasks The weighted sum is expressed as:
[0216] ,
[0217] in, , , For adjustable balance weights, for example, they can be set to... , , It can be optimized through validation sets or cross-validation.
[0218] Student network original detection task loss These include classification loss, localization loss (such as CIoU loss), and confidence loss (objectness loss), the specific form of which depends on the detection network architecture used (such as the standard loss function of YOLOv5, YOLOv8, etc.).
[0219] According to one aspect of the present invention, a target detection distillation system for frequency domain adaptive refining and feature decoupling fusion is proposed, for implementing the method of any of the above technical solutions, comprising:
[0220] The teacher network module is used to extract multi-scale features from the input image;
[0221] The adaptive frequency domain knowledge refinement module is connected to the teacher network module and is used to refine teacher features and output denoised teacher features.
[0222] The frequency domain-guided scale-aware feature pyramid module is connected to the feature extraction part of the student network. It is used to decouple, guide, fuse and enhance student features, and output student fused features.
[0223] The cross-scale feature alignment module is used to align teacher denoised features with student fused features;
[0224] The loss calculation and optimization module is used to calculate various losses and update student network parameters;
[0225] After training, only the student network module and its frequency-domain guided scale-aware feature pyramid module are retained for inference deployment.
[0226] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory; when the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform a target detection distillation method of frequency domain adaptive refining and feature decoupling fusion as described in any of the above technical solutions.
[0227] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0228] The memory can be an internal storage unit of the terminal device, such as a hard drive or RAM. Alternatively, it can be an external storage device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal and external storage units. The memory is used to store the computer program and other programs and data required by the terminal device. It can also be used to temporarily store data that has been output or will be output.
[0229] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement a target detection distillation method of frequency domain adaptive refining and feature decoupling fusion as described in any of the above technical solutions.
[0230] For example, computer-readable storage media can be read-only memory (ROM), random access memory (RAM), read-only optical disc (CD-ROM), magnetic tape, floppy disk, and optical data storage devices. They can be implemented using computer-executable program code, thus allowing them to be stored in a storage device for execution by a computing device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Therefore, this invention is not limited to any particular hardware and software combination.
[0231] In summary, this invention proposes a target detection distillation method that combines frequency domain adaptive refinement with feature decoupling fusion. Through an improved knowledge distillation framework and an innovative adaptive frequency domain knowledge refinement and multi-scale feature decoupling fusion method, it effectively addresses the issues of insufficient feature quality and weak multi-scale information fusion capability in lightweight target detection models, significantly improving the detection accuracy and robustness of the student network. The multi-wavelet basis adaptive selection mechanism designed in this invention can automatically determine the optimal frequency domain decomposition strategy for features at different levels, significantly improving the targeting and effectiveness of denoising compared to traditional fixed wavelet basis methods. The cross-scale wavelet coefficient spatial correlation module achieves collaborative denoising by capturing the spatial dependencies between different sub-bands, significantly improving feature purity compared to traditional methods that process each sub-band independently. This module can structurally suppress noise components in teacher features while preserving key semantics and edge information, providing high-quality distilled signals for the student network.
[0232] The frequency domain-guided feature decoupling and fusion module innovatively decouples multi-scale features into geometric structure components and semantic content components, employing differentiated processing and alignment strategies for different types of feature information, significantly improving feature discrimination capabilities. By introducing frequency domain response maps as prior knowledge to dynamically adjust the fusion weights of features at each level, it achieves three-dimensional collaborative feature enhancement across space, frequency domain, and scale. Combining a bidirectional feature propagation path and a dual attention mechanism, this module dynamically adjusts feature weights at different scales and spatial locations, enhancing the student network's ability to detect small and multi-scale targets.
[0233] Furthermore, it should be noted that the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0234] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0235] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0236] It should also be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0237] Finally, it should be noted that the above description represents a preferred embodiment of the present invention. It should be pointed out that although preferred embodiments have been described, those skilled in the art, once they understand the basic inventive concept of the present invention, can make various improvements and modifications without departing from the principles described herein. These improvements and modifications should also be considered within the scope of protection of the present invention. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
Claims
1. A target detection distillation method that combines frequency domain adaptive refinement with feature decoupling fusion, characterized in that, Includes the following steps: Step S1: Construct a teacher-student knowledge distillation framework, in which the teacher network and student network share the target detection task; Step S2: Adaptive frequency domain knowledge refinement is performed on the intermediate features of the teacher network. The optimal wavelet transform parameters of each layer of features are dynamically determined by a learnable multi-wavelet basis selection network. The features are decomposed into low-frequency sub-bands and multi-directional high-frequency sub-bands by using two-dimensional discrete wavelet transform. The spatial correlation between different sub-bands is captured by a cross-scale wavelet coefficient spatial correlation module. The high-frequency sub-bands are denoised collaboratively by an adaptive threshold network and a soft threshold function. The teacher denoised features are then reconstructed. Step S3: Apply the frequency domain-guided scale-aware feature pyramid module to the student network to decouple the multi-scale features extracted by the student network into geometric structure components and semantic content components. Use the teacher denoising features to generate a frequency domain response map to dynamically guide the fusion weights of features at each level. Combine the bidirectional information flow from top to bottom and bottom to top, and embed channel attention and spatial attention mechanisms to achieve three-dimensional collaborative feature enhancement of space-frequency domain-scale, and output student fusion features. Step S4: Align the teacher's denoised features and the student's fused features in the channel dimension and spatial dimension using the cross-scale feature alignment module; Step S5: Train the student network based on feature distillation loss and prediction head distillation loss; Step S6: In the inference phase, load the trained student network weights and remove the teacher network and the cross-scale feature alignment module to achieve lightweight deployment.
2. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 1, characterized in that, Step S2 specifically includes: Step S21: Analyze the spectral distribution of the input features through the learnable multi-wavelet basis selection network, and dynamically output the wavelet basis type weights, decomposition scale parameters, and direction parameters; Step S22: Perform a two-dimensional discrete wavelet transform on the intermediate features of the teachers, decomposing them into one low-frequency sub-band and three high-frequency sub-bands; Step S23: Through the cross-scale wavelet coefficient spatial correlation module, deformable convolution and cross-subband attention calculation are performed on the three high-frequency subbands to capture the spatial dependencies between subbands; Step S24: Using the adaptive threshold network, a spatial and channel adaptive threshold mapping is generated based on channel statistics, and a soft threshold function is used to shrink and denoise the high-frequency subband after spatial correlation processing. Step S25: Perform inverse wavelet transform on the denoised high-frequency sub-band and the low-frequency sub-band to reconstruct the preliminary purification features; Step S26: Perform residual fusion of the preliminary purified features and the original teacher intermediate features according to learnable weights to generate the final teacher denoising features.
3. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 2, characterized in that, In step S23, the execution process of the cross-scale wavelet coefficient spatial correlation module includes: The three high-frequency subbands are respectively input into the deformable convolutional layer to learn the spatial offset; The processed subbands are concatenated along the channel dimension, and cross-subband interaction weights are generated through a channel attention mechanism that includes global average pooling and a fully connected layer. The cross-subband interaction weights are applied back to each subband respectively.
4. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 1, characterized in that, Step S3 specifically includes: Step S31, Feature Decoupling: For each scale feature extracted by the student network, the geometric structure component is extracted by high-pass filtering and edge detection operator, and the semantic content component is extracted by depthwise separable convolution. Step S32, Frequency Domain Guidance: Perform a Fast Fourier Transform on the teacher denoising features, calculate their frequency energy distribution, and generate a frequency domain attention map through a convolutional layer and activation function, which serves as the frequency domain response map; Step S33, Bidirectional Fusion: Establish a top-down path, upsample the deep geometric structure components and semantic content components respectively and fuse them with the corresponding shallow components according to the weights of the frequency domain response map to enhance the semantic expressive power of the shallow features; establish a bottom-up path, downsample the shallow geometric structure components and semantic content components respectively and fuse them with the corresponding deep components to supplement the detailed information of the deep features. Step S34, Attention Enhancement: The bidirectional fused geometric structure component and semantic content component are enhanced independently by applying the channel attention module and the spatial attention module, respectively. Step S35, Feature Reorganization: The enhanced geometric structure component and semantic content component are concatenated in the channel dimension and residually connected with the original student features to generate the student fusion feature.
5. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 4, characterized in that, The channel attention module obtains the channel description vector through global average pooling, and generates channel weights through two fully connected layers and the Sigmoid function; the spatial attention module performs max pooling and average pooling on the input features in the channel dimension respectively, concatenates the results, and generates a spatial weight map through a convolutional layer and the Sigmoid function.
6. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 1, characterized in that, Step S4 specifically includes: Step S41, Spatial Size Alignment: Compare the spatial sizes of the teacher denoising features and the student fusion features, and adjust them by bilinear interpolation upsampling or pooling downsampling to make their spatial sizes consistent. Step S42, Channel Alignment: When the number of channels is different, adjust it using 1×1 convolutional projection; Step S43, Geometric Alignment Optimization: During the alignment process, the geometric components in the teacher denoising features are processed by bilateral filtering to preserve edges; Step S44, Semantic Alignment Optimization: During the alignment process, the semantic components in the teacher denoising features are processed using content-aware interpolation.
7. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 1, characterized in that, The feature distillation loss in step S5 includes frequency domain feature loss, geometric structure loss, semantic content loss, weighted mean square error loss, and cosine similarity loss. The frequency domain feature loss is the difference in the spectrum between the student fusion feature and the teacher denoising feature after Fourier transform; The geometric loss is calculated based on structural similarity indices and edge consistency. The semantic content loss is calculated based on cosine similarity and differences in high-level perceptual features.
8. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 7, characterized in that, The predicted head distillation loss in step S5 includes: Classification distillation loss: Calculate the softened cross-entropy loss based on the temperature-scaled teacher and student classification logic values; Regression distillation loss: calculated based on the complete crossover ratio between teacher and student predicted bounding boxes.
9. The target detection distillation method based on frequency domain adaptive refining and feature decoupling fusion according to claim 1, characterized in that, In step S5, the total training loss of the student network Characteristic distillation loss Classification of distillation losses Regression distillation loss And the loss of students' original online testing tasks The weighted sum is expressed as: , in, , , It is an adjustable balancing weight.
10. A target detection distillation system for frequency domain adaptive refining and feature decoupling fusion, used to implement the method as described in any one of claims 1 to 9, characterized in that, include: The teacher network module is used to extract multi-scale features from the input image; An adaptive frequency domain knowledge refinement module, connected to the teacher network module, is used to refine teacher features and output denoised teacher features. The frequency domain-guided scale-aware feature pyramid module is connected to the feature extraction part of the student network. It is used to decouple, guide, fuse and enhance student features, and output student fused features. A cross-scale feature alignment module is used to align the teacher's denoised features with the student's fused features; The loss calculation and optimization module is used to calculate various losses and update student network parameters; After training, only the student network module and its frequency-domain guided scale-aware feature pyramid module are retained for inference deployment.
Citation Information
Patent Citations
Knowledge distillation method based on frequency domain optimization
CN119647555A
Remote sensing knowledge distillation method and system based on dual-mode characteristic spectrum decoupling
CN120656063A
Cited By
RGBT target tracking training system, training method and reasoning method
CN122115840A
A two-stage federated distillation and large model fine-tuning method based on differential privacy
CN122311353A