Low-resolution image classification method and device, storage medium, equipment and program product

By combining super-resolution technology and the visual Mamba network, and using the knowledge distillation learning method, the problem of low-resolution image classification models with many parameters and a large amount of calculations is solved, and higher classification accuracy and resource efficiency are achieved.

CN118710985APending Publication Date: 2024-09-27ARMY ENG UNIV OF PLA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410940415.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing low-resolution image classification models have many parameters and a large amount of calculations, making them difficult to implement on mobile devices with limited resources. Moreover, the classification accuracy does not perform well in low-resolution image tasks.

Method used

It uses a pre-trained low-resolution image classification network that combines super-resolution and visual Mamba, combines the super-resolution sub-network and the visual Mamba classification sub-network, and uses the knowledge distillation learning method to extract image features in a lightweight and efficient manner and learn high-resolution images. of detailed information.

Benefits of technology

It achieves higher low-resolution image classification accuracy, reduces the amount of parameters and calculations, is suitable for devices with limited resources, and improves the model's classification accuracy for low-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710985A
    Figure CN118710985A
Patent Text Reader

Abstract

The invention discloses a low-resolution image classification method and device, a storage medium, equipment and a program product, and belongs to the technical field of image processing. The method comprises the following steps: acquiring low-resolution image data to be classified; inputting the to-be-classified low-resolution image data into a pre-trained low-resolution image classification network combining super-classification and visual Mama, and outputting a classification result of the to-be-classified low-resolution image; the pre-trained super-resolution and visual Mama combined low-resolution image classification network sequentially comprises a trained super-resolution sub-network and a pre-trained visual Mama classification sub-network; the pre-trained visual Mama classification sub-network is obtained by training the pre-constructed visual Mama classification sub-network by utilizing a joint loss function method based on knowledge distillation based on the sample image data and the pre-trained visual Mama classification teacher network. According to the invention, better low-resolution image classification precision can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a low-resolution image classification method, device, storage medium, equipment and program product, and belongs to the technical field of image processing. Background Art

[0002] With the rapid development of deep learning, many classification networks have shown high classification accuracy on high-resolution images. However, in actual application scenarios, most of the acquired image targets show low-resolution features. When the classification model trained in the high-resolution image dataset is directly applied to the low-resolution image classification task, its classification accuracy drops sharply.

[0003] In the study of low-resolution image classification tasks, many methods based on deep learning have been proposed. The Chinese invention patent with publication number CN115512096A builds a dual-branch parallel network based on convolutional neural networks and Transformer, fuses the features of each layer of the two branches through an attention feature fusion network, and uses a multi-channel attention network to mine semantic information on the fused features. The Chinese invention patent with publication number CN115661510A constructs an image classification network model based on super-resolution reconstruction and category consistency, improves the quality of low-resolution images by short-circuiting connections between super-resolution reconstruction network modules, and increases the resolution of features extracted by the low-resolution feature extraction network by constraining the category probabilities between networks to be consistent.

[0004] In addition, in order to solve the problem of missing or blurred features in key areas of low-resolution images, researchers also use super-resolution technology to enhance the details of low-resolution images. Publication number CN116452418A uses super-resolution technology to first generate a super-resolution image from a low-resolution target image, and then uses a high-resolution image classifier to generate recognition results based on the super-resolution image. The Chinese invention patent with publication number CN115527063A both propose a low-resolution image recognition method based on image super-resolution and knowledge distillation, using high- and low-resolution images to train the super-resolution network, and using the knowledge distillation method to train the distillation sub-network.

[0005] Although the above methods have high classification accuracy, the classification networks are mostly Transformer and ResNet50, which have many parameters and large computational complexity, and cannot be implemented on resource-constrained mobile devices.

[0006] Recently, the state-space model Mamba has effectively overcome the prediction inefficiency problem caused by the quadratic computational complexity of the Transformer architecture model. Based on Mamba, researchers have built an efficient and general visual state-space model VisionMamba, which outperforms many mainstream visual Transformers in general image classification, object detection, and semantic segmentation tasks, and has fewer parameters and lower computational complexity than Transformer and ResNet50.

[0007] Therefore, how to build a low-resolution image classification network based on Visual Mamba and propose a knowledge distillation learning method suitable for the Visual Mamba network so that the Visual Mamba network can learn the detailed information of high-resolution images is an urgent problem to be solved in this field. Summary of the invention

[0008] The purpose of the present invention is to overcome the shortcomings of the existing high-resolution image classification model in that it has many parameters, large amount of calculation, and is difficult to implement, and to provide a low-resolution image classification method, device, storage medium, equipment, and program product that can obtain better low-resolution image classification accuracy. To achieve the above purpose, the present invention is implemented by adopting the following technical solutions:

[0009] In a first aspect, the present invention provides a low-resolution image classification method, comprising:

[0010] Obtain low-resolution image data to be classified;

[0011] Inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting a classification result of the low-resolution image to be classified;

[0012] Among them, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network includes a trained super-resolution subnetwork and a pre-trained visual Mamba classification subnetwork in sequence; the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the pre-trained visual Mamba classification teacher network is obtained by training a pre-constructed visual Mamba classification teacher network based on sample image data.

[0013] In combination with the first aspect, optionally, inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting a classification result of the low-resolution image to be classified includes:

[0014] Inputting the low-resolution image data to be classified into the trained super-resolution sub-network, and outputting the super-resolution image to be classified;

[0015] The super-resolution image to be classified is input into the pre-trained visual Mamba classification subnetwork, and the classification result of the low-resolution image to be classified is output.

[0016] In combination with the first aspect, optionally, the network structure of the pre-trained visual Mamba classification subnetwork is the same as the network structure of the pre-trained visual Mamba classification teacher network, and includes, in sequence: a data dimension reduction module, a visual Mamba encoder, and a multi-layer perceptron head; the visual Mamba encoder has 24 layers;

[0017] The data dimension reduction module is used to: convert the two-dimensional super-resolution image into a two-dimensional patch by flattening operation, linearly project the two-dimensional patch onto a vector with a dimension size of 192 and add position encoding, embed a class tag in the middle of the two-dimensional patch sequence to represent the entire sequence of the super-resolution image, and obtain ;

[0018] The visual Mamba encoder is used to: take as input the first layer of the visual Mamba encoder, output hidden state ; Repeat the hidden state As the input of the i-th layer of the visual Mamba encoder, the output hidden state , expressed by the following formula:

[0019] (1)

[0020] In formula (1), represents the visual Mamba encoder, i The value range is 1≤ i ≤24;

[0021] The multi-layer perceptron head is used to: Output class prediction probability , expressed by the following formula:

[0022] (2)

[0023] In formula (2), represents the normalization layer, Represents a multilayer perceptron head.

[0024] In combination with the first aspect, optionally, the pre-trained visual Mamba classification teacher network is trained based on sample image data, and is trained by the following steps:

[0025] The high-resolution image data obtained by preprocessing the sample image data is input into the pre-built visual Mamba classification teacher network, and the classification results of the teacher network training are output;

[0026] Based on the true label of the sample image data, the cross entropy loss of the teacher network training classification result is calculated, which is expressed by the following formula:

[0027] (3)

[0028] In formula (3), represents the cross entropy function, represents the class prediction probability in the classification result of teacher network training, Represents the true label of the image;

[0029] Determine whether the cross entropy loss meets the preset first value; if not, adjust the network parameters of the visual Mamba classification teacher network and output the teacher network training classification result, and calculate the cross entropy loss; if satisfied, output the network parameters of the visual Mamba classification teacher network to obtain the pre-trained visual Mamba classification teacher network.

[0030] In combination with the first aspect, optionally, the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the training is performed by the following steps:

[0031] Inputting low-resolution image data obtained by preprocessing sample image data into the trained super-resolution sub-network to obtain a first super-resolution image of the sample;

[0032] Inputting the first super-resolution image of the sample into a pre-constructed visual Mamba classification subnetwork to obtain a first classification result;

[0033] The high-resolution image data obtained by preprocessing the sample image data is input into the pre-trained visual Mamba classification teacher network to obtain the second classification result;

[0034] Based on the second classification result, calculate the joint loss function of the first classification result;

[0035] Determine whether the joint loss function satisfies a preset second value; if not, adjust the network parameters of the visual Mamba classification subnetwork and then output the first classification result, and calculate the joint loss function; if satisfied, output the network parameters of the visual Mamba classification subnetwork to obtain a pre-trained visual Mamba classification subnetwork.

[0036] In combination with the first aspect, optionally, the first classification result includes a first hidden state and the first type prediction probability , the second classification result includes a second hidden state and the second type of predicted probability , the joint loss function is expressed by the following formula:

[0037] (4)

[0038] In formula (4), represents the joint loss function, The cross entropy loss of the first classification result output by the visual Mamba classification subnetwork calculated based on the true label of the sample image data is expressed by the following formula:

[0039] (5)

[0040] In formula (5), represents the cross entropy function, Represents the true label of the image;

[0041] In formula (4), express The weight of The knowledge distillation loss representing the predicted probability of the second category to the predicted probability of the first category is expressed by the following formula:

[0042] (6)

[0043] In formula (6), represents the KL divergence function, represents the temperature of the KL divergence function, Represents the Softmax function;

[0044] In formula (4), express The weight of represents the knowledge distillation loss of the second hidden state to the first hidden state, which is expressed by the following formula:

[0045] (7)

[0046] In formula (7), represents the mean square error loss function, represents the low-resolution hidden state of the i-th layer output in the first hidden state, represents the high-resolution hidden state of the output of the i-th layer in the second hidden state.

[0047] In a second aspect, the present application provides a low-resolution image classification device, comprising:

[0048] Acquisition module: used to acquire low-resolution image data to be classified;

[0049] Output module: used for inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting the classification result of the low-resolution image to be classified;

[0050] Among them, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network includes a trained super-resolution subnetwork and a pre-trained visual Mamba classification subnetwork in sequence; the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the pre-trained visual Mamba classification teacher network is obtained by training a pre-constructed visual Mamba classification teacher network based on sample image data.

[0051] In a third aspect, the present invention provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the steps of the low-resolution image classification method described in the first aspect.

[0052] In a fourth aspect, the present invention provides a computer device, comprising:

[0053] Memory, for storing computer programs / instructions;

[0054] A processor is used to execute the computer program / instructions to implement the steps of the low-resolution image classification method described in the first aspect.

[0055] In a fifth aspect, the present invention provides a computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the low-resolution image classification method described in the first aspect.

[0056] Compared with the prior art, the low-resolution image classification method, apparatus, storage medium, device and program product provided by the embodiments of the present invention have the following beneficial effects:

[0057] The present invention obtains low-resolution image data to be classified; inputs the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputs a classification result of the low-resolution image to be classified; in actual use, the present invention only adopts the pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, abandons the visual Mamba classification teacher network, and does not adopt the joint loss function method based on knowledge distillation for supervised training in actual use; the pre-trained low-resolution image classification network of joint super-resolution and visual Mamba used in actual use has relatively few parameters and calculations; the present invention can obtain better low-resolution image classification accuracy; and realizes efficient improvement of the classification accuracy of the model for low-resolution images with low computing resource consumption;

[0058] The pre-trained joint super-resolution and visual Mamba low-resolution image classification network of the present invention sequentially comprises a trained super-resolution sub-network and a pre-trained visual Mamba classification sub-network; after the super-resolution sub-network restores and reconstructs the detail information of the low-resolution image, the visual Mamba classification sub-network can extract image features lightly and efficiently, and the learning method based on knowledge distillation can guide the visual Mamba classification sub-network to better learn the detail information of the high-resolution image;

[0059] The present invention combines super-resolution technology, visual Mamba and knowledge distillation learning methods into a framework. The method framework mainly includes a super-resolution subnetwork, a visual Mamba classification subnetwork and a learning method based on knowledge distillation. It can achieve similar or even higher classification accuracy with fewer parameters and lower computational complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 is a flow chart of a low-resolution image classification method provided in Example 1 of the present invention;

[0061] Figure 2 Schematic diagram of a framework of a low-resolution image classification method provided by Embodiment 1 of the present invention;

[0062] Figure 3 It is a schematic diagram of the framework of a low-resolution image classification network combining super-resolution and visual Mamba in a low-resolution image classification method provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0063] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0064] Embodiment 1:

[0065] like Figure 1 As shown, the present invention provides a low-resolution image classification method, comprising:

[0066] Obtain low-resolution image data to be classified;

[0067] The low-resolution image data to be classified is input into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and a classification result of the low-resolution image to be classified is output.

[0068] The pre-trained joint super-resolution and visual Mamba low-resolution image classification network consists of a trained super-resolution sub-network and a pre-trained visual Mamba classification sub-network in turn.

[0069] like Figure 3 As shown, the specific steps include: inputting the low-resolution image data to be classified into the trained super-resolution sub-network, and outputting the super-resolution image to be classified; inputting the super-resolution image to be classified into the pre-trained visual Mamba classification sub-network, and outputting the classification result of the low-resolution image to be classified.

[0070] In this embodiment, after the super-resolution sub-network restores and reconstructs the detail information of the low-resolution image, the visual Mamba classification sub-network can extract image features in a lightweight and efficient manner, and the learning method based on knowledge distillation can guide the visual Mamba classification sub-network to better learn the detail information of the high-resolution image.

[0071] Among them, the pre-trained visual Mamba classification subnetwork is obtained by training the pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation.

[0072] The pre-trained visual Mamba classification teacher network is obtained by training a pre-built visual Mamba classification teacher network based on sample image data.

[0073] like Figure 2 As shown, the specific training steps include:

[0074] Step 1: Obtain a sample image dataset and perform preprocessing.

[0075] Step 1.1: Get a sample image dataset.

[0076] In this embodiment, three public image classification datasets of birds (CUB), cars (CAR), and airplanes (AIR) are obtained as sample image datasets.

[0077] Step 1.2: Preprocess the sample image dataset.

[0078] Step 1.2.1: The images in the sample image dataset are scaled, cropped, and randomly horizontally flipped to perform data augmentation to obtain a high-resolution image dataset.

[0079] In this embodiment, the image is scaled to 256×256, cropped to 224×224, and randomly horizontally flipped for data enhancement to obtain a high-resolution image dataset.

[0080] Step 1.2.2: Scale the images in the high-resolution image dataset to obtain a low-resolution image dataset.

[0081] In this embodiment, the images in the high-resolution image dataset are scaled to a size of 56×56 using bicubic downsampling to obtain a low-resolution image dataset.

[0082] Step 1.2.3: Divide the high-resolution image dataset and the low-resolution image dataset into a training set and a test set.

[0083] According to the official annotation information, the high-resolution image dataset and the low-resolution image dataset are divided into training sets and test sets.

[0084] Step 2: Train the pre-constructed visual Mamba classification teacher network based on the sample image data to obtain a pre-trained visual Mamba classification teacher network.

[0085] like Figure 2 As shown, the pre-built visual Mamba classification teacher network includes, in sequence: a data dimension reduction module, a visual Mamba encoder with 24 layers, and a multi-layer perceptron head.

[0086] The data dimension reduction module uses a flattening operation to convert the high-resolution image into a two-dimensional patch, linearly projects the two-dimensional patch onto a vector of dimension size 192 and adds position encoding, and embeds a class label in the middle of the two-dimensional patch sequence to represent the entire sequence of the super-resolution image. .

[0087] The Visual Mamba Encoder will As the input of the first layer of the visual Mamba encoder, the output hidden state Repeat As the input of the i-th layer (1≤i≤24) of the visual Mamba encoder, the output hidden state , expressed by the following formula:

[0088] (1)

[0089] In formula (1), Represents the visual Mamba encoder.

[0090] The multi-layer perceptron head is based on the last hidden state of the visual Mamba encoder. Output class prediction probability , expressed by the following formula:

[0091] (2)

[0092] In formula (2), represents the normalization layer, Represents a multilayer perceptron head.

[0093] In this embodiment, the structure of the visual Mamba encoder and the multi-layer perceptron head is specifically described in Zhu L, Liao B, Zhang Q, et al. Vision mamba: Efficient visual representation learning with bidirectional state space model[J]. arXiv preprint arXiv:2401.09417, 2024.

[0094] Step 2.1: Input the training set of high-resolution image data obtained by preprocessing the sample image data into the pre-built visual Mamba classification teacher network, and output the classification results of the teacher network training.

[0095] Step 2.2: Based on the true label of the sample image data, calculate the cross entropy loss of the teacher network training classification result, which is expressed by the following formula:

[0096] (3)

[0097] In formula (3), represents the cross entropy function, represents the class prediction probability in the classification result of teacher network training, Represents the true label of the image.

[0098] Step 2.3: Determine whether the cross entropy loss satisfies a preset first value.

[0099] If not, adjust the network parameters of the visual Mamba classification teacher network, return to step 2.1 to output the teacher network training classification results, and calculate the cross entropy loss through step 2.2.

[0100] If satisfied, the network parameters of the visual Mamba classification teacher network are output to obtain the pre-trained visual Mamba classification teacher network.

[0101] In this embodiment, the network parameters of the pre-trained visual Mamba classification teacher network are set to:

[0102] The initial learning rate is set to 10 -6 , weight decay is 10 -8 ,The patch extraction step size of the data ,dimension reduction module in the visual Mamba classification teacher network is 8, using the AdamW optimizer, the batch size is 16, and the momentum size is 0.9.

[0103] Step 3: Get the pre-built visual Mamba classification subnetwork.

[0104] The pre-built joint super-resolution and visual Mamba low-resolution image classification network consists of a trained super-resolution sub-network and a pre-built visual Mamba classification sub-network in turn.

[0105] The trained super-resolution subnetwork is the generator in SRGAN, which uses SRResNet pre-trained on ImageNet.

[0106] In this embodiment, the method for constructing the super-resolution sub-network is specifically described in Ledig C, Theis L, HuszárF, et al. Photo-realistic single image super-resolution using a generativeadversarial network[C] / / Proceedings of the IEEE conference on computer visionand pattern recognition. 2017: 4681-4690.

[0107] The training set of low-resolution image data obtained by preprocessing the sample image data is input into the trained super-resolution sub-network, and the generated super-resolution image is output.

[0108] like Figure 2 As shown, the network structure of the pre-built visual Mamba classification sub-network is the same as the network structure of the pre-built visual Mamba classification teacher network in step 2, which includes: a data dimension reduction module, a visual Mamba encoder with 24 layers and a multi-layer perceptron head.

[0109] The data dimension reduction module uses a flattening operation to convert the two-dimensional super-resolution image into a two-dimensional patch, linearly projects the two-dimensional patch onto a vector of dimension size 192 and adds position encoding, and embeds a class label in the middle of the two-dimensional patch sequence to represent the entire sequence of the super-resolution image. .

[0110] The Visual Mamba Encoder will As the input of the first layer of the visual Mamba encoder, the output hidden state ; Repeat the hidden state As the input of the i-th layer (1≤i≤24) of the visual Mamba encoder, the output hidden state , expressed by the following formula:

[0111] (4)

[0112] In formula (4), Represents the visual Mamba encoder.

[0113] The multilayer perceptron head is based on the hidden state Output class prediction probability , expressed by the following formula:

[0114] (5)

[0115] In formula (5), represents the normalization layer, Represents a multilayer perceptron head.

[0116] Step 4: Figure 2 As shown, based on the sample image data and the pre-trained visual Mamba classification teacher network, the pre-constructed visual Mamba classification sub-network is trained using a joint loss function method based on knowledge distillation to obtain the pre-trained visual Mamba classification sub-network.

[0117] Step 4.1: Input the training set of low-resolution image data obtained by preprocessing the sample image data into the trained super-resolution sub-network to obtain a first super-resolution image of the sample.

[0118] Step 4.2: Input the first super-resolution image of the sample into the visual Mamba classification subnetwork pre-constructed in step 3 to obtain the first classification result.

[0119] The first classification result includes the first hidden state and the first type prediction probability .

[0120] Step 4.3: Input the training set of high-resolution image data obtained by preprocessing the sample image data into the visual Mamba classification teacher network pre-trained in step 2 to obtain the second classification result.

[0121] The second classification result includes the second hidden state and the second type of predicted probability .

[0122] Step 4.4: Based on the second classification result, calculate the joint loss function of the first classification result

[0123] The joint loss function is expressed by the following formula:

[0124] (6)

[0125] In formula (6), represents the joint loss function, The cross entropy loss of the first classification result output by the visual Mamba classification subnetwork calculated based on the true label of the sample image data is expressed by the following formula:

[0126] (7)

[0127] In formula (7), represents the cross entropy function, Represents the true label of the image.

[0128] In formula (6), express The weight of The knowledge distillation loss representing the predicted probability of the second category to the predicted probability of the first category is expressed by the following formula:

[0129] (8)

[0130] In formula (8), represents the KL divergence function, represents the temperature of the KL divergence function, Represents the Softmax function.

[0131] In this embodiment, The value is 1.

[0132] In formula (6), express The weight of represents the knowledge distillation loss of the second hidden state to the first hidden state, which is expressed by the following formula:

[0133] (9)

[0134] In formula (9), represents the mean square error loss function, represents the low-resolution hidden state of the i-th layer output in the first hidden state, and represents the high-resolution hidden state of the i-th layer output in the second hidden state.

[0135] In this embodiment, The value is 10.

[0136] Step 4.5: Determine whether the joint loss function satisfies a preset second value.

[0137] If not satisfied, adjust the network parameters of the visual Mamba classification sub-network, return to steps 4.1 and 4.2 to output the first classification result, and calculate the joint loss function through step 4.4.

[0138] If satisfied, the network parameters of the visual Mamba classification subnetwork are output to obtain the pre-trained visual Mamba classification subnetwork.

[0139] In this embodiment, the pre-constructed visual Mamba classification sub-network is trained using a joint loss function method based on knowledge distillation, and the parameters of the trained super-resolution sub-network remain unchanged during the training process.

[0140] The network parameters of the pre-trained visual Mamba classification subnetwork are set as:

[0141] The initial learning rate is set to 10 -7 , weight decay is 10 -8 The patch extraction step size of the data dimension reduction module in the visual Mamba classification subnetwork is 8, the AdamW optimizer is used, the batch size is 16, and the momentum size is 0.9. The settings of the remaining network parameters are conventionally understood and will not be repeated here.

[0142] Step 5: Test the pre-trained joint super-resolution and Visual Mamba low-resolution image classification network.

[0143] The test set of low-resolution image data obtained by preprocessing the sample image data in step 1.2.3 is input into the pre-trained low-resolution image classification network of joint super-resolution and visual Mamba obtained in step 4.

[0144] In this embodiment, only the pre-trained joint super-resolution and visual Mamba low-resolution image classification network is used, the visual Mamba classification teacher network is discarded, and the joint loss function method based on knowledge distillation is not used for supervised training in actual use. This is because in the training stage, the visual Mamba classification subnetwork adopts the joint loss function based on knowledge distillation for learning, and the detailed information of the high-resolution image data and the hidden state of the high-resolution Mamba classification network have been successfully used to guide the super-resolution visual Mamba classification subnetwork to learn.

[0145] Table 1 shows the comparison results of the low-resolution image classification network of the joint super-resolution and visual Mamba obtained in this embodiment with other algorithms in terms of classification accuracy, number of parameters and amount of calculation.

[0146] Table 1

[0147] algorithm Network structure Teacher Network Bird classification accuracy Car classification accuracy Aircraft classification accuracy Parameter quantity Calculation Amount DRE-Net ResNet50 / 73.77 86.64 82.42 / / DME-Net ResNet50 / 73.02 88.38 85.75 / / SRGAN-ResNet18 SRGAN+ResNet18 / 71.45 82.69 85.00 13.09 8.8 SRGAN-ResNet50 SRGAN+ ResNet50 / 76.70 88.85 86.80 26.21 11.09 SRGAN-Vim-Tiny SRGAN+Vim-Tiny / 77.98 86.59 79.78 8.55 7.48 JSC(SRGAN) SRGAN+ResNet18 ResNet50 73.58 88.15 85.84 13.09 8.8 The method of this embodiment SRGAN+Vim-Tiny / 80.19 88.57 83.38 8.55 7.48

[0148] According to Table 1, compared with other advanced algorithms, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network obtained in this embodiment achieves similar or even higher classification accuracy with fewer parameters and lower computational complexity.

[0149] The pre-trained joint super-resolution and visual Mamba low-resolution image classification network used in this embodiment has relatively few parameters and computational complexity, which can achieve better low-resolution image classification accuracy and achieve efficient improvement of the model's classification accuracy for low-resolution images with low computing resource consumption.

[0150] In summary, this embodiment combines super-resolution technology, visual Mamba and knowledge distillation learning method into a framework. The method framework mainly includes a super-resolution subnetwork, a visual Mamba classification subnetwork and a learning method based on knowledge distillation. It can achieve similar or even higher classification accuracy with fewer parameters and lower computational complexity, and can solve the problems of low-resolution classification models with many parameters, large computational complexity and difficulty in implementation.

[0151] Embodiment 2:

[0152] Based on the same inventive concept as that of Embodiment 1, this embodiment provides a low-resolution image classification device, comprising:

[0153] Acquisition module: used to acquire low-resolution image data to be classified;

[0154] Output module: used for inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting the classification result of the low-resolution image to be classified;

[0155] Among them, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network includes a trained super-resolution subnetwork and a pre-trained visual Mamba classification subnetwork in sequence; the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the pre-trained visual Mamba classification teacher network is obtained by training a pre-constructed visual Mamba classification teacher network based on sample image data.

[0156] Embodiment 3:

[0157] Based on the same inventive concept as other embodiments, this embodiment provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the low-resolution image classification method described in Embodiment 1 are implemented.

[0158] Embodiment 4:

[0159] Based on the same inventive concept as other embodiments, this embodiment provides a computer device, including:

[0160] Memory, for storing computer programs / instructions;

[0161] A processor is used to execute the computer program / instructions to implement the steps of the low-resolution image classification method described in Example 1.

[0162] Embodiment 5:

[0163] Based on the same inventive concept as other embodiments, this embodiment provides a computer program product, including a computer program / instruction, which implements the steps of the low-resolution image classification method described in Embodiment 1 when executed by a processor.

[0164] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0165] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0166] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0167] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0168] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.

Claims

1. A low-resolution image classification method, characterized in that: include: Obtain low-resolution image data to be classified; Inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting a classification result of the low-resolution image to be classified; Among them, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network includes a trained super-resolution subnetwork and a pre-trained visual Mamba classification subnetwork in sequence; the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the pre-trained visual Mamba classification teacher network is obtained by training a pre-constructed visual Mamba classification teacher network based on sample image data.

2. The low-resolution image classification method according to claim 1, characterized in that: The step of inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting the classification result of the low-resolution image to be classified comprises: Inputting the low-resolution image data to be classified into the trained super-resolution subnetwork, and outputting the super-resolution image to be classified; The super-resolution image to be classified is input into the pre-trained visual Mamba classification subnetwork, and the classification result of the low-resolution image to be classified is output.

3. The low-resolution image classification method according to claim 1, characterized in that: The network structure of the pre-trained visual Mamba classification sub-network is the same as the network structure of the pre-trained visual Mamba classification teacher network, and includes, in sequence: a data dimension reduction module, a visual Mamba encoder, and a multi-layer perceptron head; the visual Mamba encoder has 24 layers; The data dimension reduction module is used to: convert the two-dimensional super-resolution image into a two-dimensional patch by flattening operation, linearly project the two-dimensional patch onto a vector with a dimension size of 192 and add position encoding, embed a class tag in the middle of the two-dimensional patch sequence to represent the entire sequence of the super-resolution image, and obtain ; The Visual Mamba Encoder is used to: As the input of the first layer of the visual Mamba encoder, the output hidden state ; Repeat the hidden state As the input of the i-th layer of the visual Mamba encoder, the output hidden state , expressed by the following formula: (1) In formula (1), represents the visual Mamba encoder, the value range of i is 1≤i≤24; The multi-layer perceptron head is used to: Output class prediction probability , expressed by the following formula: (2) In formula (2), represents the normalization layer, Represents a multilayer perceptron head.

4. The low-resolution image classification method according to claim 1, characterized in that: The pre-trained visual Mamba classification teacher network is trained based on sample image data and is trained by the following steps: The high-resolution image data obtained by preprocessing the sample image data is input into the pre-built visual Mamba classification teacher network, and the classification results of the teacher network training are output; Based on the true label of the sample image data, the cross entropy loss of the teacher network training classification result is calculated, which is expressed by the following formula: (3) In formula (3), represents the cross entropy function, represents the class prediction probability in the classification result of teacher network training, Represents the true label of the image; Determine whether the cross entropy loss meets the preset first value; if not, adjust the network parameters of the visual Mamba classification teacher network and output the teacher network training classification result, and calculate the cross entropy loss; if satisfied, output the network parameters of the visual Mamba classification teacher network to obtain the pre-trained visual Mamba classification teacher network.

5. The low-resolution image classification method according to claim 1, characterized in that: The pre-trained visual Mamba classification sub-network is obtained by training the pre-constructed visual Mamba classification sub-network based on sample image data and the pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and is trained by the following steps: Inputting low-resolution image data obtained by preprocessing sample image data into the trained super-resolution sub-network to obtain a first super-resolution image of the sample; Inputting the first super-resolution image of the sample into a pre-constructed visual Mamba classification subnetwork to obtain a first classification result; The high-resolution image data obtained by preprocessing the sample image data is input into the pre-trained visual Mamba classification teacher network to obtain the second classification result; Based on the second classification result, calculate the joint loss function of the first classification result; Determining whether the joint loss function satisfies a preset second value; If not, adjust the network parameters of the visual Mamba classification subnetwork and output the first classification result, and calculate the joint loss function; if satisfied, output the network parameters of the visual Mamba classification subnetwork to obtain the pre-trained visual Mamba classification subnetwork.

6. The low-resolution image classification method according to claim 5, characterized in that: The first classification result includes a first hidden state and the first type prediction probability , the second classification result includes a second hidden state and the second type of predicted probability , the joint loss function is expressed by the following formula: (4) In formula (4), represents the joint loss function, The cross entropy loss of the first classification result output by the visual Mamba classification subnetwork calculated based on the true label of the sample image data is expressed by the following formula: (5) In formula (5), represents the cross entropy function, Represents the true label of the image; In formula (4), express The weight of The knowledge distillation loss representing the predicted probability of the second category to the predicted probability of the first category is expressed by the following formula: (6) In formula (6), represents the KL divergence function, represents the temperature of the KL divergence function, Represents the Softmax function; In formula (4), express The weight of represents the knowledge distillation loss of the second hidden state to the first hidden state, which is expressed by the following formula: (7) In formula (7), represents the mean square error loss function, represents the low-resolution hidden state of the i-th layer output in the first hidden state, represents the high-resolution hidden state of the output of the i-th layer in the second hidden state.

7. A low-resolution image classification device, characterized in that: include: Acquisition module: used to acquire low-resolution image data to be classified; Output module: used for inputting the low-resolution image data to be classified into a pre-trained low-resolution image classification network of joint super-resolution and visual Mamba, and outputting the classification result of the low-resolution image to be classified; Among them, the pre-trained joint super-resolution and visual Mamba low-resolution image classification network includes a trained super-resolution subnetwork and a pre-trained visual Mamba classification subnetwork in sequence; the pre-trained visual Mamba classification subnetwork is obtained by training a pre-constructed visual Mamba classification subnetwork based on sample image data and a pre-trained visual Mamba classification teacher network using a joint loss function method based on knowledge distillation, and the pre-trained visual Mamba classification teacher network is obtained by training a pre-constructed visual Mamba classification teacher network based on sample image data.

8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the low-resolution image classification method described in any one of claims 1 to 6 are implemented.

9. A computer device, characterized in that: include: Memory, for storing computer programs / instructions; A processor, configured to execute the computer program / instructions to implement the steps of the low-resolution image classification method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the low-resolution image classification method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • CNN and Transform-based low-resolution image classification method and system

    CN115512096A

  • Low-resolution image recognition method and device based on image super-resolution and knowledge distillation

    CN115527063A

  • Image classification method based on super-resolution image reconstruction and category consistency constraint

    CN115661510A

  • Method, device and system for identifying low-resolution image target

    CN116452418A