Lightweight super-resolution reconstruction method for optical microscope images based on SRGAN
By improving the SRGAN network, reducing the number of residual blocks and using depth-separable convolution, the problems of limited performance and high hardware requirements in super-resolution reconstruction of optical microscope images are solved, reducing the number of parameters and maintaining performance, which is suitable for Lightweight super-resolution reconstruction of optical microscopy images.
Patent Information
- Application Number
- CN202210527840.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-05-16
AI Technical Summary
Existing super-resolution reconstruction methods for optical microscope images have problems with limited performance and high hardware requirements. In particular, the SRGAN-based method has a large number of network parameters and complex calculations, making it difficult to meet the actual needs of optical microscope images.
By improving the SRGAN network, we reduce the number of residual blocks of the generator, replace the convolution method in the residual block with depth-separable convolution, reduce the amount of network parameters, and use a depth-separable convolution structure to reduce the parameters of the neural network. amount while maintaining the reconstruction effect.
It achieves a significant reduction in the amount of network parameters and calculations, and reduces the requirements for hardware while ensuring image reconstruction performance. It is suitable for lightweight super-resolution reconstruction of optical microscope images and improves the breadth of applications.
Smart Images

Figure CN114943645B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image super-resolution reconstruction method, and in particular to a light super-resolution reconstruction method for optical microscope images based on SRGAN. Background Art
[0002] Optical microscope is one of the commonly used tools for observing the microscopic world. It is inexpensive and can directly observe the target in real time, dynamically and without contact. It is widely used. However, due to the influence of the quality of the optical microscope and various factors, the resolution of the optical microscope image obtained is always greatly limited. There are two types of methods to use computers to improve the resolution of these images and enhance the visual effects. One is based on interpolation method and the other is based on deep learning method.
[0003] The interpolation-based method is to directly enlarge the image size and use the adjacent pixel information to assign values to the newly added pixels. Although this method can improve the resolution of the image, it only increases the image size and does not improve the image details. Therefore, the performance of the interpolation method is very limited.
[0004] The method based on deep learning uses computers to find the relationship between high-definition images and low-definition images, thereby achieving super-resolution reconstruction of images and improving image quality. The existing technology uses a convolutional neural network with three convolutional layers to improve image resolution, but this method has a simple structure, limited performance, and is unsatisfactory in terms of detail performance. There is also an image super-resolution reconstruction method based on a generative adversarial network, namely SRGAN. Although this method has strong performance, the network parameters are large, the calculation is complex, and the hardware equipment requirements are high. Therefore, how to improve the super-resolution reconstruction method, reduce the network parameters and reduce the storage space occupied by the weight model while ensuring high performance, reduce the requirements for equipment and the amount of algorithm calculation, and meet the actual needs of super-resolution of optical microscope images, has become a key problem to be solved in the lightweight super-resolution reconstruction of optical microscope images. Summary of the invention
[0005] In view of the defects of the above-mentioned prior art, the present invention provides a lightweight super-resolution reconstruction method for optical microscope images based on SRGAN, which aims to reduce the weight model and generator parameters of the network, thereby ensuring the image reconstruction effect while reducing the amount of calculation.
[0006] The technical solution of the present invention is as follows: A light super-resolution reconstruction method for optical microscope images based on SRGAN, comprising the following steps:
[0007] S1. Collect high-resolution optical microscope images, and generate pairs of high-definition images and low-definition images from the high-resolution optical microscope images to prepare a data set, wherein the high-definition images and the low-definition images in the data set correspond to each other and constitute training set data;
[0008] S2. Inputting the training set data into the improved SRGAN network for training, wherein the improved SRGAN network includes setting the number of residual blocks of the generator of the SRGAN network to no more than 10 and replacing the convolution mode in the residual block with a depth-separable convolution mode;
[0009] S3. Super-resolution reconstruction of low-definition optical microscope images using the trained improved SRGAN network.
[0010] Furthermore, the residual block includes point-by-point convolution expansion, batch normalization, ReLU6, depth-by-depth convolution, batch normalization, ReLU6, point-by-point convolution compression, batch normalization, Linear and addition operations in sequence, and the addition is to add the output of the Linear to the input of the residual block.
[0011] Furthermore, the convolution kernel size during the point-by-point convolution expansion and the point-by-point convolution compression is 1*1, the expansion multiple of the point-by-point convolution expansion is 6, the reduction multiple of the point-by-point convolution compression is 6, and the convolution kernel size of the depth-by-depth convolution is 3*3.
[0012] Further, in step S2, the training set data is input into the improved SRGAN network for training, specifically: S201, the low-definition image is input into the generator to obtain a reconstructed image with the same resolution as the high-definition image, the high-definition image is corresponding to the low-definition image, the reconstructed image and the high-definition image are input into the discriminator for discrimination, and the similarity between the reconstructed image and the high-definition image is obtained as adversarial loss, feature maps of the reconstructed image and the high-definition image are extracted, and the similarity between the feature maps is calculated as content loss;
[0013] S202, modifying the weights of the improved SRGAN network according to the adversarial loss and the content loss;
[0014] S203, replace and use different low-definition images and high-definition images, and repeat steps S201 and S202.
[0015] Furthermore, when calculating the similarity of the feature graphs in step S201, the VGG19 network is used to extract the feature graphs and the MSE method is used to calculate the content loss.
[0016] Furthermore, in the step S1, generating a data set by pairing high-definition images and low-definition images from the high-resolution optical microscope image is specifically as follows: S101, cropping the high-resolution optical microscope image at random positions into high-definition images of uniform size; S102, down-sampling the high-definition image by bicubic interpolation method to obtain a corresponding low-definition image.
[0017] Furthermore, the downsampling factor is 4.
[0018] The advantages of the technical solution provided by the present invention are:
[0019] The image reconstruction performance of the method of the present invention is almost the same as that of the original SRGAN network, but the number of network parameters of the method of the present invention is greatly reduced, and the weight model file of the generator occupies less space; as the generator parameters are reduced, the algorithm has a smaller amount of calculation, which reduces the requirements for hardware and has a wider application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flowchart of the lightweight super-resolution reconstruction method of optical microscope images based on SRGAN.
[0021] Figure 2 It is a schematic diagram of the generator structure of the improved SRGAN network.
[0022] Figure 3 It is a schematic diagram of the discriminator structure of the improved SRGAN network.
[0023] Figure 4 It is a schematic diagram of the residual block structure.
[0024] Figure 5 This is an example of a high-definition image during the experiment.
[0025] Figure 6 It is a super-resolution reconstructed image using different methods.
[0026] Figure 7 This is a detailed enlarged image of the super-resolution reconstruction of cervical epithelial neoplasia cell images using different methods. DETAILED DESCRIPTION
[0027] The present invention is further described below in conjunction with examples. It should be understood that these examples are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading this description, various equivalent modifications to this description by those skilled in the art fall within the scope defined by the claims attached to this application.
[0028] Please combine Figure 1As shown, the light super-resolution reconstruction method of optical microscope images based on SRGAN in an embodiment of the present invention comprises the following steps: S1, collecting high-resolution optical microscope images, generating pairs of high-definition images and low-definition images from the high-resolution optical microscope images to produce a data set, wherein the high-definition images and the low-definition images in the data set correspond to each other and constitute training set data; S2, inputting the training set data into the improved SRGAN network for training; S3, after training the improved SRGAN, putting the low-definition images of the optical microscope into the trained network to obtain super-resolution reconstructed images.
[0029] The improved SRGAN network is based on the SRGAN network. The SRGAN network is modified based on the existing SRGAN network. SRGAN is a classic super-resolution network based on the generative adversarial network. SRGAN is mainly divided into two parts, the generator and the discriminator. The generator improves the resolution of the input low-definition image and generates a high-resolution reconstructed image. The goal of the generator is to make it impossible for the discriminator to distinguish whether the input image is a reconstructed image or a high-definition image. The discriminator distinguishes between the input reconstructed image and the high-definition image. The goal of the discriminator is to identify the reconstructed image and the high-definition image as much as possible. In multiple trainings, the capabilities of the generator and the discriminator have been improved. The ultimate ideal goal is that the discriminator cannot determine whether the input image is a reconstructed image or a high-definition image. Please combine Figure 2 and Figure 3 As shown in FIG. 1 , the present invention makes a series of improvements to the generator, including setting the number of residual blocks of the generator of the SRGAN network to no more than 10 (8 residual blocks in this embodiment) and replacing the convolution method in the residual block with a depthwise separable convolution method. The discriminator structure remains the same as the discriminator of the original SRGAN network. In the generator and discriminator structures, module k x n y s z k represents the convolution kernel size, n represents the feature map size, and s represents the step size.
[0030] The schematic diagram of the residual block structure is as follows Figure 4As shown. It can be seen that the composition of the depth-separable residual block is PW (point-by-point convolution expansion)-ReLU6-DW (depth-by-depth convolution)-ReLU6-PW (point-by-point convolution compression)-Linear-ElementwiseSum in order. The first PW (point-by-point convolution) operation expands the number of channels of the input feature map by 6 times, and the second PW (point-by-point convolution) operation reduces the number of channels of the feature map to the size of the initial input, that is, 6 times. The purpose of this operation is to increase the dimension of the feature map before performing the ReLU6 activation operation, and after the number of channels is reduced, use the Linear function instead of the ReLU6 function for activation operation to minimize the information loss caused by the activation operation. When the DW (depth-by-depth convolution) operation is performed, the convolution kernel size is 3*3. Since the point-by-point convolution kernel size is 1*1, and the number of channels of each convolution kernel of the depth-by-depth convolution is 1, the depth-separable convolution structure can greatly reduce the number of parameters of the neural network. The three convolutions inside the residual block have a step number of 1. Since the size of the point-by-point convolution kernel is 1*1 and each convolution kernel of the depth-by-depth convolution is two-dimensional, the depth-separable structure is a convolution method that effectively reduces the number of neural network parameters. ElementwiseSum refers to the sum operation of the initial input feature map and the output result of the previous step of the component.
[0031] The input feature image size is h*w, the number of channels is 64, and the configuration list of the depth-separable residual block is shown in the following table:
[0032] Depthwise Separable Residual Block Configuration
[0033]
[0034] Super-resolution reconstruction experiments were performed on the above improved SRGAN network.
[0035] The experimental system environment is Linux version 3.10.0-1160.11.1.el7.x86_64, TITAN RTX-24GGPU, Python 3.6, Tensorflow-GPU 2.4.0, Keras 2.4.3, Cuda 11.0.2. The experimental training data set is the public data set "Cervical Cancer largest dataset (SipakMed)". After simple processing, 3864 training images are obtained, all of which are obtained under an optical microscope. During training, the image is first reduced to 256*256 size, and then randomly flipped horizontally as a high-definition image. The high-definition image is downsampled by bicubic interpolation method with a downsampling factor of 4 to obtain the corresponding 64*64 size low-definition image. The training parameters are as follows: the number of samples per batch training is 5, the iterative learning is 50,000 times, the learning rate calls the Adam function in Keras, the learning rate is 0.0002, and the first-order moment estimate is set to 0.5.
[0036] In order to control the experiment, four methods were used in the experiment, and SRCNN, SRGAN-16, light SRGAN-16 and the improved SRGAN network (light SRGAN-8) of the present invention were used for super-resolution reconstruction. Among them, SRGAN-16 is the most commonly used network structure of SRGAN, and the generator contains 16 residual blocks; light SRGAN-16 refers to SRGAN whose generator contains 16 depth-separable residual blocks. SRCNN, SRGAN-16, light SRGAN-16 and the method of the present invention (light SRGAN-8) were trained using the same training environment and training parameters. During the training process, the low-definition image is input into the generator to obtain a reconstructed image with the same resolution as the high-definition image. The reconstructed image and the high-definition image corresponding to the low-definition image are input into the discriminator for discrimination, and the similarity between the reconstructed image and the high-definition image is obtained, which is the adversarial loss. The VGG19 network is used to extract the feature maps of the reconstructed image and the high-definition image, and the similarity between the feature maps of the two is calculated by MSE, which is the content loss; the weights of the improved SRGAN network are modified according to the adversarial loss and content loss; different low-definition images and high-definition images are replaced, and the above steps are repeated until the training is completed.
[0037] Figure 5These are four original high-definition images used in the test. Figure (a) is an image of cervical epithelial tumor cells, (b) a nanoscale grid image, (c) a cross-section image of honeycomb coral, and (d) an image of immune cells stained with fluorescent dyes. The size is 256*256, and these images are also obtained under an optical microscope. These images are downsampled using the bicubic interpolation method to obtain 64*64 low-definition images. Then the low-definition images are super-resolved using the above method to obtain 256*256 reconstructed images. The image quality of the reconstructed image and the high-definition image is compared to calculate the PSNR, SSIM and MOS between them, and then the model size of different methods is compared.
[0038] Figure 6 The super-resolution reconstructed images obtained by the above methods are listed, and the objective evaluation values between the reconstructed images and the high-definition images obtained by different methods are shown in the following table, where the value before “ / ” is the PSNR value, and the value after “ / ” is the SSIM value.
[0039] Objective evaluation value (PSNR / SSIM) between the reconstructed image and the HD image obtained by different super-resolution reconstruction methods
[0040]
[0041] The subjective evaluation between the reconstructed images and high-definition images obtained by different methods is shown in the following table:
[0042] The mean opinion score (MOS) between the reconstructed image and the HD image obtained by different super-resolution reconstruction methods
[0043]
[0044] From the above results, we can see that the PSNR and SSIM generated by the several methods are not much different, but in terms of the mean opinion score, the network based on SRGAN scores much higher than SRCNN. Figure 7 It can also be seen that SRCNN has poor detail performance, far inferior to SRGAN-16, light SRGAN-16 and the method of the present invention (light SRGAN-8). This shows that the subjective perception of the super-resolution image quality obtained by SRCNN is much lower than that of the other three methods.
[0045] As for the three methods, SRGAN-16, light SRGAN-16 and the method of the present invention (light SRGAN-8), SRGAN-16 is slightly better than the other two in objective and subjective evaluation, but not significantly. However, the generator depth separable residual block of the method of the present invention (light SRGAN-8) is only half of that of the light SRGAN-16, which greatly reduces the number of parameters of the generator of the method of the present invention (light SRGAN-8). The specific statistical results are shown in the following table:
[0046] Generator parameter quantity and weight model size of different super-resolution reconstruction methods
[0047]
[0048] It can be seen from the above table that the weight model size of the method of the present invention (light SRGAN-8) is only 0.63 times that of SRGAN-16 and 0.73 times that of light SRGAN-16, and the number of parameters is significantly reduced.
[0049] From the above analysis, the network performance is not significantly reduced compared to SRGAN-16, and is even slightly better than the light SRGAN-16. As for SRCNN, the super-resolution image details produced by its method are too poor, and the subjective evaluation is very low. Therefore, comprehensively speaking, the method of the present invention (light SRGAN-8) achieves the best balance between performance and parameter quantity. The present invention is mainly used for the enhancement of optical microscope images. For some optical microscopes, the images obtained can be directly output to an electronic display screen. The use of the method of the present invention can improve the clarity of the image. While ensuring a certain network performance, the present invention greatly reduces the number of parameters of the generator. The weight model file of the generator occupies less space, has low hardware requirements, and is more widely used.
Claims
1. A lightweight super-resolution reconstruction method for optical microscope images based on SRGAN, characterized in that: The following steps are involved: S1. Collect high-resolution optical microscope images, and generate pairs of high-definition images and low-definition images from the high-resolution optical microscope images to prepare a data set, wherein the high-definition images and the low-definition images in the data set correspond to each other and constitute training set data; S2. Input the training set data into the improved SRGAN network for training, specifically: S201. Input the low-definition image into the generator to obtain a reconstructed image with the same resolution as the high-definition image, the high-definition image corresponds to the low-definition image, input the reconstructed image and the high-definition image into the discriminator for discrimination, and obtain the similarity between the reconstructed image and the high-definition image as adversarial loss, extract the feature graphs of the reconstructed image and the high-definition image, and calculate the similarity between the feature graphs as content loss; S202, modifying the weights of the improved SRGAN network according to the adversarial loss and the content loss; S203, replacing and using different low-definition images and high-definition images, and repeating steps S201 and S202; The improved SRGAN network includes setting the number of residual blocks of the generator of the SRGAN network to no more than 10 and replacing the convolution mode in the residual block with a depth-separable convolution mode; the residual block includes point-by-point convolution expansion, batch normalization, ReLU6, depth-by-depth convolution, batch normalization, ReLU6, point-by-point convolution compression, batch normalization, Linear and addition operations in sequence, and the addition is to add the output of the Linear to the input of the residual block; the convolution kernel size during the point-by-point convolution expansion and the point-by-point convolution compression is 1*1, the expansion multiple of the point-by-point convolution expansion is 6, the reduction multiple of the point-by-point convolution compression is 6, and the convolution kernel size of the depth-by-depth convolution is 3*3; S3. Super-resolution reconstruction of low-definition optical microscope images using the trained improved SRGAN network.
2. The light super-resolution reconstruction method of optical microscope images based on SRGAN according to claim 1, characterized in that: When calculating the similarity of the feature graphs in step S201, the VGG19 network is used to extract the feature graphs and the MSE method is used to calculate the content loss.
3. The light super-resolution reconstruction method of optical microscope images based on SRGAN according to claim 1, characterized in that: In the step S1, generating a data set of paired high-definition images and low-definition images from the high-resolution optical microscope image is specifically as follows: S101, randomly cropping the high-resolution optical microscope image into high-definition images of uniform size; S102, down-sampling the high-definition image using the bicubic interpolation method to obtain a corresponding low-definition image.
4. The light super-resolution reconstruction method of optical microscope images based on SRGAN according to claim 3 is characterized in that: The downsampling factor is 4.
