Target identification method, system and device based on frequency domain feature screening and medium

By optimizing the frequency domain feature screening and comparative learning of the teacher model, the problem of overfitting the model in the existing technology is solved, the recognition accuracy and generalization capabilities of the intelligent recognition system are improved, and lightweight deployment is achieved.

CN120472255APending Publication Date: 2025-08-12QINGDAO UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510606421.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-12
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The existing intelligent identification system is difficult to deploy efficiently in embedded devices, and the traditional knowledge distillation method fails to effectively utilize frequency domain information, resulting in overfitting the model, affecting the recognition accuracy and generalization ability.

Method used

By optimizing the frequency domain characteristics of the teacher model, a gating screening mechanism is used to screen high-frequency features, and combined with comparative learning optimization, students' models are guided to learn key discriminant features and realize knowledge distillation.

Benefits of technology

It improves the discrimination and generalization capabilities of the model, optimizes the effectiveness of information transmission, realizes lightweight model deployment, and is suitable for environments with limited computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472255A_ABST
    Figure CN120472255A_ABST
Patent Text Reader

Abstract

The invention discloses a target recognition method, system and device based on frequency domain feature screening and a medium. The method comprises the steps of S1, obtaining an input image and performing preprocessing; s2, screening discriminative features of the high-frequency features by adopting a gating screening mechanism, pre-training a teacher model, and fixing trainable parameters of the gating screening mechanism of the teacher model after pre-training is completed; wherein the adoption of the gating screening mechanism comprises the following steps: in response to the input of the high-frequency features obtained by division, setting a gating weight matrix, automatically identifying discriminative features in the high-frequency features through training learning, and outputting the high-frequency features subjected to gating screening; and S3, taking the output of the pre-trained teacher model as a distillation supervision signal, guiding and training a student model, and identifying an input image through the trained student model. By optimizing the frequency domain features of the teacher model, the learning ability of the student model for the key discriminative features is enhanced, the overfitting problem is effectively overcome, and the information transmission effectiveness in the distillation process is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing and computer vision technology, and specifically to a target recognition method, system, device and medium based on frequency domain feature screening. Background Art

[0002] The dismantling of used home appliances, a typical resource recycling scenario, presents challenges such as a wide variety of products, complex structures, and uncertain risk factors. Manual dismantling relies on worker experience, leading to low efficiency, mis-disassembly, missed disassembly, and potential safety hazards. To address this, the industry has proposed data-driven intelligent dismantling methods. Through multi-source data collection and fusion analysis, these methods enable target identification, motion analysis, and risk warning during the dismantling process, improving both efficiency and safety.

[0003] Existing intelligent recognition systems typically rely on deep neural network (DNN) models, combining multimodal data such as visual images, gestures, and risk information to intelligently identify and classify the dismantling process of used home appliances. However, due to the limited computing resources and real-time response requirements at the dismantling site, traditional large-scale neural network models are difficult to deploy efficiently on embedded devices or edge computing environments. In addition, to improve recognition accuracy, some studies have introduced knowledge distillation (KD) technology to transfer the knowledge of complex teacher models to lightweight student models. However, existing knowledge distillation methods mostly focus on learning spatial domain features and fail to effectively utilize frequency domain information to optimize the model's discriminative ability.

[0004] In existing technologies, DNN models have the characteristic of progressively learning from low-frequency information to high-frequency information during training. Initially, the model focuses on learning low-frequency information such as the overall image outline and shape. Later in training, the model gradually focuses on high-frequency information such as image details and texture. However, these high-frequency features often contain a large amount of noise and inherent characteristics of individual images. Far from improving classification performance, they can easily lead to model overfitting, affecting recognition generalization capabilities. To alleviate the overfitting problem, some solutions use early stopping strategies, but this often sacrifices the model's ultimate performance and discriminative ability. Summary of the Invention

[0005] The technical problem to be solved by this application is to overcome the shortcomings of the existing technology and provide a target recognition method, system, device and medium based on frequency domain feature screening. It can enhance the student model's learning ability of key discriminative features by optimizing the frequency domain features of the teacher model, effectively overcome the overfitting problem, and significantly improve the effectiveness of information transmission in the distillation process.

[0006] To achieve the above objectives, the present application provides, in a first aspect, a target recognition method based on frequency domain feature screening, comprising the following steps:

[0007] Step S1, obtaining an input image and performing preprocessing;

[0008] Obtaining input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories.

[0009] Step S2, pre-training teacher model;

[0010] In response to the input of the input image in step S1, the intermediate layer features of the input image are obtained through the teacher model, and frequency domain conversion and high-low frequency division are performed, a gated screening mechanism is used to screen the discriminative features of the high-frequency features and the teacher model is pre-trained, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after the gated screening;

[0011] Step S3, knowledge distillation;

[0012] The input image obtained in step S1 is input into the student model and the teacher model pre-trained in step S2 respectively. The output of the pre-trained teacher model is used as a distilled supervision signal to guide the training of the student model, and the input image is recognized by the trained student model.

[0013] Furthermore, in step S2, the pre-training stage adopts a gated screening mechanism including responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after gated screening, specifically including:

[0014] For the high-frequency features obtained by division The gated screening mechanism uses a learnable matrix or neural network module to set the gate weight matrix G l , through training learning, we can automatically identify the discriminative features in high-frequency features, which can be expressed as:

[0015]

[0016] Among them, G l is the gated weight matrix of the lth layer, which is a trainable parameter and is continuously optimized through the training process; ⊙ represents element-by-element multiplication; It represents the high-frequency features after being filtered by the gated filtering mechanism, that is, the discriminative features among the high-frequency features.

[0017] Furthermore, the pre-training teacher model in step S2 also includes a contrastive learning optimization step, specifically including:

[0018] After the high-frequency features are filtered, the high-frequency features filtered by the gated filtering mechanism are fused with the low-frequency features, which can be expressed as:

[0019]

[0020] in, represents the fused frequency domain features, Represents low-frequency features, Represents high-frequency features after being filtered by the gating filtering mechanism;

[0021] The fused frequency domain features Mapping to space vector representation z l , expressed as:

[0022]

[0023] Among them, P l Represents a mapping operation;

[0024] Through the contrast loss L intra Contrastive learning optimization, expressed as:

[0025]

[0026] Among them, z represents the space vector, z i represents the feature vector of sample i, I represents the total number of samples; z p represents the feature vector of the positive sample p of the same category as i; P(i) represents the set of all positive samples except sample i itself; z p' represents the eigenvector of sample p'; p' is a sample in A(i), and A(i) represents the set of all samples except sample i itself; τ is the temperature parameter used to control the smoothness of the similarity calculation between samples; z i ·z p Represents the dot product between feature vectors, which is used to measure similarity;

[0027] In contrastive learning optimization, the gated filtering mechanism and the mapping operation P l The trainable parameters of the teacher model are updated, and the parameters of the teacher model remain fixed; after the contrastive learning optimization is completed, the gated screening mechanism and the mapping operation P l The trainable parameters of are fixed and used for knowledge distillation in step S3;

[0028] For each layer of the teacher model, calculate L intra , expressed as:

[0029] L intra_all =∑ l L intra(z l );

[0030] Among them, L intra_all represents the total contrast loss, l represents the number of layers, L intra (z l ) represents z l The contrast loss, z l Represents the space vector of the lth layer.

[0031] Furthermore, the high-low frequency division in step S2 is to divide the spectrum space into high-low frequency by frequency coordinates according to the set radius parameter, specifically including:

[0032] Low-frequency feature extraction: For the frequency coordinate (u, v), when its distance from the origin (0, 0) is less than the radius r, the frequency belongs to the low-frequency region, and the distance from the origin is calculated using the Euclidean distance formula:

[0033] like but in, is the low-frequency part of the feature map, Represents the frequency domain features after conversion;

[0034] High-frequency feature extraction: When the distance between the frequency coordinate (u, v) and the origin (0, 0) is greater than the radius r, the frequency belongs to the high-frequency area:

[0035] like but in, is the high-frequency part in the feature map, is the frequency domain feature after transformation.

[0036] Furthermore, the step of obtaining the intermediate layer features of the input image through the teacher model in step S2 includes:

[0037] In response to the input of the input image in step S1, the teacher model includes multiple intermediate layers, the number of layers is l, and the intermediate layer features are extracted from the multiple intermediate layers of the teacher model.

[0038] The intermediate layer features obtained The Fourier transform operation is used to convert the spatial domain features into frequency domain features, which is recorded as Expressed as:

[0039]

[0040] in, is the pixel value at the lth layer and position (x, y) in the spatial domain feature map, is the converted frequency domain feature, (u, v) is the frequency domain coordinate, H and W are the height and width of the feature map; x and y represent the two-dimensional coordinate index in the spatial domain feature map, t indicates that the feature map is the feature map of the teacher model, and j is the imaginary unit.

[0041] Furthermore, in the knowledge distillation process of step S3, the student model and the teacher model extract the intermediate layer features of the input image respectively. The intermediate layer features extracted by the student model After frequency domain transformation, it is converted into frequency domain features The frequency domain features output by the teacher model after frequency domain conversion and gated filtering mechanism Calculate the distillation loss.

[0042] Furthermore, step S3 also includes a step of calculating distillation loss, specifically including:

[0043] Use the feature mapping function to adjust the number of channels of the frequency domain feature maps of the student model and the teacher model to be consistent:

[0044] Φ:R H×W×C_s →R H×W×C_t ;

[0045] Where Φ represents the feature mapping function, C_s represents the number of channels of the student model frequency domain feature map, H and W are the height and width, R is a real number, and C_t represents the number of channels of the teacher model frequency domain feature map;

[0046] Then, the mean square error loss between the teacher model and the student model on the frequency domain feature map is calculated, which is defined as the feature distillation loss based on frequency domain screening and expressed as:

[0047]

[0048] Among them, L FDFSD represents the feature distillation loss based on frequency domain screening, I represents the number of samples in the current batch; N = H × W × C_t is the total number of elements in the feature map; It is the nth element of the teacher model’s frequency domain fusion feature map at layer l; is the nth element of the frequency domain fusion feature map of the student model at layer l; ||·|| 2 is the square of the Euclidean distance;

[0049] For the logits output of the student model at the final classification layer Using the standard cross entropy loss function L CE , expressed as:

[0050]

[0051] Where I represents the number of samples in the current batch; C represents the total number of categories in the classification task; represents the logits of the student model for the i-th sample in category c; y i,c Indicates the one-hot label corresponding to the i-th sample. If the sample belongs to category c, then y i,c =1, otherwise y i,c =0;

[0052] Finally, the total distillation loss is expressed as:

[0053] L overall =L CE +αL FDFSD ;

[0054] Among them, L CE is the standard cross entropy loss, L FDFSD It is the feature distillation loss based on frequency domain screening, and α is a hyperparameter that balances various types of losses.

[0055] To achieve the above-mentioned purpose, the second aspect of the present application provides a target recognition system based on frequency domain feature screening, the target recognition system comprising:

[0056] Acquisition module, used to acquire input images and perform preprocessing;

[0057] Obtaining input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories.

[0058] A pre-training module for pre-training a teacher model; in response to the input of the input image in the acquisition module, the intermediate layer features of the input image are obtained through the teacher model, and frequency domain conversion and high-low frequency division are performed, a gated screening mechanism is used to screen the discriminative features of the high-frequency features and pre-train the teacher model, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein, the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after gated screening;

[0059] The knowledge distillation module is used to perform knowledge distillation. The input image obtained in the acquisition module is input into the student model and the pre-trained teacher model respectively. The output of the pre-trained teacher model is used as the distillation supervision signal to guide the training of the student model, and the input image is recognized by the trained student model.

[0060] To achieve the above-mentioned purpose, the third aspect of the present application provides a target recognition device based on frequency domain feature screening, including a processor and a memory, wherein a computer program is stored on the memory. When the computer program is executed by the processor, the target recognition method based on frequency domain feature screening as described above is implemented.

[0061] To achieve the above-mentioned purpose, the fourth aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the target recognition method based on frequency domain feature screening as described above.

[0062] After adopting the above technical solution, this application has the following beneficial effects compared with the prior art:

[0063] This application can effectively improve the discrimination and generalization capabilities. By optimizing the frequency domain features of the teacher model, the student model's ability to learn key discriminative features can be enhanced, effectively overcoming the overfitting problem and improving the model's generalization ability. It can effectively optimize the effectiveness of information transmission. By screening and optimizing the frequency domain features of the teacher model, the effectiveness of information transmission in the distillation process can be significantly improved, ensuring that the student model can obtain more valuable feature information, thereby improving the accuracy of intelligent recognition and classification. It can realize lightweight model deployment, and transfer the complex knowledge of the teacher model to the lightweight student model through knowledge distillation, thereby realizing lightweight and efficient deployment of the model, which is suitable for environments with limited computing resources.

[0064] The specific implementation methods of the present application are further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] The accompanying drawings are part of this application and are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application but do not constitute an undue limitation of this application. Obviously, the drawings described below are only some embodiments. For those of ordinary skill in the art, other drawings can be derived from these drawings without inventive effort.

[0066] In the drawings of the specification:

[0067] Figure 1 This is a schematic diagram of the overall process of the target recognition method based on frequency domain feature screening in this specific embodiment;

[0068] Figure 2 Schematic diagram of the framework of knowledge distillation based on frequency domain feature screening in this specific implementation;

[0069] Figure 3 It is a flowchart of knowledge distillation based on frequency domain feature screening in this specific implementation method. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not used to limit the scope of the present application.

[0071] Based on this, the present application provides a method for frequency domain feature screening based on frequency domain feature screening, comprising the following steps:

[0072] Step S1, obtaining an input image and performing preprocessing;

[0073] Obtaining input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories.

[0074] Step S2, pre-training teacher model;

[0075] In response to the input of the input image in step S1, the intermediate layer features of the input image are obtained through the teacher model, and frequency domain conversion and high-low frequency division are performed, a gated screening mechanism is used to screen the discriminative features of the high-frequency features and the teacher model is pre-trained, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after the gated screening;

[0076] Step S3, knowledge distillation;

[0077] The input image obtained in step S1 is input into the student model and the teacher model pre-trained in step S2 respectively. The output of the pre-trained teacher model is used as a distilled supervision signal to guide the training of the student model, and the input image is recognized by the trained student model.

[0078] It should be noted that the execution subject of the target recognition method based on frequency domain feature screening in this embodiment is a target recognition device based on frequency domain feature screening, which can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, etc., and the non-mobile electronic device can be a server and a personal computer, etc., which are not specifically limited in this application. The following takes the execution subject as an example of a server to describe the target recognition method based on frequency domain feature screening in this embodiment.

[0079] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, the meaning of "plurality" is two or more, unless otherwise clearly specified.

[0080] In one feasible embodiment, step S1 includes the steps of data acquisition and preprocessing.

[0081] Specifically, regarding data collection, we first collected image data from publicly available object detection datasets, encompassing multiple industrial equipment target categories. Each image should include multiple targets and their categories. To ensure dataset diversity, the collected images should cover a variety of scenes, lighting conditions, shooting angles, and object sizes, making them suitable for visual recognition tasks in industrial automation environments.

[0082] Data preprocessing: During the data preprocessing phase, to ensure that the input data is suitable for model training, the image data is first resized. All images are uniformly resized to a fixed size to avoid errors during training due to inconsistent image sizes. Secondly, normalization is performed to normalize the image pixel values to the range [0, 1], thereby improving the stability and efficiency of model training. In addition, data augmentation techniques such as random flipping, rotation, cropping, and color adjustment are used to increase the diversity of training data, enhance the robustness of the model in different scenarios, and effectively reduce the risk of overfitting. Finally, label formatting is performed to convert the object annotation information of each image into a format suitable for network training to ensure that the model can accurately process the object category and its location information. These preprocessing steps provide standardized and efficient data support for subsequent model training.

[0083] Data loading: The preprocessed data is stored in the training data pipeline. The data loader feeds the data into the model based on batch B and randomly shuffles it to prevent the model from relying on the order of the data.

[0084] In a feasible implementation, it also includes the step of obtaining the intermediate layer features of the teacher model, and extracting high-frequency features with discriminative ability from the pre-trained teacher model through frequency domain analysis and screening mechanism to improve the effectiveness and accuracy of knowledge transfer in the knowledge distillation process.

[0085] Specifically, a fully trained and verified teacher model (a convolutional neural network with a ResNet-34 structure) is selected. This teacher model has strong feature extraction and classification capabilities. The input image obtained in step S1 is input to the teacher model, and feature representations are extracted from multiple intermediate layers (a total of l layers) of the teacher model, which are recorded as

[0086] It should be noted that the intermediate layer features contain richer fine-grained information than the high-level semantic features. They include not only the contour information of the target, but also retain the local details and texture information, which facilitates subsequent frequency domain analysis.

[0087] In one feasible embodiment, in step S2, the pre-training stage adopts a gated screening mechanism including responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after the gated screening, specifically including:

[0088] For the high-frequency features obtained by division The gated screening mechanism uses a learnable matrix or neural network module to set a gate weight matrix to automatically identify discriminative features in high-frequency features through training and learning, which is expressed as:

[0089]

[0090] Among them, G l is the gated weight matrix of the lth layer, which is a trainable parameter and is continuously optimized through the training process; ⊙ represents element-by-element multiplication; Represents high-frequency features after being filtered by the gating filtering mechanism.

[0091] It's important to note that high-frequency features often contain a significant amount of noise and inherent characteristics of individual images. Therefore, it's necessary to filter these high-frequency features for discriminative features, i.e., features useful for object recognition. The gating mechanism is a learnable matrix of the same size as the feature map. During training, these parameters are optimized to autonomously select discriminative features. In the formula, ⊙ represents element-by-element multiplication. This process retains discriminative features while removing noise and inherent features.

[0092] In one feasible implementation, the pre-training of the teacher model in step S2 further includes a step of contrastive learning optimization.

[0093] Specifically, after the high-frequency features are filtered, the high-frequency features filtered by the gated filtering mechanism are fused with the low-frequency features, which can be expressed as:

[0094]

[0095] in, represents the fused frequency domain features, Represents low-frequency features, Represents high-frequency features after being filtered by the gating filtering mechanism.

[0096] The fused frequency domain features Mapping to space vector representation z is expressed as:

[0097]

[0098] Among them, P l Represents the mapping operation, which is processed by two layers of 3 times 3 convolution layers;

[0099] Through the contrast loss L intra Contrastive learning optimization, expressed as:

[0100]

[0101] Among them, z represents the space vector, z i represents the feature vector of sample i, I represents the total number of samples; z p represents the feature vector of the positive sample p of the same category as i; P(i) represents the set of all positive samples except sample i itself; z p' represents the eigenvector of sample p'; p' is a sample in A(i), and A(i) represents the set of all samples except sample i itself; τ is the temperature parameter used to control the smoothness of the similarity calculation between samples; z i ·z p Represents the dot product between feature vectors, which is used to measure similarity;

[0102] In contrastive learning optimization, the gated filtering mechanism and the mapping operation P l The trainable parameters of the teacher model are updated, and the parameters of the teacher model remain fixed; after the contrastive learning optimization is completed, the gated screening mechanism and the mapping operation P l The trainable parameters of are fixed and used for knowledge distillation in step S3.

[0103] For each layer of the teacher model, calculate L intra The loss is expressed as:

[0104] L intra_all =∑ l L intra (z l );

[0105] Among them, L intra_all represents the total contrast loss, l represents the number of layers, L intra (z l ) represents z l The contrast loss, z lRepresents the space vector of the lth layer.

[0106] It should be noted that by minimizing the contrast loss, the discrimination ability of the gating mechanism can be effectively improved, and high-frequency features with better category discrimination can be screened out. l and projection module P l Will be updated, and the parameters of the teacher model remain fixed. After the optimization is completed, the gated screening mechanism G l and projection module P l The trainable parameters of are fixed and used in the subsequent knowledge distillation process.

[0107] In another feasible implementation, the high-low frequency division in step S2 is to divide the spectrum space into high-low frequency by frequency coordinates according to the set radius parameter, specifically including:

[0108] Low-frequency feature extraction: For the frequency coordinate (u, v), when its distance from the origin (0, 0) is less than the radius r, the frequency belongs to the low-frequency area. The distance from the origin can be calculated using the Euclidean distance formula:

[0109] like but in, is the low-frequency part in the feature map;

[0110] High-frequency feature extraction: When the distance between the frequency coordinate (u, v) and the origin (0, 0) is greater than the radius r, the frequency belongs to the high-frequency area:

[0111] like but in, is the high-frequency part in the feature map.

[0112] In one feasible implementation, step S2 further includes a step of obtaining intermediate layer features of the input image through a teacher model.

[0113] Specifically, in response to the input of the input image in step S1, the teacher model includes multiple intermediate layers, the number of layers is l, and the intermediate layer features are extracted from the multiple intermediate layers of the teacher model.

[0114] The intermediate layer features obtained The Fourier transform operation is used to convert the spatial domain features into frequency domain features, which is recorded as Expressed as:

[0115]

[0116] in, is the pixel value in the spatial domain feature map, is the converted frequency domain feature, (u, v) is the frequency domain coordinate, H and W are the height and width of the feature map; x and y represent the two-dimensional coordinate index in the spatial domain feature map, t indicates that the feature map is the feature map of the teacher model, and j is the imaginary unit.

[0117] In a feasible implementation, during the knowledge distillation process of step S3, the student model and the teacher model respectively extract the intermediate layer features of the input image, and the intermediate layer features extracted by the student model After frequency domain transformation, it is converted into frequency domain features The frequency domain features output by the teacher model after frequency domain conversion and gated filtering mechanism Calculate the distillation loss.

[0118] Specifically, the teacher model and the student model input the image obtained in step S1 and perform forward propagation;

[0119] For the student model (ResNet18), forward propagation is performed under the input image to extract the spatial domain feature map corresponding to the lth layer, which is recorded as In order to ensure feature consistency, the spatial domain feature map of the student model is converted into frequency domain representation through Fourier transform:

[0120]

[0121] in, is the pixel value in the spatial domain feature map, is the frequency domain feature after conversion, (u, v) is the frequency domain coordinate, G and W are the height and width of the feature map; it should be noted that and It represents the same frequency domain feature map, but when expressing it, the frequency components are represented according to the specific frequency domain coordinates (u, v).

[0122] Specifically, the teacher model feature extraction and frequency domain transformation: For the teacher model, the same image as the student model is input, the spatial domain feature map of the teacher model layer l is extracted and Fourier transform is performed to obtain the frequency domain features, and then the frequency domain features are obtained through the gated screening mechanism of step S2 to obtain the discriminative high-frequency features, and then combined with the low-frequency features to obtain the frequency domain features after the teacher model fusion The only difference is that the gated filtering mechanism used here is pre-trained in step S2. and teacher characteristics It will be used for subsequent knowledge distillation operations.

[0123] In one feasible embodiment, the step of calculating the distillation loss specifically includes:

[0124] Use the feature mapping function to adjust the number of channels of the frequency domain feature maps of the student model and the teacher model to be consistent:

[0125] Φ:R H×W×C_s →R H×W×C_t ;

[0126] Where Φ represents the feature mapping function, C_s represents the number of channels of the student model frequency domain feature map, H and W are the height and width, R is a real number, and C_t represents the number of channels of the teacher model frequency domain feature map;

[0127] Then, the mean square error (MSE) loss between the teacher model and the student model on the frequency domain feature map is calculated, which is defined as the feature distillation loss based on frequency domain screening and expressed as:

[0128]

[0129] Where N = H × W × C_t is the total number of elements in the feature map; It is the nth element of the teacher model’s frequency domain fusion feature map at layer l; It is the nth element of the student model’s frequency-domain fusion feature map at layer l; the feature map also has size R H×W×C , the elements inside are what the model learns based on the input; ||·|| 2 is the square of the Euclidean distance;

[0130] For the logits output of the student model at the final classification layer Using the standard cross entropy loss function L CE , expressed as:

[0131]

[0132] Where I represents the number of samples in the current batch, and C represents the total number of categories in the classification task; represents the logits of the student model for the i-th sample in category c; y i,c Indicates the one-hot label corresponding to the i-th sample. If the sample belongs to category c, then y i,c =1, otherwise y i,c =0;

[0133] Finally, the total distillation loss is expressed as:

[0134] L overall =L CE +αL FDFSD ;

[0135] Among them, L CE is the standard cross entropy loss, L FDFSD It is the feature distillation loss based on frequency domain screening, and α is a hyperparameter that balances various types of losses.

[0136] It should be noted that the distillation method provided in this example has been validated on typical tasks and representative models. The results show that this example outperforms traditional KL-divergence-based distillation methods in key performance indicators such as model compression efficiency, improved classification accuracy, and knowledge transfer stability, demonstrating its excellent practical value and technical advantages.

[0137] Based on the same inventive concept, the present application also provides a target recognition system based on frequency domain feature screening, the target recognition system comprising:

[0138] The acquisition module is used to acquire input images and perform preprocessing. Acquiring input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories.

[0139] A pre-training module for pre-training a teacher model; in response to the input of the input image in the acquisition module, the spectrum space is divided into high and low frequencies by frequency coordinates according to the set radius parameter, a gated screening mechanism is used in the teacher model to screen the discriminative features of the high-frequency features and pre-train, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein, the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training learning, and outputting the high-frequency features after gated screening;

[0140] The knowledge distillation module is used to perform knowledge distillation. The input images obtained in the acquisition module are input into the student model and the pre-trained teacher model respectively. The output of the pre-trained teacher model is used as the distillation supervision signal to guide the training of the student model.

[0141] In one feasible implementation, the image to be recognized is input into a knowledge distillation target recognition system based on frequency domain feature screening for training to obtain a trained student model. The student model with better performance and fewer parameters trained under the guidance of the teacher model is deployed in a dismantling production line for used household appliances. The image to be recognized is recognized by the trained student model, where the image to be recognized is a picture of a used electrical appliance, and whether there are screws on it can be detected. The output is "0": indicating no screws; the output is "1": indicating the presence of screws.

[0142] Specifically, the acquisition module preprocesses the image to be identified, and the pretraining module is used to pretrain the teacher model; in response to the input of the input image in the acquisition module, the spectrum space is divided into high and low frequencies by frequency coordinates according to the set radius parameter, and a gated screening mechanism is used in the teacher model to screen the discriminative features of the high-frequency features and pre-train, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein, the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting the gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after gated screening; the knowledge distillation module is used to perform knowledge distillation on the student model; the image to be identified obtained in the acquisition module is respectively input into the student model and the pre-trained teacher model, and the output of the pre-trained teacher model is used as a distillation supervision signal to guide the training of the student model to obtain a trained student model.

[0143] It should be noted that the gated filtering mechanism and contrast loss optimization are used to obtain the discriminative high-frequency features of the image to be identified from the pre-trained teacher model, and then the student model is distilled. The gated filtering mechanism is a learnable parameter matrix, which is optimized by proposing the contrast loss L. intra (The gap between the same category is as small as possible, and the gap between different categories is as large as possible) is used to optimize the parameters of the gated screening mechanism to better screen out the discriminative features of high-frequency features.

[0144] Based on the same inventive concept, the present application also provides a target recognition device based on frequency domain feature screening, including a processor and a memory, wherein a computer program is stored on the memory. When the computer program is executed by the processor, the target recognition method based on frequency domain feature screening as described above is implemented.

[0145] Based on the same inventive concept, the present application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the target recognition method based on frequency domain feature screening as described above.

[0146] The program product of the present application for implementing the above-mentioned method may be a portable compact disk read-only memory and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto. In the present application, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0147] It should be noted that a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.

[0148] The above is only a preferred embodiment of the present application and does not constitute any form of limitation to the present application. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technician familiar with the present application can make some changes or modifications to equivalent embodiments with equivalent changes using the technical content suggested above without departing from the scope of the technical solution of the present application. The implementation schemes in the above embodiments can also be further combined or replaced. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application that do not depart from the content of the technical solution of the present application still fall within the scope of the solution of the present application.

Claims

1. A target recognition method based on frequency domain feature screening, characterized in that: The following steps are involved: Step S1, obtaining an input image and performing preprocessing; Obtaining input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories. Step S2, pre-training teacher model; In response to the input of the input image in step S1, the intermediate layer features of the input image are obtained through the teacher model, and frequency domain conversion and high-low frequency division are performed, a gated screening mechanism is used to screen the discriminative features of the high-frequency features and the teacher model is pre-trained, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after the gated screening; Step S3, knowledge distillation; The input image obtained in step S1 is input into the student model and the teacher model pre-trained in step S2 respectively. The output of the pre-trained teacher model is used as a distilled supervision signal to guide the training of the student model, and the input image is recognized by the trained student model.

2. The method according to claim 1, characterized in that In step S2, the pre-training stage adopts a gated screening mechanism, including responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after gated screening, specifically including: For the high-frequency features obtained by division The gated screening mechanism uses a learnable matrix or neural network module to set the gate weight matrix G l , through training learning, we can automatically identify the discriminative features in high-frequency features, which can be expressed as: Among them, G l is the gated weight matrix of the lth layer, which is a trainable parameter and is continuously optimized through the training process; ⊙ represents element-by-element multiplication; It represents the high-frequency features after being filtered by the gated filtering mechanism, that is, the discriminative features among the high-frequency features.

3. The method according to claim 1, characterized in that The pre-training teacher model in step S2 also includes the steps of contrastive learning optimization, specifically including: After the high-frequency features are filtered, the high-frequency features filtered by the gated filtering mechanism are fused with the low-frequency features, which can be expressed as: in, represents the fused frequency domain features, Represents low-frequency features, Represents high-frequency features after being filtered by the gating filtering mechanism; The fused frequency domain features Mapping to space vector representation z l , expressed as: Among them, P l Represents a mapping operation; Through the contrast loss L intra Contrastive learning optimization, expressed as: Among them, z represents the space vector, z i represents the feature vector of sample i, I represents the total number of samples; z p represents the feature vector of the positive sample p of the same category as i; P(i) represents the set of all positive samples except sample i itself; z p' represents the eigenvector of sample p'; p' is a sample in A(i), and A(i) represents the set of all samples except sample i itself; τ is the temperature parameter used to control the smoothness of the similarity calculation between samples; z i ·z p Represents the dot product between feature vectors, which is used to measure similarity; In contrastive learning optimization, the gated filtering mechanism and the mapping operation P l The trainable parameters of the teacher model are updated, and the parameters of the teacher model remain fixed; after the contrastive learning optimization is completed, the gated screening mechanism and the mapping operation P l The trainable parameters of are fixed and used for knowledge distillation in step S3; Calculate L for each layer of the teacher model intra , expressed as: L intra_all =∑ l L intra (z l ); Among them, L intra_all represents the total contrast loss, l represents the number of layers, L intra (z l ) represents z l The contrast loss, z l Represents the space vector of the lth layer.

4. The method according to claim 1, wherein In step S2, the high and low frequency division is to divide the spectrum space into high and low frequencies by frequency coordinates according to the set radius parameter. include: Low-frequency feature extraction: For the frequency coordinate (u, v), when its distance from the origin (0, 0) is less than the radius r, the frequency belongs to the low-frequency region, and the distance from the origin is calculated using the Euclidean distance formula: like but in, is the low-frequency part of the feature map, Represents the frequency domain features after conversion; High-frequency feature extraction: When the distance between the frequency coordinate (u, v) and the origin (0, 0) is greater than the radius r, the frequency belongs to the high-frequency area: like but in, is the high-frequency part in the feature map, is the frequency domain feature after transformation.

5. The method according to claim 1, wherein The step of obtaining the intermediate layer features of the input image through the teacher model in step S2 includes: In response to the input of the input image in step S1, the teacher model includes multiple intermediate layers, the number of layers is l, and the intermediate layer features are extracted from the multiple intermediate layers of the teacher model The intermediate layer features obtained The Fourier transform operation is used to convert the spatial domain features into frequency domain features, which is recorded as Expressed as: in, is the pixel value at the lth layer and position (x, y) in the spatial domain feature map, is the converted frequency domain feature, (u, v) is the frequency domain coordinate, H and W are the height and width of the feature map; x and y represent the two-dimensional coordinate index in the spatial domain feature map, t indicates that the feature map is the feature map of the teacher model, and j is the imaginary unit.

6. The method according to claim 3, characterized in that In step S3, during the knowledge distillation process, the student model and the teacher model extract the intermediate layer features of the input image respectively. The intermediate layer features extracted by the student model After frequency domain transformation, it is converted into frequency domain features The frequency domain features output by the teacher model after frequency domain conversion and gated filtering mechanism Calculate the distillation loss.

7. The method according to claim 6, characterized in that The step of calculating the distillation loss in step S3 specifically includes: Use the feature mapping function to adjust the number of channels of the frequency domain feature maps of the student model and the teacher model to be consistent: F:R H×W×C_s →R H×W×C_t ; Where Φ represents the feature mapping function, C_s represents the number of channels of the student model frequency domain feature map, H and W are the height and width, R is a real number, and c_t represents the number of channels of the teacher model frequency domain feature map; Calculate the mean square error loss between the teacher model and the student model on the frequency domain feature map, which is defined as the feature distillation loss based on frequency domain screening and is expressed as: Among them, L FDFSD represents the feature distillation loss based on frequency domain screening, I represents the number of samples in the current batch; N = H × W × c_t is the total number of elements in the feature map; It is the nth element of the teacher model’s frequency domain fusion feature map at layer l; is the nth element of the frequency domain fusion feature map of the student model at layer l; ||·|| 2 is the square of the Euclidean distance; For the logits output of the student model at the final classification layer Using the standard cross entropy loss function L CE , expressed as: Where I represents the number of samples in the current batch; C represents the total number of categories in the classification task; represents the logits of the student model for the i-th sample in category c; y i,c Indicates the one-hot label corresponding to the i-th sample. If the sample belongs to category c, then y i,c =1, otherwise y i,c =0; The sum of distillation losses is expressed as: L overall =L CE +αL FDFSD ; Among them, L CE is the standard cross entropy loss, L FDFSD It is the feature distillation loss based on frequency domain screening, and α is a hyperparameter that balances various types of losses.

8. A target recognition system based on frequency domain feature screening, characterized in that: The target recognition system includes: Acquisition module, used to acquire input images and perform preprocessing; Obtaining input images includes collecting image data containing multiple industrial equipment target categories from a public target detection dataset. Each image should include multiple targets and their categories. A pre-training module for pre-training a teacher model; in response to the input of the input image in the acquisition module, the intermediate layer features of the input image are obtained through the teacher model, and frequency domain conversion and high-low frequency division are performed, a gated screening mechanism is used to screen the discriminative features of the high-frequency features and pre-train the teacher model, and after the pre-training is completed, the trainable parameters of the gated screening mechanism of the teacher model are fixed; wherein, the gated screening mechanism includes responding to the input of the high-frequency features obtained by the division, setting a gated weight matrix to automatically identify the discriminative features in the high-frequency features through training and learning, and outputting the high-frequency features after gated screening; The knowledge distillation module is used to perform knowledge distillation. The input image obtained in the acquisition module is input into the student model and the pre-trained teacher model respectively. The output of the pre-trained teacher model is used as the distillation supervision signal to guide the training of the student model, and the input image is recognized by the trained student model.

9. A target recognition device based on frequency domain feature screening, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method for target recognition based on frequency domain feature screening according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the target recognition method based on frequency domain feature screening according to any one of claims 1 to 7 is implemented.