A super-resolution reconstruction method and apparatus based on preserving recognition features
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-19
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]针对相关技术的缺陷,本发明的目的在于提供一种基于识别特征保持的超分辨率重建方法及装置,旨在解决在重建面向识别任务的退化图像时,如何对图像识别特征进行重建的问题
[0046]1、本发明提供的一种基于识别特征保持的超分辨率重建方法,在生成器添加了空间注意力机制,使得特征具有不同的空间注意力权重,从而构建更为精准的重建网络,增强对图像中目标的重建效果。
Smart Images

Figure CN116681586B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and more specifically, relates to a super-resolution reconstruction method and apparatus based on feature preservation. Background Technology
[0002] In recent years, with the rapid development of deep learning, image recognition technology has been widely applied in fields such as security monitoring, medical diagnostic assistance, and disaster monitoring. Images are carriers of information; generally, images carry more information than text or audio. The higher the image quality, the more information it carries. However, image acquisition is affected by various objective factors, such as network latency, rain and snow, and camera shake, often resulting in some degree of image degradation, which adversely affects subsequent image processing. There are generally two solutions to this problem: 1) Optimize the image acquisition process by using higher-performance equipment, acquiring images in favorable environments, and increasing network bandwidth. However, this approach is costly and highly dependent on technological advancements and environmental changes, leading to significant uncertainty; 2) Improve image quality by using algorithms such as deblurring and super-resolution to reconstruct degraded images, thereby enhancing the information carried by the image. This method not only avoids the high costs of hardware upgrades but also can be implemented on various platforms, making it widely applicable.
[0003] Image resolution is a parameter used to evaluate the richness of information carried in an image. Compared to low-resolution (LR) images, high-resolution (HR) images typically contain richer details and higher reliability. Super-resolution image reconstruction (SRIR) can reconstruct LR images to obtain corresponding SR images. It has received considerable research in computer vision and has been used to solve practical problems. For example, in public security, super-resolution reconstruction can recover information such as license plates and faces, facilitating subsequent recognition. However, image super-resolution reconstruction is an ill-posed problem; for the same LR image, multiple different SR images can be reconstructed depending on the loss function and evaluation metrics.
[0004] Current research on Single Image Super-Resolution (SISR) algorithms typically focuses on two evaluation metrics: Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM). These metrics aim to optimize the pixel-domain similarity and visual effects between SR and HR images. However, during the recognition process, commonly used neural network recognition algorithms classify targets based on extracted features. Therefore, when considering image recognition, there is a challenge in reconstructing degraded images based on image recognition features for the recognition task. Summary of the Invention
[0005] In view of the shortcomings of related technologies, the purpose of this invention is to provide a super-resolution reconstruction method and apparatus based on the preservation of recognition features, which aims to solve the problem of how to reconstruct image recognition features when reconstructing degraded images for recognition tasks.
[0006] To achieve the above objectives, in a first aspect, the present invention provides a super-resolution reconstruction method based on preserving recognition features, comprising:
[0007] A low-resolution image is input into a generator built on a spatial attention mechanism to obtain a super-resolution reconstructed image;
[0008] High-resolution images with category labels are input into a recognition network for pre-training to obtain a feature extraction network;
[0009] The high-resolution image and the super-resolution reconstructed image are respectively input into the feature extraction network to extract features and calculate feature loss;
[0010] The extracted features are input into the classification part of the feature extraction network to calculate the classification loss;
[0011] The high-resolution image and the super-resolution reconstructed image are respectively input into the discriminator to calculate the generator's loss;
[0012] The total loss is obtained based on the feature loss, the classification loss, and the generator loss, and the generator is trained based on the total loss to obtain the target generator;
[0013] The low-resolution image of the target is input into the target generator to obtain the reconstructed super-resolution image of the target.
[0014] Optionally, the step of inputting the low-resolution image into a generator constructed based on a spatial attention mechanism to obtain a super-resolution reconstructed image includes:
[0015] The low-resolution image is input into the generator, and an initial feature map is obtained through the feature extraction part.
[0016] The initial feature image is input into the attention module of the generator. The channels of the feature image are compressed by mean pooling and max pooling respectively. The two 1-channel feature images are then merged into a 2-channel feature image, and then passed through an n*n convolution kernel to obtain the spatial attention weights.
[0017] The reconstruction part of the generator changes the importance of features in the initial feature map according to the spatial attention weights to reconstruct the super-resolution image.
[0018] Optionally, the feature loss calculation uses the L1 loss calculation method, and the calculation formula is as follows:
[0019]
[0020] In the above formula, I HR (x,y) represents the high-resolution image HR, I SR (x,y) represents the super-resolution reconstructed image SR, M VGG-F (I HR (x,y) represents the HR feature map obtained after inputting the HR image into the feature extraction network, M VGG-F (I SR (x,y) is the SR feature map obtained after inputting the SR image into the feature extraction network.
[0021] Optionally, the classification loss is calculated using the cross-entropy loss method, and the calculation formula is as follows:
[0022]
[0023] Where N is the total number of image categories, The classification results for HR images, The classification results are for the SR images.
[0024] Optionally, the discriminator's loss is an adversarial loss; the generator's loss includes content loss, perceptual loss, and generation loss.
[0025] The content loss is calculated by calculating the absolute value of the pixel-by-pixel difference between the super-resolution reconstructed image and the corresponding high-resolution image, as follows:
[0026]
[0027] Where G is the generator, x i For low-resolution images LR, G(x) i) refers to the super-resolution reconstructed image SR obtained by the generator, and y is the corresponding high-resolution image HR;
[0028] The perceptual loss is calculated by extracting features from the SR image and the corresponding HR image using the pre-activation recognition network, summing the Euclidean distances point-by-point on the SR image feature map and the corresponding HR image feature map, and then calculating the mean of the sum of squares. The calculation formula is as follows:
[0029]
[0030] Among them, W i,j H is the width of the feature map. i,j For the height of the feature map, φ i,j (I HR ) x,y For HR images in φ i,j The feature point value at position (x,y), φ i,j (G(I LR )) x,y For SR images in φ i,j The feature point values at the (x,y) position;
[0031] The formula for calculating the generation loss is:
[0032]
[0033] Where, x r Represents the HR image, x f The image represented by SR, a super-resolution reconstructed image generated from the low-resolution image LR through a generator. Ra (a,b) is the difference operation.
[0034] Optionally, the total loss is:
[0035]
[0036] Where α, β, γ, and δ are all constants; L percep Indicates perceived loss. To generate the loss, L cont Indicates content loss, L FM For feature loss, L RC This represents the relative classification loss.
[0037] Secondly, the present invention also provides a super-resolution reconstruction apparatus based on preserving recognition features, comprising:
[0038] The reconstructed image acquisition module is used to input low-resolution images into a generator built based on a spatial attention mechanism to obtain super-resolution reconstructed images;
[0039] The pre-training module is used to input high-resolution images with category labels into the recognition network for pre-training to obtain the feature extraction network;
[0040] The feature loss module is used to input the high-resolution image and the super-resolution reconstructed image into the feature extraction network respectively, extract features, and calculate feature loss;
[0041] The classification loss module is used to input the extracted features into the classification part of the feature extraction network and calculate the classification loss;
[0042] The generator loss module is used to input the high-resolution image and the super-resolution reconstructed image into the discriminator respectively to calculate the generator loss.
[0043] A generator training module is used to obtain a total loss based on the feature loss, the classification loss, and the generator loss, and to train the generator based on the total loss to obtain a target generator;
[0044] The target image generation module is used to input the low-resolution target image into the target generator to obtain the reconstructed high-resolution target image.
[0045] The above-described technical solutions conceived in this invention can achieve the following beneficial effects:
[0046] 1. The present invention provides a super-resolution reconstruction method based on feature preservation, which adds a spatial attention mechanism to the generator so that features have different spatial attention weights, thereby constructing a more accurate reconstruction network and enhancing the reconstruction effect of targets in the image.
[0047] 2. The present invention provides a super-resolution reconstruction method based on recognition feature preservation. The feature extraction network pre-trained on the high-resolution image dataset can calculate feature loss and classification loss, and incorporate the features that play a role in recognition into the super-resolution reconstruction process, so that the super-resolution reconstructed image has more features that are conducive to recognition effect.
[0048] 3. The present invention provides a super-resolution reconstruction method based on preserving recognition features. It proposes and designs feature loss and classification loss, and trains the generator together with content loss, perceptual loss and generation loss, which improves the recognizability of super-resolution reconstructed images and also obtains higher reconstructed image quality. Attached Figure Description
[0049] Figure 1 This is a flowchart illustrating a super-resolution reconstruction method based on feature preservation provided by the present invention.
[0050] Figure 2This is a schematic diagram of the structure of a super-resolution reconstruction network model based on feature preservation provided by the present invention;
[0051] Figure 3 This is a schematic diagram of the spatial attention module structure in the generator provided by the present invention;
[0052] Figure 4 This is a schematic diagram of the feature extraction network used in this invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0054] The following description, in conjunction with a preferred embodiment, illustrates the content involved in the above embodiments.
[0055] like Figure 1 As shown, a super-resolution reconstruction method based on preserving recognition features includes:
[0056] S1. Input the low-resolution image into a generator built based on the spatial attention mechanism to obtain the super-resolution reconstructed image;
[0057] S2. Input the high-resolution image with category labels into the feature network for pre-training to obtain the feature extraction network;
[0058] S3. Input the high-resolution image and the super-resolution reconstructed image into the feature extraction network respectively, extract features and calculate feature loss;
[0059] S4. Input the extracted features into the classification part of the feature extraction network and calculate the classification loss;
[0060] S5. Input the high-resolution image and the super-resolution reconstructed image into the discriminator respectively to calculate the generator's loss;
[0061] S6. Obtain the total loss based on the feature loss, classification loss, and generator loss, and train the generator based on the total loss to obtain the target generator;
[0062] S7. Input the low-resolution image of the target into the target generator to obtain the reconstructed super-resolution image of the target.
[0063] Currently, two commonly used image super-resolution evaluation metrics are Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity Index (SSIM). These metrics aim to make the structure and quality of the reconstructed image as close as possible to the corresponding high-resolution image at the pixel level, but they do not consider feature-level approximation and have no direct impact on recognition performance. Therefore, in subsequent image recognition processes, these two metrics cannot guarantee that the recognition performance of the reconstructed image will be similar to that of the high-resolution image. In practical applications, using super-resolution reconstruction techniques to process degraded images before recognition to obtain better recognition results is a common method. To address the above technical issues, this application proposes a feature-preserving super-resolution reconstruction method for feature recognition and reconstruction of targets in degraded images. For example, in the field of public security, super-resolution reconstruction can recover information such as license plates and faces, facilitating subsequent recognition.
[0064] like Figure 2 As shown, the network model used in this embodiment of the invention comprises three modules: a generator, a discriminator, and a feature extraction network. The generator includes a feature extraction part and a reconstruction part. The outermost layer of the feature extraction part is a spatial attention module, which includes pooling layers and convolutional layers. The generator accepts low-resolution image input, performs feature extraction, upsampling, and convolution processing, and outputs a super-resolution reconstructed image. The feature extraction network accepts high-resolution image and super-resolution reconstructed image input, extracts the feature images corresponding to the high-resolution image and super-resolution reconstructed image, and outputs feature loss and classification loss to train the generator. The discriminator accepts high-resolution image or super-resolution reconstructed image input, outputs the true probability of the image, obtains the generator's loss, and uses the generator's loss to train the generator.
[0065] The generator incorporates a spatial attention module, placed at its outermost layer. This spatial attention mechanism assigns greater weight to features more readily recognizable during image reconstruction. Placing the attention module at the outermost layer of feature extraction means that features with altered weights are directly input into the generator's reconstruction section. In this case, changes in weights have the most direct impact on the image reconstruction process. The generator accepts a low-resolution image (LR image) as input. After feature extraction, upsampling, and convolution, it outputs a super-resolution image reconstruction (SR image). High-resolution images (HR images) and super-resolution reconstructed images are input into the feature extraction network, which outputs the feature loss and classification loss corresponding to the HR and SR images, respectively. The discriminator accepts either the HR or SR image as input and outputs the true probability of the image.
[0066] When performing super-resolution image reconstruction, inputting a low-resolution image into the reconstruction part of the generator incurs loss errors. Therefore, during network model training, it is necessary to calculate the loss and construct the trained reconstruction network model. The loss errors affecting the generator's reconstruction part include feature loss, classification loss, and generator loss. The generator loss further includes content loss, perceptual loss, and generation loss. After the feature extraction network obtains the extracted features of the HR or SR image, the feature loss is calculated based on these features. The extracted features are then input into the classification part of the feature extraction network to calculate the classification loss. The high-resolution image and the super-resolution reconstructed image are input into the discriminator to calculate the generative adversarial loss, which includes both the generator loss and the discriminator loss. The total loss is obtained based on the feature loss, classification loss, and generator loss. The generator is then trained using the total loss to obtain the trained reconstruction network model. The discriminator loss is used to train the discriminator.
[0067] In this architecture, the generator G uses an ESRGAN network generator, and the discriminator uses an ESRGAN network discriminator. The ESRGAN algorithm proposes a Residual-in-Residu Dense Block (RRDB) structure, which improves the artifact problem in reconstructed images, enhances the adversarial loss, enables the discriminator to estimate the realism of the SR image, and improves the calculation method of the perceptual loss. These improvements make ESRGAN superior in terms of the visual effect of reconstructed images. Considering that different regions in an image contribute differently to the recognition task, a method is added to the generator of the ESRGAN network... Figure 3The spatial attention module shown discovers the dependencies between different feature points in the feature map, combining the dependencies of each feature point with other feature points into a weight, thereby changing the importance of each feature point. The feature extraction network used in this invention is the feature extraction part of the VGG16 network, which contains 13 convolutional layers, such as... Figure 4 As shown. This feature extraction network is pre-trained on high-resolution images, and then pre-trained on a VGG16 convolutional recognition network using labeled high-resolution images to obtain the feature extraction network M. VGG-F Then, feature matching loss is calculated on the feature maps of HR and SR images to filter out features that play a major role in the image recognition process.
[0068] Optionally, S1 specifically includes:
[0069] S11. Input the low-resolution image into the generator, and obtain the initial feature map through the feature extraction part;
[0070] S12. Input the initial feature image into the attention module in the generator. After passing through average pooling and max pooling respectively, the channels of the feature image are compressed. Then, the two 1-channel feature images are merged into a 2-channel feature image. Then, through an n*n convolution kernel, the spatial attention weights are obtained.
[0071] S13. The reconstruction part in the generator changes the importance of features in the initial feature map according to the spatial attention weights, and reconstructs the super-resolution image.
[0072] The spatial attention module is located at the outermost layer of the generator's feature extraction section. Placing the attention module at the outermost layer of feature extraction allows features with altered weights to be directly input into the generator's reconstruction section. After the feature extraction network obtains feature maps of the high-resolution image and the super-resolution reconstructed image, they are input into the spatial attention module. Average pooling and max pooling are used to compress the channels of the feature maps, merging the 1-channel feature maps obtained from average pooling and max pooling into a single 2-channel feature map. This 2-channel feature map is then passed through an n*n convolutional kernel to generate the final spatial attention weights. For example, in this embodiment, a 7*7 convolutional kernel is used. The spatial attention weights represent the importance of a spatial location in the image. The feature extraction network amplifies useful features and weakens useless features based on these spatial attention weights, achieving feature filtering and enhancement, thereby improving the accuracy of the reconstructed image.
[0073] Optionally, the feature extraction network uses the L1 loss calculation method when calculating the feature loss based on the extracted features. The calculation formula is as follows:
[0074]
[0075] In the above formula, I HR (x,y) represents the high-resolution image HR, I SR (x,y) represents the super-resolution reconstructed image SR, M VGG-F (I HR (x,y) represents the HR feature map obtained after inputting the HR image into the feature extraction network, M VGG-F (I SR (x,y) is the SR feature map obtained after inputting the SR image into the feature extraction network.
[0076] Optionally, the classification loss is calculated using the cross-entropy loss method, and the calculation formula is as follows:
[0077]
[0078] Where N is the total number of image categories, The classification results for HR images, The classification results are for the SR images.
[0079] Optionally, the discriminator's loss is an adversarial loss; the generator's loss includes content loss, perceptual loss, and generation loss.
[0080] The content loss is calculated by calculating the absolute value of the pixel-by-pixel difference between the super-resolution reconstructed image and the corresponding high-resolution image, as follows:
[0081]
[0082] Where G is the generator, x i For low-resolution images LR, G(x) i ) refers to the super-resolution reconstructed image SR obtained by the generator, and y is the corresponding high-resolution image HR.
[0083] The perceptual loss is calculated by extracting features from the SR image and the corresponding HR image using the pre-activation recognition network, summing the Euclidean distances point-by-point on the SR image feature map and the corresponding HR image feature map, and then calculating the mean of the sum of squares. The calculation formula is as follows:
[0084]
[0085] Among them, W i,j H is the width of the feature map. i,j For the height of the feature map, φ i,j (I HR ) x,y For HR images in φ i,j The feature point value at position (x,y), φ i,j (G(ILR )) x,y For SR images in φ i,j The feature point values at the (x,y) position.
[0086] The formula for calculating the generation loss is:
[0087]
[0088] Where, x r Represents the HR image, x f The image represented by SR, a super-resolution reconstructed image generated from the low-resolution image LR through a generator. Ra (a,b) is the difference operation.
[0089] Furthermore, the discriminator's loss is the adversarial loss, which is specifically as follows:
[0090]
[0091] Where, x r Represents the HR image, x f The image represented by SR, a super-resolution reconstructed image generated from the low-resolution image LR through a generator. Ra (a,b) is the difference operation.
[0092] The discriminator compares the SR image with the average of the HR image, expecting the SR image to be closer to the HR image; and compares the HR image with the average of the SR image, expecting the HR image to be closer to the SR image.
[0093] Optionally, the total loss of the generator is:
[0094]
[0095] Where α, β, γ, and δ are all constants; L percep Indicates perceived loss. To generate the loss, L cont Indicates content loss, L FM For feature loss, L RC This represents the relative classification loss.
[0096] The generator is trained by combining feature loss, classification loss, and generator loss to obtain the reconstruction network model. During testing, a low-resolution image is input into the generator of the reconstruction network model to obtain the reconstructed target super-resolution image.
[0097] The technical solution of this invention trains the generator by calculating feature loss and classification loss in the feature extraction network; a spatial attention mechanism is added to the generator to calculate the weights corresponding to the features, and features with different weights are fully considered in the image reconstruction process. The features that play a role in recognition are incorporated into the super-resolution reconstruction process, so that the SR image has more features that are conducive to the recognition effect. This solves the technical problem that the image super-resolution reconstruction algorithm does not reconstruct the image recognition features in the image recognition process, and achieves the effect of enhancing the reconstruction effect of the target in the image, improving the recognition ability and recognition accuracy of the super-resolution result image, and obtaining the beneficial effects of higher peak signal-to-noise ratio and structural similarity.
[0098] To further verify the evaluation effect of this invention, images were cropped using the DOTA dataset covering various scenarios including different backgrounds and targets, along with target annotation information. A dataset was constructed for experimental verification, with the cropped high-resolution images measuring 32×32 pixels. Six evaluation metrics—PSNR, SSIM, Acc, Pre, Rec, and F1—were used to experimentally verify the recognition feature-preserving super-resolution reconstruction method against current popular algorithms, including those proposed by Wang X et al. and Ledig C et al. Experimental results show that the recognition feature-preserving super-resolution reconstruction method performs excellently in image recognition metrics and also achieves good results in super-resolution reconstruction evaluation metrics. The evaluation metrics for multiple algorithms are shown in the following tables. Table 1 compares the image recognition performance of the algorithm of this invention with other super-resolution reconstruction algorithms, and Table 2 compares the image quality of the super-resolution reconstructed image with that of the algorithm of this invention.
[0099] Table 1
[0100]
[0101] Table 2
[0102] Ledig C 18.8624 0.4711 Wang X 19.6343 0.5704 This invention 19.9254 0.5733
[0103] Example 2
[0104] This invention provides a super-resolution reconstruction apparatus based on preserving recognition features, comprising:
[0105] The reconstructed image acquisition module is used to input low-resolution images into a generator built based on a spatial attention mechanism to obtain super-resolution reconstructed images;
[0106] The pre-training module is used to input high-resolution images with category labels into the recognition network for pre-training to obtain the feature extraction network;
[0107] The feature loss module is used to input the high-resolution image and the super-resolution reconstructed image into the feature extraction network respectively, extract features, and calculate feature loss;
[0108] The classification loss module is used to input the extracted features into the classification part of the feature extraction network and calculate the classification loss;
[0109] The generator loss module is used to input the high-resolution image and the super-resolution reconstructed image into the discriminator respectively to calculate the generator loss.
[0110] A generator training module is used to obtain a total loss based on the feature loss, the classification loss, and the generator loss, and to train the generator based on the total loss to obtain a target generator;
[0111] The target image generation module is used to input the low-resolution target image into the target generator to obtain the reconstructed high-resolution target image.
[0112] The super-resolution reconstruction device based on preserving recognition features provided in the embodiments of the present invention executes the super-resolution reconstruction method based on preserving recognition features provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0113] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A super-resolution reconstruction method based on preserving recognition features, characterized in that, include: A low-resolution image is input into a generator built on a spatial attention mechanism to obtain a super-resolution reconstructed image; High-resolution images with category labels are input into a recognition network for pre-training to obtain a feature extraction network; The high-resolution image and the super-resolution reconstructed image are respectively input into the feature extraction network to extract features and calculate feature loss; The extracted features are input into the classification part of the feature extraction network to calculate the classification loss; The high-resolution image and the super-resolution reconstructed image are respectively input into the discriminator to calculate the generator's loss; The total loss is obtained based on the feature loss, the classification loss, and the generator loss, and the generator is trained based on the total loss to obtain the target generator; The low-resolution image of the target is input into the target generator to obtain the reconstructed super-resolution image of the target; The discriminator's loss is an adversarial loss; the generator's loss includes content loss, perceptual loss, and generation loss. The content loss is calculated by calculating the absolute value of the pixel-by-pixel difference between the super-resolution reconstructed image and the corresponding high-resolution image, as follows: Where G is the generator, For low-resolution images, LR The super-resolution reconstructed image SR obtained by the generator is referred to as SR. For the corresponding high-resolution image HR; The perceptual loss is calculated by extracting features from the SR image and the corresponding HR image using the pre-activation recognition network, summing the Euclidean distances point-by-point on the SR image feature map and the corresponding HR image feature map, and then calculating the mean of the sum of squares. The calculation formula is as follows: in, The width of the feature map, For the height of the feature map, For HR images in The feature point values at the (x,y) position. For SR images in The feature point values at the (x,y) position; The formula for calculating the generation loss is: in, Representing HR images, The image represented by SR is a super-resolution reconstructed image generated from a low-resolution image (LR) through a generator. (a,b) represents the difference operation; The total loss is: in , , and All are constants; Indicates perceived loss. To generate loss, Indicates content loss. For feature loss, This represents the relative classification loss.
2. The method as described in claim 1, characterized in that, The step of inputting a low-resolution image into a generator constructed based on a spatial attention mechanism to obtain a super-resolution reconstructed image includes: The low-resolution image is input into the generator, and an initial feature map is obtained through the feature extraction part. The initial feature image is input into the attention module of the generator, and after average pooling and max pooling, the channels of the feature image are compressed. The two resulting 1-channel feature images are then merged into a single 2-channel feature image, which is then processed by an n-channel pooling module. n convolutional kernels yield spatial attention weights; The reconstruction part of the generator changes the importance of features in the initial feature map according to the spatial attention weights to reconstruct the super-resolution image.
3. The method as described in claim 1, characterized in that, The feature loss is calculated using the L1 loss method, and the calculation formula is as follows: In the above formula, Represents high-resolution image (HR). This indicates the super-resolution reconstructed image SR. This refers to the HR feature map obtained after inputting the HR image into the feature extraction network. This is the SR feature map obtained after inputting the SR image into the feature extraction network.
4. The method as described in claim 1, characterized in that, The classification loss is calculated using the cross-entropy loss method, and the formula is as follows: Where N is the total number of image categories, The classification results for HR images, The classification results are for the SR images.
5. A super-resolution reconstruction device based on preserving recognition features, characterized in that, include: The reconstructed image acquisition module is used to input low-resolution images into a generator built based on a spatial attention mechanism to obtain super-resolution reconstructed images; The pre-training module is used to input high-resolution images with category labels into the recognition network for pre-training to obtain the feature extraction network; The feature loss module is used to input the high-resolution image and the super-resolution reconstructed image into the feature extraction network respectively, extract features, and calculate feature loss; The classification loss module is used to input the extracted features into the classification part of the feature extraction network and calculate the classification loss; The generator loss module is used to input the high-resolution image and the super-resolution reconstructed image into the discriminator respectively to calculate the generator loss. A generator training module is used to obtain a total loss based on the feature loss, the classification loss, and the generator loss, and to train the generator based on the total loss to obtain a target generator; The target image generation module is used to input the target low-resolution image into the target generator to obtain the reconstructed target super-resolution image; The discriminator's loss is an adversarial loss; the generator's loss includes content loss, perceptual loss, and generation loss. The content loss is calculated by calculating the absolute value of the pixel-by-pixel difference between the super-resolution reconstructed image and the corresponding high-resolution image, as follows: Where G is the generator, For low-resolution images, LR The super-resolution reconstructed image SR obtained by the generator is referred to as SR. For the corresponding high-resolution image HR; The perceptual loss is calculated by extracting features from the SR image and the corresponding HR image using the pre-activation recognition network, summing the Euclidean distances point-by-point on the SR image feature map and the corresponding HR image feature map, and then calculating the mean of the sum of squares. The calculation formula is as follows: in, The width of the feature map, For the height of the feature map, For HR images in The feature point values at the (x,y) position. For SR images in The feature point values at the (x,y) position; The formula for calculating the generation loss is: in, Representing HR images, The image represented by SR is a super-resolution reconstructed image generated from a low-resolution image (LR) through a generator. (a,b) represents the difference operation; The total loss is: in , , and All are constants; Indicates perceived loss. To generate loss, Indicates content loss. For feature loss, This represents the relative classification loss.