A lightweight attention-enhanced target recognition method for few-sample SAR images
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-14
AI Technical Summary
[0008]本发明的目的在于提供一种基于轻量化注意力增强的小样本SAR图像目标识别方法,本发明解决SAR图像标注样本稀缺场景下,传统识别模型存储开销大、推理延迟高、轻量化不足且识别精度难以保障的核心痛点;本发明创造性地提出“注意力增强小样本学习+分层结构性剪枝-量化联合压缩+剪枝-量化微调阶段Dropout优化机制”的一体化方案
(1)解决现有原型网络骨干网络适配性差、冗余度高的问题,构建适配SAR图像与小样本场景的注意力增强特征提取网络,大幅降低模型参数量与计算复杂度,实现模型轻量化,满足边缘平台的低存储、低算力部署需求。
Smart Images

Figure CN122574589A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of synthetic aperture radar (SAR) image target recognition, lightweight deep learning model and few-shot learning technology, and in particular relates to a few-shot SAR image target recognition method based on lightweight attention enhancement. Background Technology
[0002] Synthetic Aperture Radar (SAR), as an active microwave remote sensing device, overcomes the limitations of optical remote sensing in terms of weather and illumination conditions due to its unique advantages of all-weather, all-day operation and strong penetration. It has become a core technology in remote sensing observation and battlefield awareness, playing an irreplaceable role in multiple fields, including military and civilian applications. With the rapid development of airborne and spaceborne edge platforms, SAR image target recognition technology faces two core demands: first, the high cost and scarcity of SAR image annotation necessitate adaptation to small-sample learning scenarios; second, the limited computing power and storage resources of edge platforms require lightweight model deployment while ensuring both recognition accuracy and inference efficiency.
[0003] Currently, the rise of few-shot learning techniques has provided a new solution for SAR target recognition. Prototype networks, as an important technology in the field of few-shot learning, can quickly achieve category adaptation under limited sample conditions through feature space mapping and category prototype construction, effectively alleviating the problem of scarce SAR image sample annotations. They have been applied in SAR few-shot target recognition research. However, when directly applying prototype networks to SAR image recognition and edge deployment scenarios, considering the practical needs of actual engineering applications and the effectiveness of existing technologies, there are still many prominent shortcomings. They are difficult to adapt to the engineering deployment requirements of low-computing-power edge platforms. Specific objective evaluations are as follows: (1) Excessive model redundancy and insufficient lightweight adaptability: When the native prototype network is directly applied to SAR small sample target recognition, its own feature representation capability is insufficient, making it difficult to meet the core requirements of recognition accuracy for engineering applications. To make up for this deficiency and improve the recognition accuracy of small samples, existing technologies often choose to use a deep backbone network with extremely high complexity for feature extraction. Although this can improve the recognition accuracy to a certain extent and adapt to the accuracy requirements of SAR small sample learning scenarios, it will directly lead to a surge in the number of model parameters, a significant increase in computational complexity and storage overhead, forming a contradictory dilemma of "accuracy improvement and lightweight deployment". In addition, the conventional backbone network used by the existing prototype network does not fully combine the imaging characteristics of SAR images, nor does it carry out targeted lightweight optimization for small sample learning scenarios, which further exacerbates the problems of network redundancy and high inference latency. It has strict requirements for hardware computing power and is difficult to adapt to the deployment requirements of low computing power edge platforms such as airborne and spaceborne platforms. It cannot meet the core requirements of lightweight and low latency for actual engineering applications, which seriously hinders the engineering implementation of the technology.
[0004] (2) Difficulty in balancing lightweighting and accuracy, resulting in poor performance in small sample recognition: Existing model compression methods mostly employ single pruning or quantization strategies, and some methods use unstructured pruning, which can only sparse weights but cannot reduce inference latency. Furthermore, they do not fully consider the characteristics of SAR small sample learning and lack hierarchical targeted pruning and accuracy compensation mechanisms. During compression, the model recognition accuracy often drops significantly, failing to achieve a synergistic balance between lightweighting and small sample recognition performance. At the same time, unstructured pruning alone is insufficient to further reduce hardware storage and inference overhead, failing to fully meet the resource constraints of edge platforms and adapting to the high-accuracy recognition requirements in small sample scenarios. In particular, existing pruning methods do not distinguish the functional differences of network layers and blindly prune all convolutional layers, which easily damages the underlying basic features and high-level semantic features, leading to a sharp drop in accuracy. Moreover, the Dropout mechanism is not optimized, and Dropout is still enabled during the pruning, quantization, and fine-tuning stages. Randomly deactivated neurons introduce feature noise, further exacerbating the loss of accuracy.
[0005] (3) Insufficient generalization ability for small samples and unstable recognition accuracy: The existing prototype network lacks feature enhancement design for SAR small sample scenarios. The prototype calculation is easily affected by noise and abnormal samples. The feature mining of a small number of labeled samples is insufficient. The model generalization ability is weak. Under the constraint of small samples, overfitting is likely to occur, resulting in large fluctuations in recognition accuracy. It cannot stably meet the high accuracy requirements in engineering applications and is difficult to adapt to the actual deployment scenario with scarce samples.
[0006] (4) Poor adaptability to engineering deployment and high difficulty in implementation: Existing methods mostly focus on optimizing academic performance, lacking a complete engineering optimization and anomaly handling mechanism. The efficiency of model training and inference is low, and the computing power and storage constraints of edge platforms and the complexity of actual deployment scenarios are not fully considered. At the same time, unstructured sparse models are mainly used for research analysis, making it difficult to truly achieve model lightweighting and inference acceleration. This results in high difficulty in technology implementation, making it difficult to quickly transform into engineering applications and to give full play to the practical value of few-shot learning and lightweight technology.
[0007] In summary, existing SAR small-sample target recognition technologies have significant shortcomings in terms of lightweight design, inference efficiency, small-sample recognition accuracy, and engineering deployment adaptability, making it difficult to meet the practical application needs of low-computing-power edge platforms. Therefore, developing a SAR target recognition method that is adaptable to small-sample scenarios, highly lightweight, has low storage overhead, low inference latency, high recognition accuracy, and is easy to deploy has become a key technical problem that urgently needs to be solved in this field. Summary of the Invention
[0008] The purpose of this invention is to provide a lightweight attention-enhanced few-sample SAR image target recognition method. This invention addresses the core pain points of traditional recognition models in scenarios with scarce labeled SAR images, such as high storage overhead, high inference latency, insufficient lightweighting, and difficulty in guaranteeing recognition accuracy. This invention creatively proposes an integrated solution of "attention-enhanced few-sample learning + hierarchical structural pruning-quantization joint compression + pruning-quantization fine-tuning stage Dropout optimization mechanism".
[0009] To address the aforementioned technical problems, this invention provides a few-sample SAR image target recognition method based on lightweight attention enhancement, comprising: By constructing an attention-enhanced convolutional feature extraction network, multi-scale feature extraction is performed on the input SAR image, and feature enhancement and redundancy suppression are completed through a dual-channel spatial attention enhancement module to output a standardized feature vector. By constructing a prototype metric network based on attention-enhanced residuals, feature depth refinement is achieved through a cascaded residual attention module, and SAR target category decision is completed based on a few-sample metric learning mechanism, ensuring feature discriminability and classification reliability under limited sample conditions. By employing a four-level joint compression optimization strategy that combines hierarchical structural pruning, lightweight fine-tuning, dynamic Dropout optimization during the pruning-quantization fine-tuning stage, and post-training quantization collaboration, the model can achieve low-storage, low-latency deployment, adapt to the resource constraints of edge platforms, and ensure the accuracy of small sample recognition. By constructing an end-to-end performance evaluation framework and conducting multi-dimensional tests on the model's small sample recognition accuracy, storage size, inference latency, lightweight nature, and deployment adaptability, the effectiveness and reliability of the method are ensured, providing support for the lightweight deployment of the model at the edge.
[0010] Preferably, the attention-enhanced convolutional feature extraction network includes: four convolutional modules (layers 1-4), a dual-channel spatial attention enhancement module, and a fully connected layer; wherein the four convolutional modules (layers 1-4) are cascaded sequentially, and a set of channel-spatial attention enhancement modules is set at the output of layer 1 and the output of layer 3 respectively, and the output of layer 4 is connected to the fully connected layer after feature normalization; each convolutional module consists of convolution operation, batch normalization, LeakyReLU activation function, and max pooling, and completes the extraction of basic features and deep semantic features of SAR image layer by layer.
[0011] Preferably, the channel-spatial attention enhancement module includes: The channel attention mapping enhancement module includes: firstly, performing global average pooling and global max pooling operations on the input feature map to fully capture global feature information in the channel dimension; then concatenating the two pooling results and inputting them into a two-layer multilayer perceptron (MLP); the MLP contains a dimensionality reduction layer and a dimensionality increase layer. The dimensionality reduction layer uses a 1×1 convolution to compress the channel dimension to 1 / 4 of the original dimension, and the dimensionality increase layer uses a 1×1 convolution to restore the original channel dimension, thereby achieving adaptive learning and allocation of channel weights; finally, normalizing the channel weights using the sigmoid activation function, and multiplying the normalized channel weights by the original feature map to obtain the channel attention-enhanced feature map. The spatial attention mapping enhancement module includes: first, taking the maximum value in the channel dimension of the input feature map to obtain a single-channel feature map, so as to highlight the key spatial features in the channel dimension; then, performing a 3×3 convolution operation (Conv3) on the single-channel feature map to capture spatial neighborhood features and suppress isolated redundant feature points; after convolution, generating a spatial attention weight map through the Sigmoid activation function; finally, multiplying the spatial attention weight map with the input feature map pixel by pixel to achieve feature enhancement and redundancy suppression in the spatial dimension, thereby improving the accuracy of small sample feature extraction.
[0012] Preferably, the attention-enhanced convolutional feature extraction network adopts a hierarchical differentiated random deactivation regularization strategy. A two-dimensional random deactivation layer, namely Dropout2d, is set after the activation function and downsampling operation of each convolutional module, with a random deactivation probability of 0.05. A random deactivation operation is introduced in the intermediate layer of the multilayer perceptron of the channel attention mapping enhancement module, with a random deactivation probability of 0.5.
[0013] Preferably, the prototype metric network for the attention-enhanced residual includes: The attention-enhanced residual network consists of two layers of cascaded residual attention modules to construct feature enhancement branches, further suppressing feature noise and enhancing target semantic information. The training episode unit construction and category prototype calculation are as follows: The training episode unit construction includes: adopting the classic episode training paradigm in the few-shot learning field, randomly selecting N-WAY class samples from the training set, extracting K-SHOT samples from each class to form a support set and Q-QUERY samples to form a query set, so as to form a complete training episode unit; The category prototype calculation includes: calculating the category prototype of each target based on the features of the support set samples, and the category prototype is used to statistically represent the core feature distribution of each target, so as to conform to the core idea of prototype network that "the category prototype is the category feature center"; Similarity measurement and classification: The system calculates the cosine similarity between the query set features and the prototypes of each category to achieve category matching of the query set samples; the similarity is then scaled and the classification result is output. Model optimization employs the cross-entropy loss function for end-to-end model optimization. By introducing an adaptive learning rate decay mechanism, the learning rate is dynamically adjusted based on the model's training convergence state to improve the model's convergence and generalization ability, thereby ensuring stable and highly accurate recognition in small sample scenarios.
[0014] Preferably, the layered structural pruning includes: Dimension pre-derivation: Input SAR image samples, perform forward propagation on the backbone network, extract all convolutional layer weight parameters, and automatically derive the input and output channel dimensions of each layer as the basis for subsequent pruning. Channel importance assessment uses L2 modulus calculation to quantify channel contribution. During pruning, high modulus channels are retained first to maximize the removal of redundancy while ensuring the accuracy of small sample recognition, balancing lightweight effect and recognition performance. Layered targeted pruning, combined with the feature extraction mechanism of convolutional networks, adopts a layered differentiated pruning strategy. Layer 1 extracts basic edge and texture features; Layer 4 extracts target semantic features, and the output is directly fed into the prototype metric network of the attention-enhanced residual to carry key information on class separability; Layers 2 and 3 in the middle layer extract transition features, and high-proportion structured pruning is performed without disrupting the feature transmission link, with the pruning ratio set at 70%~80%; During the pruning process, redundant channels with the smallest modulus in the middle layer are selected based on the modulus importance criterion, and the entire channel is completely pruned to ensure the accuracy of redundancy removal; The automatic dimension synchronization mechanism detects the channel dimensions of adjacent layers in real time during the pruning process. When a convolutional channel of a certain layer is pruned, the corresponding input channel dimensions of its subsequent connecting layers are automatically pruned, thereby avoiding dimension mismatch errors.
[0015] Preferably, the lightweight fine-tuning includes: after pruning, combining the dynamic Dropout optimization mechanism, using a lightweight fine-tuning strategy to compensate for the model's accuracy, alleviating the accuracy decline caused by the loss of useful feature information during pruning; based on the principle of parameter fine-tuning, using a low learning rate optimizer, with the fine-tuning learning rate being 1 / 10 of the pre-training learning rate, controlling the number of fine-tuning rounds and the scale of iterations, effectively restoring the recognition accuracy lost during pruning while reducing fine-tuning overhead and avoiding increased latency, thus achieving collaborative optimization of "pruning to reduce redundancy - fine-tuning to maintain accuracy - disabling Dropout to reduce noise".
[0016] Preferably, the dynamic Dropout optimization mechanism includes: a three-state adaptive control logic for design training, pruning / fine-tuning, and quantization / inference, wherein Dropout is turned off during the pruning and quantization fine-tuning stages to effectively improve model accuracy.
[0017] Preferably, the dynamic Dropout optimization mechanism specifically includes: During the training phase, Dropout is enabled with a fixed dropout probability of 0.2. Some neurons are randomly disabled to prevent model overfitting and adapt to scenarios where small sample data is scarce. During the pruning / fine-tuning stage, Dropout is forcibly turned off, and the forward propagation of the Dropout layer is skipped directly, retaining all neuron outputs, avoiding feature noise interference, ensuring the stability of feature distribution after pruning, providing a guarantee for the recovery of fine-tuning accuracy, and thus improving model accuracy. During the quantization / inference phase, Dropout is kept off to reduce quantization sensitivity and errors, while improving inference efficiency and ensuring high accuracy and stability of the lightweight model when deployed at the edge.
[0018] Preferably, the post-training quantization includes: introducing post-training quantization (PTQ) technology on the basis of the pruned and fine-tuned model, adopting the INT8 symmetric quantization strategy, and combining the computing characteristics of edge hardware to significantly reduce storage and inference overhead under the premise of controllable accuracy loss. The quantization range and core parameters include: the core of quantization is to map floating-point weights to 8-bit integers; the quantization range is -128 to 127, and the extreme value range of the weights is calculated by calibration to determine the quantization scaling factor and quantization zero point, wherein the quantization zero point is 0 in symmetric quantization; the quantization range is only used to quantize the weights of convolutional layers and fully connected layers in the model.
[0019] Compared with the prior art, the present invention has the following beneficial effects: (1) To solve the problems of poor adaptability and high redundancy of the existing prototype network backbone network, an attention-enhanced feature extraction network adapted to SAR images and small sample scenarios is constructed, which greatly reduces the number of model parameters and computational complexity, realizes model lightweighting, and meets the low storage and low computing power deployment requirements of edge platforms.
[0020] (2) To address the problems of unreasonable lightweight strategies, severe accuracy loss, and unsuitability of pruning methods for edge hardware acceleration, a hierarchical structural pruning and lightweight fine-tuning joint compression strategy is designed. Combining post-training quantization technology and Dropout optimization mechanism in the fine-tuning stage, it is clarified that the initial convolutional layer (layer1) and deep convolutional layer (layer4) are not pruned, and Dropout is turned off in the pruning and quantization fine-tuning stages to improve accuracy. This achieves a synergistic balance between small sample recognition accuracy, low storage, and low latency. While significantly reducing model redundancy and storage and inference overhead, it controls the accuracy loss within a reasonable range, ensuring high accuracy recognition in small sample scenarios.
[0021] (3) To address the problems of insufficient generalization ability and unstable recognition accuracy of existing methods with small samples, attention-enhanced residual blocks are fused to strengthen small sample feature mining, improve the model's generalization performance, and achieve stable and high-accuracy recognition under small sample constraints. (4) To solve the problems of poor engineering deployment adaptability and high implementation difficulty of existing methods, we rely on structural pruning to maintain a regular and dense structure, improve the inference efficiency of small sample and lightweight SAR target recognition models, improve the anomaly handling mechanism, and reduce the difficulty of edge deployment.
[0022] By solving the above-mentioned technical problems, this invention achieves a synergistic improvement in small sample recognition accuracy, lightweight design, storage overhead, inference latency, and engineering deployment adaptability. It provides an efficient, reliable, and easy-to-deploy technical solution for SAR image target recognition under small sample constraints, promotes the widespread application of SAR target recognition technology on low-computing-power edge platforms, and highlights the core value of lightweight deployment. Attached Figure Description
[0023] Figure 1 This is a system framework diagram of a few-sample SAR image target recognition method based on lightweight attention enhancement provided in an embodiment of the present invention.
[0024] Figure 2 This is a flowchart of a few-sample SAR image target recognition method based on lightweight attention enhancement provided in an embodiment of the present invention. Detailed Implementation
[0025] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer from the following description. It should be noted that the drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0026] This invention addresses the core shortcomings of existing technologies, such as high model redundancy, insufficient lightweighting, difficulty in balancing accuracy and lightweighting in small sample recognition, inability of unstructured pruning to accelerate inference, poor adaptability to engineering deployment, and a sharp drop in accuracy due to non-layered pruning and an unreasonable Dropout mechanism that exacerbates accuracy loss. The proposed method for small sample SAR image target recognition based on a lightweight prototype network adopts a core logic of feature extraction, small sample measurement, model compression, and performance evaluation. It integrates key technologies such as attention-enhanced small sample learning, hierarchical structured pruning-tuning, post-training quantization, and dynamic Dropout optimization mechanisms. This method focuses on solving the problems of lightweighting, low storage, low latency, and high accuracy in small sample scenarios, thus constructing a complete technical system.
[0027] like Figure 1 and Figure 2 As shown, this embodiment of the invention specifically provides a few-sample SAR image target recognition method based on lightweight attention enhancement, including: Step 1: Constructing an attention-enhanced convolutional feature extraction network.
[0028] To address the imaging characteristics of SAR images and the needs of few-shot learning scenarios, this step constructs a Conv64FWithAttention-enhanced convolutional feature extraction network. Using a 3×84×84 SAR image as input, it leverages four convolutional layers to achieve multi-scale feature extraction from the bottom to the top layers. A dual-channel spatial attention module further enhances features and suppresses redundancy, ultimately outputting a 512-dimensional standardized feature vector. This provides high-quality feature support for subsequent few-shot metric learning. Figure 1 As shown in step 1. The specific technical implementation schemes for each module are as follows: Convolutional Feature Extraction: The network sequentially constructs four convolutional modules (layers 1-4). Each module has a unified structure, consisting of convolution operations, batch normalization, LeakyReLU activation function, and max pooling. Layer by layer, it extracts basic features and deep semantic features of the SAR image. The unified expression for a single convolutional module is as follows: (1) In the formula , indicating the first Each convolutional module, , The first Layer convolution kernel weights and biases, This is a two-dimensional convolution operation. For batch normalization, For two-dimensional max pooling, The LeakyReLU activation function is expressed as follows: (2) in The slope parameter is negative (0.2 in this method). Each convolutional layer adopts a 3×3 convolutional kernel, stride 1, and padding 1 structure. The pooling operation adopts 2×2 max pooling with a stride of 2 to ensure stable transition of feature scale and effective downsampling.
[0029] Dual Attention Enhancement Module Design (CA-SA): To enhance the feature mining capability for small samples and improve recognition accuracy, the network sets up a channel-spatial attention enhancement module at the output of layer 1 and layer 3 respectively. This represents the Enhanced Channel Attention module. The SpatialAttention module enhances channel attention by adaptively learning channel weights to achieve feature selection.
[0030] The EnhancedChannelAttention (CA) module is primarily used to enhance the contribution of target feature channels in small samples and suppress redundant channels. This improves feature extraction accuracy while reducing the storage and computational overhead caused by channel dimensionality. Its complete implementation process is as follows: First, the input feature map... Perform global average pooling and global max pooling operations respectively to fully capture global feature information along the channel dimension. Global average pooling ( The calculation formula is: (3) Global max pooling ( The calculation formula is: (4) in Here, H represents the number of channels, and H and W represent the height and width of the feature map, respectively. Let represent the feature value at coordinate (i,j) of channel c. The two pooling results are concatenated and input into a two-layer multilayer perceptron (MLP). The MLP contains a dimensionality reduction layer and a dimensionality increase layer. The dimensionality reduction layer uses a 1×1 convolution to compress the channel dimension to 1 / 4 of the original dimension, and the dimensionality increase layer restores the original channel dimension using a 1×1 convolution, achieving adaptive learning and allocation of channel weights. The weight update formula is: (5) In the formula, c is the channel index. The feature maps for the corresponding channels are then processed using the Sigmoid activation function. The weights are normalized. (6) Multiply the normalized weights by the original feature map to obtain the feature map after channel attention enhancement; The SpatialAttention (SA) module is primarily used to focus on small sample target spatial regions, enhancing target features while suppressing redundant background features, improving the accuracy of feature extraction, and reducing unnecessary computation. Its complete implementation process is as follows: First, the maximum value is taken in the channel dimension of the input feature map to obtain a single-channel feature map. (7) Highlighting key spatial features along the channel dimension; performing a 3×3 convolution (Conv3) operation on the single-channel feature map to capture spatial neighborhood features and suppress isolated redundant feature points; after convolution, a spatial attention weight map is generated using the Sigmoid activation function, and the attention weights are calculated as follows: (8) In the formula The sigmoid activation function is used to multiply the spatial attention weight map with the input feature map pixel by pixel, thereby enhancing spatial features and suppressing redundancy, and improving the accuracy of feature extraction for small samples.
[0031] Dropout Regularization: To improve the model's generalization ability and suppress overfitting in scenarios with few samples, the network employs a hierarchical differential random deactivation regularization strategy: a two-dimensional random deactivation layer (Dropout2d) is set after the activation function and downsampling operation of each convolutional module, with a random deactivation probability of 0.05; a random deactivation operation is introduced in the intermediate layer of the multilayer perceptron in the channel attention module, with a random deactivation probability of 0.5. These regularization operations are only enabled during the model training phase and remain disabled during subsequent model pruning, fine-tuning, quantization, and inference phases to ensure stable feature distribution and accuracy unaffected by random perturbations.
[0032] Feature normalization: After the dual attention module and residual connection are processed, the output features of layer4 are input into the fully connected layer to map the high-dimensional convolutional features into fixed-dimensional embedding vectors (512 dimensions in this method), and then normalized by L2 norm to eliminate feature scale differences and provide standardized feature input for subsequent few-sample metric learning.
[0033] Step 2: Small-sample metric learning based on attention-enhanced residual networks.
[0034] This step uses the 512-dimensional standardized feature vector output in step 1 as a basis to construct a prototype metric network based on attention-enhanced residuals. Feature depth refinement is achieved through a cascaded residual attention module, and SAR target category determination is completed based on a few-sample metric learning mechanism. This ensures feature discriminativity and classification reliability under limited sample conditions. The process is as follows: Figure 1 Step 2 is shown. Using the classic episode training paradigm in few-shot learning, N-way class samples are randomly selected from the training set. For each class, K-shot samples are extracted to form the support set, and Q-query samples are extracted to form the query set, thus forming a complete training episode unit. The support set feature matrix is denoted as... Support set category labels are denoted as .
[0035] Residual Attention Network (Res-Attention): The network takes the 512-channel convolutional feature map (dimension 512×N×K) output from step 1 as input, and constructs a feature enhancement branch through a two-layer cascaded residual attention block to further suppress feature noise and enhance the target semantic information. The operation of a single residual attention block can be represented as: (9) (10) (11) (12) In the formula, To enhance the channel attention module, For the spatial attention module, the input to the first attention-enhanced residual module is... The feature map output from step 1 serves as the input to the second attention-enhanced residual module. For the output of the previous module The two-layer concatenated structure enables step-by-step feature refinement and stable gradient propagation, effectively mitigating the vanishing gradient and feature degradation problems during few-sample learning. The output features are processed by convolution, batch normalization, and ReLU activation. express Output features processed by convolution and batch normalization for The output representation after processing by the attention module.
[0036] Episode Construction and Category Prototype Calculation: Employing the classic episode training paradigm from few-shot learning, N-way class samples are randomly selected from the training set. For each class, K-shot samples are extracted to form the support set, and Q-query samples are extracted to form the query set, creating a complete training episode unit. After processing all support samples through feature extraction and attention-enhanced residual networks in step 1, 512-dimensional standardized features are obtained, forming the support set feature matrix. Support set category labels are denoted as This ensures that the support set can fully cover the core features of each category, thereby improving the model's small sample generalization ability and recognition accuracy.
[0037] Based on the features of the support set samples, the category prototype of each target class is calculated. The category prototype is essentially a statistical representation of the core feature distribution of each target class, which conforms to the core idea of prototype networks that "the category prototype is the center of the category feature". Its calculation formula is as follows: (13) in To support the number of samples in the set, This is the joint output of the attention-enhanced residual network and the feature extraction network in step 1 (i.e., the feature map obtained after feature extraction and attention enhancement of the supporting samples). The input image corresponding to the i-th sample in the c-th support set, and the support set feature matrix The feature sources of the corresponding samples are consistent.
[0038] Similarity Measurement and Classification: By calculating the cosine similarity between the query set features and the prototypes of each category, category matching of query samples is achieved. (14) in For the query set sample; Represents cosine similarity. The L2 norm is used to represent the similarity score, and the classification result is output after scaling. (15) in The temperature coefficient is set to 0.1 in this method to improve the clarity of the classification boundary and ensure high accuracy in small sample identification.
[0039] Model optimization: The cross-entropy loss function is used for end-to-end model optimization. The cross-entropy loss formula is shown in equation (14). (16) in For the label vector, To predict probabilities, C represents the number of classes; an adaptive learning rate decay mechanism is introduced, and the learning rate update formula is as follows: (17) in, The initial learning rate, The decay coefficient is t, the number of iterations is t, and the decay step size is step size. The learning rate is dynamically adjusted according to the model's training convergence state to improve the model's convergence and generalization ability, ensuring stable and highly accurate recognition in small sample scenarios.
[0040] Step 3: Lightweighting the joint model of hierarchical structural pruning-fine-tuning-quantization.
[0041] To achieve low-storage, low-latency deployment of the model, adapt to the resource constraints of edge platforms, and ensure accuracy in small sample recognition, this invention employs a four-level joint compression optimization strategy: hierarchical structural pruning, lightweight fine-tuning, a Dropout optimization mechanism during the pruning-quantization fine-tuning stage, and post-training quantization collaboration. Specifically, the initial convolutional layer (layer 1) and the deep convolutional layer (layer 4) are not pruned, and Dropout is disabled during the pruning and quantization fine-tuning stages. This design is the core key to improving model accuracy. The specific technical implementation scheme is detailed in the following layers: (1) Hierarchical structural pruning: This invention adopts structural pruning as the core lightweight method, takes the whole convolutional feature channel as the smallest pruning unit, abandons the sparse weight method of unstructured pruning, directly prunes redundant channels, takes into account the model compression effect and edge hardware deployment friendliness, and is equipped with automatic dimension synchronization and key layer protection mechanism throughout the process to avoid pruning errors.
[0042] Pruning Process: This pruning method relies on the importance assessment of channel contribution to accurately prune redundant channels, and includes four steps: 1) Dimension pre-derivation: Input SAR image example samples of 84×84 format from the MSTAR dataset, perform forward propagation on the backbone network, extract all convolutional layer weight parameters, and automatically derive the input and output channel dimensions of each layer as the basis for subsequent pruning; 2) Channel Importance Assessment: The L2 modulus is used to quantify the channel contribution. The calculation formula is as follows: (18) This method takes =2, which is the L2 modulus, where is the weight of the k-th convolutional kernel, and n is the number of convolutional kernel parameters. The larger the modulus, the greater the contribution of the channel to the extraction of target features in small samples. During the pruning process, high modulus channels are retained first, which can maximize the removal of redundancy while ensuring the accuracy of small sample recognition, and take into account both lightweight effect and recognition performance.
[0043] Layered Targeted Pruning: Combining the feature extraction mechanism of convolutional networks, a layered differentiated pruning strategy is adopted. The initial convolutional layer (layer 1) extracts basic features such as edges and textures, which are the foundation for subsequent feature extraction. It has low redundancy, and the integrity of its features directly determines the quality of subsequent feature extraction. Pruning would lead to the loss of basic features and the failure of the feature extraction link, so no pruning is performed. The deep convolutional layer (layer 4) extracts target semantic features, and the output is directly fed into the attention module and the metric classification module. It carries key information on class separability and plays a decisive role in recognition accuracy. Pruning would lose core semantic features and lead to a sharp drop in accuracy, so no pruning is performed. Only the intermediate convolutional layers (layers 2 to 3) extract transition features. They have high redundancy and have little impact on the core of the overall feature extraction. High-proportion structured pruning (pruning ratio set to 70% to 80%) can be performed without destroying the feature transmission link. During the pruning process, the redundant channel with the smallest modulus in the intermediate layer is selected based on the modulus importance criterion, and the entire channel is completely pruned to ensure the accuracy of redundancy removal.
[0044] Automatic Dimension Synchronization Mechanism: To avoid dimension mismatch errors during pruning and ensure the normal operation of the model after pruning, an automatic dimension synchronization mechanism is implemented. During pruning, the channel dimensions of adjacent layers are monitored in real time. When a convolutional channel in a certain layer is pruned, the corresponding input channel dimensions of its subsequent connecting layers are automatically pruned, thus avoiding dimension mismatch errors. Figure 1 The pruning process in step 3 is shown in the example.
[0045] (2) Dynamic Dropout Optimization Mechanism: To address the issue of existing Dropout mechanisms introducing feature noise and causing accuracy fluctuations during the pruning, quantization, and fine-tuning stages, a three-state adaptive control logic is designed for training, pruning / fine-tuning, and quantization / inference. Disabling Dropout during the pruning and quantization fine-tuning stages effectively improves model accuracy. The core reason is that the pruning ratio set for intermediate convolutional layers during the pruning stage is relatively high (70%~80%). If Dropout is continued to be enabled at this time, the excessive random information fluctuations generated by randomly deactivated neurons will cause a sharp drop in the accuracy of the pruned and quantized model, making it difficult to meet the requirements of low-storage, high-accuracy edge application scenarios. The core purpose of the quantization fine-tuning stage is to restore the accuracy after pruning and stabilize the feature distribution. Disabling Dropout avoids random information interference, retains all effective neuron outputs, and enables the fine-tuning process to accurately correct the feature deviations caused by pruning. Simultaneously, it provides a stable feature distribution for subsequent quantization, reduces quantization errors, and ultimately improves accuracy. The specific implementation is as follows: 1) Training phase: Enable Dropout with a fixed dropout probability of 0.2 to randomly disable some neurons, prevent model overfitting, and adapt to scenarios with scarce small sample data; 2) Pruning / Fine-tuning stage: Forcefully turn off Dropout, skip the forward propagation of the Dropout layer directly, retain all neuron outputs, avoid feature noise interference, ensure the stability of feature distribution after pruning, provide a guarantee for the recovery of fine-tuning accuracy, and thus improve model accuracy; 3) Quantization / Inference Stage: Keep Dropout off to reduce quantization sensitivity and quantization error, while improving inference efficiency and ensuring high accuracy and stability of the lightweight model when deployed at the edge.
[0046] (3) Lightweight Fine-tuning Accuracy Compensation: After pruning, the model is compensated for inaccuracy through a lightweight fine-tuning strategy, combined with the dynamic Dropout optimization mechanism, to alleviate the accuracy loss caused by the loss of useful feature information during pruning. Based on the principle of parameter fine-tuning, a low learning rate optimizer is adopted, with the fine-tuning learning rate being 1 / 10 of the pre-training learning rate. The number of fine-tuning rounds and the scale of iterations are controlled to effectively restore the recognition accuracy lost during pruning while reducing fine-tuning overhead and avoiding increased latency. This achieves the collaborative optimization of "pruning to reduce redundancy - fine-tuning to maintain accuracy - disabling Dropout to reduce noise". After pruning, the redundant computation of the model is greatly reduced, the number of parameters remains within a reasonable range, and the storage overhead is significantly reduced, laying the foundation for subsequent quantization compression and low-latency deployment.
[0047] (4) Post-training quantization and accuracy optimization: Based on the model after pruning and fine-tuning, training is introduced. Post-quantization (PTQ) technology employs an INT8 symmetric quantization strategy and leverages the computational characteristics of edge hardware to significantly reduce storage and inference overhead while maintaining controllable accuracy loss. The specific implementation is as follows: 1) Quantization range and core parameters: The core of quantization is the weighting of floating-point numbers. Mapped to an 8-bit integer, with a quantization range of [value missing]. , (i.e., -128~127), the extreme range of the weights is calculated through calibration, i.e., the weights minimum value Weight The maximum value in Determine the quantization scaling factor and quantization zero (quantization zero in symmetric quantization). ).
[0048] 2) Quantization and Dequantization: The scaling factor is calculated using the following formula: (19) The quantization formula for floating-point to integer conversion is: (20) The inverse quantization formula is: (twenty one) In the formula: This indicates the floating-point weight, and s represents the scaling factor. This represents the quantized weights. This represents the weights after dequantization.
[0049] 3) Quantization range: Only the weights of convolutional and fully connected layers in the model are quantized, avoiding the quantization of key modules such as attention modules and classification layers, thus ensuring the accuracy of small sample recognition.
[0050] Step 4: End-to-end performance evaluation.
[0051] An end-to-end performance evaluation framework is constructed, focusing on multi-dimensional testing of the model's small sample recognition accuracy, storage size, inference latency, lightweight nature, and deployment adaptability to ensure the effectiveness and reliability of the method and provide support for the lightweight edge deployment of the model. The specific technical implementation scheme is as follows: (1) Experimental environment and dataset: A fixed experimental environment and reproducibility parameters were set. The hardware environment was supported by a single GPU and CUDA acceleration, while simulating the low computing power environment of the edge platform. The software environment was based on the Python programming language and the PyTorch deep learning framework, combined with model pruning, quantization and data processing related tool libraries. The MSTAR SAR standard dataset was used as the test dataset. Five typical target categories were selected and the image size was uniformly adjusted to 84×84. The training set and the test set were divided for model training, fine-tuning and performance evaluation, respectively. The small sample scenario (5-way 5-shot) was set up to verify the small sample recognition performance of the model and test the deployment adaptability of the model on edge hardware.
[0052] (2) Evaluation indicators: Model size (storage overhead), average accuracy of small samples, single-round inference latency, lightweight compression ratio and deployment adaptability are selected as core evaluation indicators to highlight the core characteristics of this method: "small sample size, low storage, low latency, high accuracy and easy deployment".
[0053] (3) Test process and result analysis: The performance differences of the original model, the pruned model and the quantized model are compared through testing; the synergistic effect of the model's recognition accuracy, storage size and inference latency in small sample scenarios is analyzed in detail, and the effect of lightweight compression and inference state optimization on deployment adaptability is verified; key data in the test process are recorded to provide support for the engineering optimization of the model.
[0054] The embodiments of the present invention are described in detail below with reference to the specific experimental data shown in Table 1: Table 1 Evaluation results of the method of the present invention on the MSTAR dataset Model size (MB) 88.67 75.86 18.96 Pruning percentage (%) - 70.0 70.0 Average accuracy (%) 88.44 86.89 86.57 Single-round delay (ms) 93.67 67.07 67.06 Compared to existing technologies, this invention focuses on the core characteristics of "small sample learning, low storage, low latency, lightweight, high accuracy, and easy deployment." The embodiments of this invention have at least the following advantages or beneficial effects: 1. Strong small-sample learning ability and high recognition accuracy: This invention adopts a small-sample training paradigm and integrates attention-enhanced residual blocks, which effectively alleviates the overfitting problem in the small-sample training process. Stable high-accuracy recognition can be achieved under 5-way and 5-shot small-sample settings. After multiple rounds of experimental verification, the accuracy rate is stable at about 88%, which greatly reduces the cost of acquiring and labeling SAR image samples and can effectively adapt to the actual scenario where SAR samples are scarce.
[0055] 2. Significantly lightweight design with extremely low storage overhead: This invention employs a two-stage joint compression strategy of pruning and post-training quantization, combining hierarchical pruning with lightweight fine-tuning mechanisms to achieve synergistic optimization of "pruning to reduce redundancy, fine-tuning to maintain accuracy, and quantization to reduce overhead." Experimental data shows that the model size is reduced from 88.67MB to 18.96MB, storage overhead is reduced by more than 78%, and the lightweight compression ratio reaches 78.6%. Compared with existing single pruning methods, storage overhead is further reduced by more than 60%, significantly improving the model's adaptability to edge platforms and highlighting the core advantages of lightweight deployment.
[0056] 3. Low inference latency and fast deployment response: By removing redundant calculations through layered pruning and improving hardware computing efficiency through INT8 quantization, the inference speed of the model in this invention is significantly improved, with a single-round inference latency as low as 66.92ms, which is 27.8% lower than the original model's inference latency. Compared with existing lightweight methods, the inference latency is further reduced by more than 20%, which can meet the low-latency deployment requirements of edge platforms, realize real-time identification of SAR targets, and improve the response efficiency of engineering applications.
[0057] 4. User-friendly engineering deployment, low implementation difficulty, and outstanding value in lightweight deployment: This invention, through complete engineering optimization design, and the collaborative optimization of structured pruning and INT8 quantization, conforms to the hardware inference rules of edge platforms. The model is small in size, has low inference latency, and low resource consumption, and can be directly deployed on low-computing-power edge devices such as embedded GPUs, FPGAs, and NPUs. At the same time, the comprehensive anomaly handling mechanism and multi-channel compatible design significantly reduce the difficulty of edge deployment, and can be widely adapted to various edge deployment scenarios such as airborne and spaceborne. Compared with existing methods, the deployment efficiency is improved by more than 50%, and the implementation cost is reduced by more than 40%, truly realizing the lightweight implementation of small-sample SAR target recognition technology and highlighting its practical significance for edge deployment.
[0058] 5. Excellent performance balance and strong practicality: This invention achieves a synergistic balance between small sample recognition accuracy, lightweight design, storage overhead, and inference latency. It not only solves the problem of low small sample recognition accuracy in existing methods, but also overcomes the pain points of difficulty in balancing lightweight design and accuracy, as well as high deployment difficulty. The introduction of attention enhancement mechanism and lightweight fine-tuning strategy effectively improves the training convergence speed of the model, reducing the number of training convergence rounds by more than 30% compared with existing prototype networks. The comprehensive performance evaluation framework supports batch testing and data recording, providing convenience for model engineering debugging and performance optimization. It balances model accuracy and deployment efficiency, has strong engineering practicality, and can be widely applied to various edge deployment scenarios.
[0059] As a further explanation of the embodiments of the present invention, in addition to the above-described embodiments, some technical details in the technical solution of the present invention can be replaced by the following alternative solutions: 1. The core attention module can be flexibly replaced: the channel attention module can be replaced with the SE (lightweight priority) or CA (accuracy priority) attention module; the spatial attention module can be replaced with the CBAM attention module (accuracy priority), which can be flexibly balanced according to the computing power and recognition accuracy requirements of the edge platform.
[0060] 2. The calculation method of the category prototype can be optimized: the prototype calculation can be replaced by the class weighted mean or the sample confidence weighted mean, which can improve the recognition accuracy and generalization ability of small samples.
[0061] 3. Pruning and quantization strategies can be adapted and adjusted: The pruning criterion can be replaced with the Taylor expansion importance criterion (precision priority), and the pruning ratio can be adjusted as needed within the range of 50%-80%; the quantization strategy can be replaced with 16-bit (precision priority), 4-bit (lightweight priority) quantization or asymmetric quantization to adapt to different edge hardware requirements.
[0062] 4. The model training strategy can be flexibly replaced: the optimizer can be replaced with SGD (generalization priority) or RAdam (convergence speed priority); the learning rate scheduling can be replaced with ReduceLROnPlateau or cosine annealing strategy.
[0063] 5. Feature and data processing can be optimized as needed: the feature dimension can be adjusted to 64 dimensions (lightweight priority) or 256 dimensions (accuracy priority), and the normalization method can be replaced with L1 normalization; data augmentation can add operations such as elastic deformation and rotation or use the MixUp method to improve the model's small sample generalization ability.
[0064] In summary, this invention integrates core technologies such as attention-enhanced few-shot learning, hierarchical structural pruning-fine-tuning, and post-training quantization. While achieving high-accuracy recognition with few samples, it significantly reduces model storage and inference overhead by using structural pruning as the core lightweight method. It has the advantages of hardware-friendly, low-latency, and lightweight deployment, providing an efficient, reliable, and easy-to-deploy technical solution for SAR target recognition under few-shot constraints. This reduces the cost of sample acquisition and annotation, and promotes the large-scale deployment of SAR target recognition technology on edge computing platforms.
[0065] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. A target recognition method for few-sample SAR images based on lightweight attention enhancement, characterized in that, include: By constructing an attention-enhanced convolutional feature extraction network, multi-scale feature extraction is performed on the input SAR image, and feature enhancement and redundancy suppression are completed through a dual-channel spatial attention enhancement module to output a standardized feature vector. By constructing a prototype metric network based on attention-enhanced residuals, feature depth refinement is achieved through a cascaded residual attention module, and SAR target category decision is completed based on a few-sample metric learning mechanism, ensuring feature discriminability and classification reliability under limited sample conditions. By employing a four-level joint compression optimization strategy that combines hierarchical structural pruning, lightweight fine-tuning, dynamic Dropout optimization during the pruning-quantization fine-tuning stage, and post-training quantization collaboration, the model can achieve low-storage, low-latency deployment, adapt to the resource constraints of edge platforms, and ensure the accuracy of small sample recognition. By constructing an end-to-end performance evaluation framework and conducting multi-dimensional tests on the model's small sample recognition accuracy, storage size, inference latency, lightweight nature, and deployment adaptability, the effectiveness and reliability of the method are ensured, providing support for the lightweight deployment of the model at the edge.
2. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 1, characterized in that, The attention-enhanced convolutional feature extraction network includes: four convolutional modules (layers 1-4), a dual-channel spatial attention enhancement module, and a fully connected layer; wherein the four convolutional modules (layers 1-4) are cascaded sequentially, and a set of channel-spatial attention enhancement modules is set at the output of layer 1 and the output of layer 3 respectively, and the output of layer 4 is connected to the fully connected layer after feature normalization; each convolutional module consists of convolution operation, batch normalization, LeakyReLU activation function, and max pooling, and completes the extraction of basic features and deep semantic features of SAR images layer by layer.
3. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 2, characterized in that, The channel-space attention enhancement module includes: The channel attention mapping enhancement module includes: firstly, performing global average pooling and global max pooling operations on the input feature map to fully capture global feature information in the channel dimension; then concatenating the two pooling results and inputting them into a two-layer multilayer perceptron (MLP); the MLP contains a dimensionality reduction layer and a dimensionality increase layer. The dimensionality reduction layer uses a 1×1 convolution to compress the channel dimension to 1 / 4 of the original dimension, and the dimensionality increase layer uses a 1×1 convolution to restore the original channel dimension, thereby achieving adaptive learning and allocation of channel weights; finally, normalizing the channel weights using the sigmoid activation function, and multiplying the normalized channel weights by the original feature map to obtain the channel attention-enhanced feature map. The spatial attention mapping enhancement module includes: first, taking the maximum value in the channel dimension of the input feature map to obtain a single-channel feature map, so as to highlight the key spatial features in the channel dimension; then, performing a 3×3 convolution operation (Conv3) on the single-channel feature map to capture spatial neighborhood features and suppress isolated redundant feature points; after convolution, generating a spatial attention weight map through the Sigmoid activation function; finally, multiplying the spatial attention weight map with the input feature map pixel by pixel to achieve feature enhancement and redundancy suppression in the spatial dimension, thereby improving the accuracy of small sample feature extraction.
4. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 2, characterized in that, The attention-enhanced convolutional feature extraction network employs a hierarchical differentiated random deactivation regularization strategy. A two-dimensional random deactivation layer, Dropout2d, is set after the activation function and downsampling operation of each convolutional module, with a random deactivation probability of 0.
05. A random deactivation operation is introduced in the intermediate layer of the multilayer perceptron of the channel attention mapping enhancement module, with a random deactivation probability of 0.
5.
5. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 1, characterized in that, The prototype metric network for the attention-enhanced residuals includes: The attention-enhanced residual network consists of two layers of cascaded residual attention modules to construct feature enhancement branches, further suppressing feature noise and enhancing target semantic information. The training episode unit construction and category prototype calculation are as follows: The training episode unit construction includes: adopting the classic episode training paradigm in the few-shot learning field, randomly selecting N-WAY class samples from the training set, extracting K-SHOT samples from each class to form a support set and Q-QUERY samples to form a query set, so as to form a complete training episode unit; The category prototype calculation includes: calculating the category prototype of each target based on the features of the support set samples, and the category prototype is used to statistically represent the core feature distribution of each target, so as to conform to the core idea of prototype network that "the category prototype is the category feature center"; Similarity measurement and classification: The system calculates the cosine similarity between the query set features and the prototypes of each category to achieve category matching of the query set samples; the similarity is then scaled and the classification result is output. Model optimization employs the cross-entropy loss function for end-to-end model optimization. By introducing an adaptive learning rate decay mechanism, the learning rate is dynamically adjusted based on the model's training convergence state to improve the model's convergence and generalization ability, thereby ensuring stable and highly accurate recognition in small sample scenarios.
6. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 2, characterized in that, The layered structural pruning includes: Dimension pre-derivation: Input SAR image samples, perform forward propagation on the backbone network, extract all convolutional layer weight parameters, and automatically derive the input and output channel dimensions of each layer as the basis for subsequent pruning. Channel importance assessment uses L2 modulus calculation to quantify channel contribution. During pruning, high modulus channels are retained first to maximize the removal of redundancy while ensuring the accuracy of small sample recognition, balancing lightweight effect and recognition performance. Layered targeted pruning, combined with the feature extraction mechanism of convolutional networks, adopts a layered differentiated pruning strategy. Layer 1 extracts basic edge and texture features; Layer 4 extracts target semantic features, and the output is directly fed into the prototype metric network of the attention-enhanced residual to carry key information on class separability; Layers 2 and 3 in the middle layer extract transition features, and high-proportion structured pruning is performed without disrupting the feature transmission link, with the pruning ratio set at 70%~80%; During the pruning process, redundant channels with the smallest modulus in the middle layer are selected based on the modulus importance criterion, and the entire channel is completely pruned to ensure the accuracy of redundancy removal; The automatic dimension synchronization mechanism detects the channel dimensions of adjacent layers in real time during the pruning process. When a convolutional channel of a certain layer is pruned, the corresponding input channel dimensions of its subsequent connecting layers are automatically pruned, thereby avoiding dimension mismatch errors.
7. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 1, characterized in that, The lightweight fine-tuning includes: after pruning, combining the dynamic Dropout optimization mechanism, using a lightweight fine-tuning strategy to compensate for the model's accuracy, alleviating the accuracy decline caused by the loss of useful feature information during pruning; based on the principle of parameter fine-tuning, a low learning rate optimizer is adopted, with the fine-tuning learning rate being 1 / 10 of the pre-training learning rate, controlling the number of fine-tuning rounds and the scale of iterations, effectively restoring the recognition accuracy lost during pruning while reducing fine-tuning overhead and avoiding increased latency, achieving collaborative optimization of "pruning to reduce redundancy - fine-tuning to maintain accuracy - disabling Dropout to reduce noise".
8. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 1, characterized in that, The dynamic Dropout optimization mechanism includes: design training, pruning / fine-tuning, and quantization / inference three-state adaptive control logic, wherein Dropout is turned off during the pruning and quantization fine-tuning stages to effectively improve model accuracy.
9. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 8, characterized in that, The dynamic Dropout optimization mechanism specifically includes: During the training phase, Dropout is enabled with a fixed dropout probability of 0.
2. Some neurons are randomly disabled to prevent model overfitting and adapt to scenarios where small sample data is scarce. During the pruning / fine-tuning stage, Dropout is forcibly turned off, and the forward propagation of the Dropout layer is skipped directly, retaining all neuron outputs, avoiding feature noise interference, ensuring the stability of feature distribution after pruning, providing a guarantee for the recovery of fine-tuning accuracy, and thus improving model accuracy. During the quantization / inference phase, Dropout is kept off to reduce quantization sensitivity and errors, while improving inference efficiency and ensuring high accuracy and stability of the lightweight model when deployed at the edge.
10. The method for target recognition in few-sample SAR images based on lightweight attention enhancement as described in claim 1, characterized in that, The post-training quantization includes: introducing post-training quantization (PTQ) technology on the basis of the pruned and fine-tuned model, adopting the INT8 symmetric quantization strategy, and combining the computing characteristics of edge hardware to significantly reduce storage and inference overhead under the premise of controllable accuracy loss. The quantization range and core parameters include: the core of quantization is to map floating-point weights to 8-bit integers; the quantization range is -128 to 127, and the extreme value range of the weights is calculated by calibration to determine the quantization scaling factor and quantization zero point, wherein the quantization zero point is 0 in symmetric quantization; the quantization range is only used to quantize the weights of convolutional layers and fully connected layers in the model.