A spatial downscaling method of pollutants based on SRGAN
Through the SRGAN-based pollutant space reduction method, the existing meteorological data assimilation method has been solved, and efficient and low-cost pollutant data assimilation is achieved.
Patent Information
- Application Number
- CN202310202110.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-03-06
AI Technical Summary
The existing meteorological data assimilation methods are complex in computing, requiring a large amount of computing resources and time, resulting in low efficiency and high cost.
Using the SRGAN-based pollutant spatial downscale method, intensive data is generated by interpolation of radial basis function, SRGAN model is constructed to generate high-resolution images, and assimilation result data of pollutants are generated in reverse.
It significantly improves data assimilation efficiency, reduces computing resource requirements, reduces costs, and achieves the convenient and efficient assimilation results of pollutant concentration data.
Smart Images

Figure CN116188270B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of meteorological data analysis, and in particular to a pollutant spatial downscaling method based on SRGAN. Background Art
[0002] There are few existing meteorological observation sites, resulting in sparse pollutant concentration data. To address this problem, data assimilation methods have been proposed. Many representative studies have proven that data assimilation algorithms can bridge the gap between monitoring results and simulation results, such as the Optimal Interpolation (OI), 3D / 4D variational methods, and the Ensemble Kalman filter algorithm. However, although data assimilation has achieved good results in the field of meteorology, due to the complexity of the data assimilation calculation process, even with the help of supercomputers, the data assimilation process takes hours or even days. Although it can achieve good results, it takes a long time, resulting in low efficiency of data assimilation, and also incurs high costs, which greatly increases the cost of meteorological data assimilation. Summary of the invention
[0003] The purpose of the present invention is to provide a pollutant spatial downscaling method based on SRGAN, which can effectively eliminate the inconvenience caused by the use of supercomputers and improve the efficiency of data assimilation.
[0004] To this end, the technical solution of the present invention is as follows:
[0005] A pollutant spatial downscaling method based on SRGAN, the steps are as follows:
[0006] S1. Using the Gaussian function in the radial basis function as the kernel function, the original data of the pollutants are interpolated and fitted to obtain the densified data; based on the densified data, several colored daily distribution images of pollutants are drawn with longitude as the horizontal coordinate and latitude as the vertical coordinate, and the pollutant concentration is represented by different colors;
[0007] S2. Construct an SRGAN model for generating high-resolution images, which consists of a generator network and a discriminator network; wherein the generator network consists of a first convolutional layer, a first activation function PReLU, a first residual block, a second residual block, a third residual block, a fourth residual block, a fifth residual block, a fourth convolutional layer, a second BN layer, a fifth convolutional layer, a first sub-pixel convolutional layer, a second sub-pixel convolutional layer, a third activation function PReLU and a sixth convolutional layer connected in sequence; each residual block has the same structure, and is composed of a second convolutional layer, a first BN layer, a second activation function PReLU and a third convolutional layer connected in sequence; the convolution kernel sizes of the first convolutional layer and the sixth convolutional layer are both 9×9, and the convolution kernel sizes of the second convolutional layer, the third convolutional layer and the fourth convolutional layer are all 3×3; the discriminator network consists of a first convolutional layer connected in sequence The first convolution layer, the first activation function PReLU, the second convolution layer, the first BN layer, the first activation function LeakyReLU, the third convolution layer, the second BN layer, the second activation function LeakyReLU, the fourth convolution layer, the third BN layer, the third activation function LeakyReLU, the fifth convolution layer, the fourth BN layer, the fourth activation function LeakyReLU, the sixth convolution layer, the fifth BN layer, the fifth activation function LeakyReLU, the seventh convolution layer, the sixth BN layer, the sixth activation function LeakyReLU, the eighth convolution layer, the seventh BN layer, the seventh activation function LeakyReLU, the adaptive average pooling layer, the ninth convolution layer, the second activation function PReLU and the tenth convolution layer; the convolution kernel size of each convolution layer in the discriminant network is 3×3;
[0008] S3. Train the SRGAN model for generating high-resolution images:
[0009] S301, constructing an image data set for model training, which consists of a low-resolution image set and a high-resolution image set; each image in the low-resolution image set has a one-to-one correspondence with each image in the high-resolution image set, and has the same magnification;
[0010] S302, define the expression of loss function as:
[0011]
[0012] In the formula, and is the content loss function, is the adversarial loss function; where,
[0013] It represents the pixel-by-pixel MSE loss between the generated high-resolution image (SR) and the real image (HR), and its calculation formula is:
[0014]
[0015] Where r, W and H represent the number, width and height of the image respectively. represents a high-resolution image, I LR represents a low-resolution image, G represents the generation network, θ G represents the network parameters, is the generated high-resolution image;
[0016] The MSE loss of the feature map output by the jth convolution kernel in the i-th layer of the VGG-like network of the discriminant network is calculated as:
[0017]
[0018] Where W i,j and H i,j Respectively represent the dimensions of the feature maps in the VGG-like networks of the discriminant network;
[0019] To counter the loss function, the probability of generating a true or false image is calculated as follows:
[0020]
[0021] In the formula, N represents the number of pixels, D represents the discriminant network, and θ D Represents network parameters;
[0022] S303, substituting the image data set and the loss function into the SRGAN model, using the low-resolution image as the input image of the generation network, using the quasi-high-resolution image and the high-resolution image output by the generation network as the input image of the determination network, and using the Adam optimizer to accelerate the training of the model until the set training termination condition is reached;
[0023] S4. Input the low-resolution image into the trained SRGAN model to obtain a high-resolution image, and reversely generate the assimilation result data of the pollutants based on the high-resolution image.
[0024] Furthermore, in step S3, the method for constructing the image data set is as follows: 1) using the image set obtained by the method of step S1 as a high-resolution image set; 2) performing image processing by downsampling each image in the high-resolution image set at the same zoom factor to obtain a low-resolution image set.
[0025] Further, in step S303, the scaling factor between the low-resolution image set and the high-resolution image set is 8.
[0026] Further, in step S302, λ1=1, λ2=0.006, λ3=0.001.
[0027] Furthermore, in step S303, the training termination condition is set as: SR ≤0.0001.
[0028] Furthermore, the specific implementation steps of step S4 are as follows:
[0029] S301, using the method of step S1 to obtain several new images of the same pollutant;
[0030] S302, taking the new image as a low-resolution image and inputting it into the trained SRGAN model, and the SRGAN model outputs a high-resolution image;
[0031] S302 , based on the high-resolution image outputted by step S302 , according to the mapping relationship between the image color values set when drawing in step S1 and the pollutant observation data, reversely generate assimilation result data of pollutant concentration.
[0032] Compared with the existing technology, the pollutant spatial downscaling method based on SRGAN is implemented by the steps of intensively transforming the original data based on the kernel function, generating high-resolution images based on the SRGAN model, and reversely generating assimilated data based on the high-resolution images. This method overcomes the complexity of the traditional data assimilation calculation process, which requires a lot of computing resources and computing time, and for the first time introduces the super-resolution generative adversarial network model into the pollutant data assimilation process. It replaces the original assimilation method by generating high-resolution pollutant concentration distribution images. After one training, it can be used multiple times, which greatly saves computing resources and computing time, and greatly improves the assimilation efficiency. At the same time, compared with the supercomputing resources required for the assimilation process, this method can completely complete the calculation process on ordinary computers, reduce the cost and threshold of use, and has stronger practicality and applicability, achieving the purpose of obtaining the assimilation results of pollutant concentration data conveniently and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of the pollutant spatial downscaling method based on SRGAN of the present invention;
[0034] FIG. 2( a ) is a contour map of the distribution of fine particulate matter (PM2.5) in Beijing on a certain day in an embodiment of the present invention;
[0035] FIG2( b ) is a contour map of the distribution of fine particulate matter (PM2.5) in Tianjin on a certain day in an embodiment of the present invention;
[0036] FIG3( a ) is a scatter plot of PM2.5 concentration data of all observation stations in the study area (Beijing and Tianjin) on a certain day in an embodiment of the present invention;
[0037] FIG3( b ) is a densified data image drawn from the PM2.5 concentration data of all observation stations in the study area (Beijing and Tianjin) on a certain day after being processed by step S1 in an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of the network structure of the SRGAN model for generating high-resolution images according to the present invention;
[0039] FIG5( a) is an original low-resolution image of a local PM2.5 concentration distribution on January 1, 2018 in an embodiment of the present invention;
[0040] FIG5( b ) is a high-resolution image output after the SRGAN model is trained based on the case where the scaling factor between the high-resolution data set and the low-resolution data set is 2 in an embodiment of the present invention;
[0041] FIG5( c ) is a high-resolution image output after the SRGAN model is trained based on the case where the scaling factor between the high-resolution data set and the low-resolution data set is 4 in an embodiment of the present invention;
[0042] FIG5( d ) is a high-resolution image output after the SRGAN model is trained based on the case where the scaling factor between the high-resolution data set and the low-resolution data set is 8 in an embodiment of the present invention;
[0043] Figure 6 The actual high-resolution image obtained after processing FIG. 5( a ) by using step S1 in the embodiment of the present invention;
[0044] Figure 7 It is a schematic diagram of the change of the Loss value of the generation network and the discrimination network in the training process of the SRGAN model in step S3 in an embodiment of the present invention;
[0045] Figure 8 It is a schematic diagram of changes in the two evaluation indicators PSNR and SIMM during the training process in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention in any way.
[0047] Common air pollutants include PM2.5, PM10, SO2, NO2, CO and O3. Among these six types of pollutants, fine particulate matter (PM2.5) has the greatest impact on human health. According to the existing data set, the PM2.5 pollution in Beijing and Tianjin is the most serious. However, due to the small number of meteorological observation stations, the daily observation values in Tianjin and Beijing in the data set only contain 345 data points each. From the perspective of the number of data analysis samples, the data is extremely sparse. If supercomputers are used for assimilation calculations, it will inevitably require high time and economic costs.
[0048] Based on this, the SRGAN-based pollutant spatial downscaling method of this embodiment specifically takes Beijing and Tianjin as the research areas, and the fine particulate matter (PM2.5) concentration data of the two regions as the research object. By significantly improving the resolution of the PM2.5 concentration distribution image in this region, it promotes the study of the PM2.5 distribution in this region, helps relevant experts trace the source of pollutants and specify scientific governance policies.
[0049] See also Figure 1 The specific implementation of the SRGAN-based pollutant spatial downscaling method is as follows:
[0050] S1. Using kernel function, convert the original pollutant numerical data into image data;
[0051] Specifically, the specific implementation steps of step S1 are as follows:
[0052] S101. Obtain the original data of pollutants in the study area for a single day, including the concentration of pollutants and the longitude and latitude of the location where the pollutant concentration was collected;
[0053] In this embodiment, the study areas are Beijing and Tianjin, the specific pollutant is PM2.5, and the original data is all PM2.5 original data of a day selected at random from the existing data set, each of which consists of PM2.5 concentration, and the longitude and latitude of the location; as shown in FIG2(a), it is a contour map of the distribution of fine particulate matter (PM2.5) in Beijing on a selected day; as shown in FIG2(b), it is a contour map of the distribution of fine particulate matter (PM2.5) in Tianjin on a selected day; it can be seen from the above two figures that the corresponding pollutant concentration in the study area is relatively high, that is, the pollution is relatively serious;
[0054] S102, determining to use the Gaussian function in the radial basis function as the kernel function, and performing interpolation processing on the original data of the pollutants in step S101 to fit and obtain dense data;
[0055] In this embodiment, this step can specifically apply Python software to perform interpolation visualization of the kernel function; specifically, run Python software, use the Rbf function in the scipy.interpolate.rbf library, set function = 'gaussian' (i.e., Gaussian function), and complete the selection of the kernel function; import the PM2.5 data obtained in step S101, including PM2.5 concentration, longitude and latitude, as known data, and output densified data; compared with the original data, the densified data has a larger distribution density and a higher resolution, which is conducive to subsequent downsampling operations and generation of high-resolution image quality control operations;
[0056] S103, converting the data obtained in step S102 into a characteristic image for pollutant analysis;
[0057] In this embodiment, this step can be implemented by using matplotlib.pyplot in Python software; the pollutant data consists of PM2.5 concentration, longitude and latitude. In order to facilitate subsequent pollutant analysis, the characteristic image is drawn as a PM2.5 concentration distribution image with longitude as the horizontal coordinate and latitude as the vertical coordinate. In the image, based on the general color assignment method in the meteorological field, the existing concentration data range of 50 to 400 μg / m 3 The corresponding values are assigned to the RGB value range, that is, the PM2.5 concentration at each position in the image is represented by different colors, and the PM2.5 concentration characteristic image of the study area for a single day is drawn;
[0058] As shown in Figure 3(a), a scatter plot image (unit: micrograms per cubic meter) is drawn based on the PM2.5 concentration data of all observation stations in the study area (Beijing and Tianjin) on a certain day. The horizontal axis in the image represents longitude, the vertical axis represents latitude, and different color depths are used to distinguish the PM2.5 concentrations in different locations. It can be clearly seen from Figure 3(a) that due to the sparseness of the original data, the drawn image will inevitably have obvious graininess. Therefore, when the image is super-resolution processed, this phenomenon presented in the high-resolution image will be more serious, which is not an ideal effect.
[0059] As shown in Figure 3(b), the PM2.5 concentration data of all observation stations in the study area (Beijing and Tianjin) on a certain day are processed by the kernel function of step S1 to draw a dense data image; similarly, the horizontal axis in the image represents longitude, the vertical axis represents latitude, and different color depths are used to distinguish the PM2.5 concentrations in different locations; it can be clearly seen from Figure 3(b) that the smoothed image obtained by the kernel function effectively eliminates the influence of the above-mentioned image granularity and generates a high-resolution PM2.5 concentration distribution image that meets expectations.
[0060] S2. Build the SRGAN model for generating high-resolution images:
[0061] The SRGAN model consists of a generative network and a discriminative network; the generative network is used to reconstruct high-resolution images (SR) by super-resolution, which consists of several convolutional layers (Conv2d), multiple activation functions PReLU (PReLU), several BN layers (Batch Normalization) and two sub-pixel convolutional layers (Pixel Shuffler).
[0062] See also Figure 4 , the generation network consists of the first convolution layer, the first activation function PReLU, the first residual block, the second residual block, the third residual block, the fourth residual block, the fifth residual block, the fourth convolution layer, the second BN layer, the fifth convolution layer, the first sub-pixel convolution layer, the second sub-pixel convolution layer, the third activation function PReLU and the sixth convolution layer connected in sequence; wherein each residual block has the same structure, and is composed of the second convolution layer, the first BN layer, the second activation function PReLU and the third convolution layer connected in sequence; the convolution kernel sizes of the first convolution layer and the sixth convolution layer are both 9×9, and the convolution kernel sizes of the second convolution layer, the third convolution layer and the fourth convolution layer are all 3×3;
[0063] In the above-mentioned generative network, the convolution layer before the first residual block uses a 9*9 convolution kernel combined with a PRELU activation function to extract low-level features of the image; the convolution layer inside each residual block is a convolution layer with a 3*3 convolution kernel, combined with a convolution layer with a 3*3 convolution kernel after the residual block and a BN layer, to achieve high-level feature extraction of the image; then, in the generative network, a convolution layer with a convolution kernel size of 3*3, two sub-pixel convolution layers and a PReLU activation function are connected to form a deconvolution layer, which can effectively amplify the reduced feature map, and finally a convolution layer with a convolution kernel of 9*9 is used to complete the reconstruction of the image to obtain a high-resolution image generated by the generative network.
[0064] The discriminant network is used to identify the difference between the real high-resolution image (HR) and the quasi-high-resolution image (SR) obtained by the generative network. The generative network is assisted in training through the probability value output by the discriminant network until the generative network can directly output a quasi-high-resolution image (SR) that is almost the same as the real high-resolution image (HR), that is, the generative network can be used independently; the discriminant network consists of several convolutional layers (Conv2d), multiple activation functions PReLU, multiple activation functions LeakyReLU, several BN layers and an adaptive average pooling layer (AdaptiveAvgPool2d);
[0065] See also Figure 4The discriminant network consists of the first convolutional layer, the first activation function PReLU, the VGG-like network, the adaptive average pooling layer, the third convolutional layer, the third activation function PReLU, the third convolutional layer and the activation function Sigmoid, which are connected in sequence; the VGG-like network consists of seven identical modules connected in sequence, each of which consists of the second convolutional layer, the first BN layer and the first activation function LeakyReLU; each convolutional layer in the discriminant network is a convolutional layer with a convolution kernel size of 3×3.
[0066] Since the discriminant network contains multiple convolutional layers, the number of features increases and the feature size decreases as the number of network layers increases. The problem of gradient disappearance can be solved to a certain extent by using the LeakyReLU activation function. The adaptive average pooling layer can automatically determine the internal parameters according to the width and height of the image to be output. The improved SRGAN model uses the adaptive average pooling layer to replace the dense blocks in the original network, which can reduce the number of network parameters to a certain extent. Finally, the Sigmoid activation function is used to make a binary classification, that is, the generated high-resolution image and the input high-resolution image are scored, and then the result is repeatedly optimized to adjust the generated network until the training process is completed. At the same time, this application uses the average pooling method for downsampling, and by comparing the downsampling results of minimum pooling, maximum pooling, etc., it is found that the downsampling effect of average pooling is better, and more image information can be retained while downsampling.
[0067] S3. Train the SRGAN model for generating high-resolution images:
[0068] The specific operation steps of step S3 are as follows:
[0069] S301, constructing an image data set for model training, which consists of a low-resolution image set and a high-resolution image set; wherein each image in the low-resolution image set has a one-to-one correspondence with each image in the high-resolution image set and has the same magnification;
[0070] In this embodiment, based on the existing PM2.5 dataset of the study area, first, the method of step S1 is adopted to select the PM2.5 daily average data from 2013 to 2018 to draw 2191 PM2.5 concentration distribution images as a high-resolution image set; then, the above 2191 PM2.5 concentration distribution images are processed by an image processing method of downsampling with the same zoom factor to obtain 2191 low-resolution images as a low-resolution image set; specifically, the downsampling zoom factor is set to 8, that is, the length and width of the low-resolution image are 1 / 8 of the length and width of the high-resolution image, respectively; wherein 1826*2 corresponding high-resolution images and low-resolution images from 2013 to 2017 are used to train the model, and 365*2 images in 2018 are used as a verification set.
[0071] S302, define the expression of loss function as:
[0072]
[0073] In the formula, and is the content loss function, is the adversarial loss function; where,
[0074] It represents the pixel-by-pixel MSE loss between the generated high-resolution image (SR) and the real image (HR), and its calculation formula is:
[0075]
[0076] Among them, r, W and H represent the number, width and height of the image respectively. represents a high-resolution image, I LR represents a low-resolution image, G represents the generation network, θ G represents the network parameters, is the generated high-resolution image;
[0077] The MSE loss of the feature map output by the jth convolution kernel in the i-th layer of the VGG-like network of the discriminant network is calculated as:
[0078]
[0079] Among them, W i,j and H i,j Respectively represent the dimensions of the feature maps in the VGG-like networks of the discriminant network;
[0080] To counter the loss function, the probability of generating a true or false image is calculated as follows:
[0081]
[0082] Among them, N represents the number of pixels, D represents the discriminant network, and θ D Represents network parameters;
[0083] S303, substitute the image dataset constructed in step S301 and the loss function defined in step S302 into the SRGAN model constructed in step S2, and use the Adam optimizer to accelerate the training until the set training termination condition is reached; wherein the low-resolution image (LR) determined in step S2021 is used as the input image of the generation network, and the quasi-high-resolution image (SR) output by the generation network and the high-resolution image (HR) determined in step S2021 are used as the input images of the judgment network; in the loss function, λ1=1, λ2=0.006, λ3=0.001; set the training termination condition as: L SR ≤0.0001. During the training of this model, observe the L of the generated network SR For changes in Figure 7 , when the number of training times exceeds 300, the L of the generated network SR Basically maintained at 0.0001, occasionally there is a generated network L SR =0.0002 (probability less than 5%), considering the training time and training effect of the model, the number of model training times in this embodiment is 400.
[0084] In this embodiment, the model training uses the online GPU platform of the AI Zhisuan Cloud Service of Beijing Super Cloud Computing Center. The GPU used by the server is TalseT4, the operating system is Ubuntu18.04, the running memory is 80G, the Python version used is Python3.7, the Pytorch version is Pytorch1.8.1, and the CUDA version is 11.4; the parameter epoch of this model training is 400, and the upscale factor, that is, the image magnification is set to 8. Among them, in the training process, the use of Adam optimizer is better than AdaGrad and RMSProp optimizers, and good results can be obtained quickly.
[0085] At the same time, in addition to the magnification being set to 8, two cases of magnification being 2 and 4, i.e., upscale_factor=2 and upscale_factor=4, were also verified, among which the effect of setting the magnification to 8 was the best. Specifically, the PM2.5 concentration distribution image of any day in 2018 in the validation set was selected for testing, and the model experimental results are shown in Figures 5(a), 5(b), 5(c) and 5(d). The four images all show the local PM2.5 concentration distribution on January 1, 2018. Figure 5(a) shows the original low-resolution image, Figure 5(b) shows the image detection result when the magnification factor upscale_factor=2 is set, Figure 5(c) shows the image detection result when the magnification factor upscale_factor=4 is set, and Figure 5(d) shows the image detection result when the magnification factor upscale_factor=8 is set. From the comparison of the last three images, it can be seen that the high-resolution image obtained when the magnification factor upscale_factor is 8 is similar to the image obtained when the magnification factor upscale_factor is 8. Figure 6 Comparing the real images shown, there is almost no noticeable difference between the two;
[0086] S4, input the low-resolution image into the trained SRGAN model to obtain a high-resolution image, and reversely generate data based on the high-resolution image;
[0087] Specifically, the specific implementation steps of step S3 are as follows:
[0088] S301, using the method of step S1 to obtain several new images of the same pollutant;
[0089] S302, inputting the image obtained in step S1 into the generative network trained in step S2, and outputting a high-resolution image;
[0090] S302. Based on the high-resolution image generated in step S301, according to the mapping relationship between the image color values set when drawing in step S1 and the pollutant observation data, reversely generate assimilation result data of fine particulate matter (PM2.5) pollutant concentration.
[0091] In summary, this application uses a high-resolution image generation method based on SRGAN to obtain a high-resolution pollutant concentration distribution image of the area, and then reversely generates the assimilation result of the pollutant concentration data based on the mapping relationship between the image color values and the pollutant observation data. That is, this method can obtain the assimilation result of the pollutant concentration data conveniently and efficiently.
[0092] In order to evaluate the performance of different reconstruction algorithms, it is necessary to evaluate the quality of the reconstruction results. In order to conduct a systematic, scientific and comprehensive analysis of image super-resolution reconstruction, Yang et al. proposed a two-way evaluation model in 2014, namely a subjective evaluation model and an objective evaluation model. The subjective evaluation model refers to carefully observing the image through the human visual organs and finally manually commenting on the visual effect of the image. The objective evaluation model tends to be mathematical analysis. Conventional objective evaluation indicators include two categories: one is the Peak Signal to Noise Ratio (PSNR) and the other is Structural Similarity (SSIM). Since the subjective method is time-consuming and labor-intensive, and is easily affected by some unavoidable external factors (such as human subjective consciousness), generally only two objective evaluation indicators are used to quantitatively evaluate the reconstruction effect. The following will focus on the two main objective evaluation indicators.
[0093] (1) Peak signal-to-noise ratio (PSNR):
[0094] The peak signal-to-noise ratio refers to the ratio between the maximum signal value and the noise value received by a single image. It can be used as an evaluation parameter to measure image quality. This parameter is based on the error evaluation parameter of the maximum pixel point between images. It is the most common objective evaluation indicator and can objectively reflect the visual differences of humans.
[0095] In super-resolution, when HR is defined as the original image with high resolution and SR is the reconstructed image, PSNR indicates the noise distortion intensity of the reconstructed image. The smaller the PSNR value, the greater the distortion of the reconstructed image and the worse the image quality. The calculation formula of PSNR is as follows:
[0096]
[0097] Here, MSE is the mean square error between the high-resolution image HR and the reconstructed image SR.
[0098] (2) Structural Similarity (SSIM):
[0099] Structural similarity can measure the structural differences between the original image and the reconstructed image. The structural differences can be reflected in three aspects: height (L), contrast (C) and structure (S). The mathematical expressions of the three functions are as follows:
[0100]
[0101] In the formula, X represents the real high-resolution image HR, Y represents the reconstructed image SR;, μ x , μ y represents the mean; σ x , σy represents variance; σ xy represents the covariance, c1, c2, c3 are given constants. Therefore, the mathematical expression of SSIM is as follows:
[0102] SSIM(X,Y)=L(X,Y)×C(X,Y)×S(X,Y),
[0103] Where L(X, Y) is the brightness comparison function; C(X, Y) is the contrast comparison function; S(X, Y) is the structure comparison function. The value of SSIM is between [0, 1]. The larger the SSIM value, the closer the similarity of the reconstructed image Y is to the original image. At the same time, the higher the clarity of the reconstructed image, the better the quality.
[0104] There is a problem with the traditional GAN model, that is, the model cannot know when to stop training the generator and when to stop training the discriminator. If the discriminator is overtrained, the generator will not be able to learn, and vice versa, the model effect will be poor. The training effect of the model can be determined by monitoring the change of loss during the training process. In this embodiment, the L of the generator network and the discriminator network of the model is SR Transformation situation Figure 7 The monitoring results show that when the epoch is set to 400, the L SR It stabilizes at 0.0001, which means the model can reach a stable state.
[0105] The evaluation indicators PSNR and SSIM are used to measure the similarity between the generated image and the real image. Figure 8 The figure shows the changes in the two evaluation indicators PSNR and SIMM during the training process. It can be seen that when the magnification factor is 8, the PSNR value between the generated image and the real image is high and can remain stable.
[0106] In general, the upscale_factor is set to 8 and the training rounds are set to 400, which can achieve the ideal high-resolution image generation effect in a relatively short time. During the model training process, the peak signal-to-noise ratio (PSNR) of the image increases continuously and finally stabilizes at around 37dB, and the structural similarity (SSIM) is close to 1; this indicates that the generated high-resolution image is highly similar to the real image, proving the effectiveness of the method of the present invention.
[0107] The high resolution generated by the present invention is close enough to the real image. Therefore, according to the mapping relationship between the image color value and the pollutant observation data, the assimilation result of the pollutant concentration data is reversely generated, and the assimilated data result obtained is credible.
Claims
1. A pollutant spatial downscaling method based on SRGAN, characterized in that: Here are the steps: S1. Using the Gaussian function in the radial basis function as the kernel function, the original data of the pollutants are interpolated and fitted to obtain the densified data; based on the densified data, several colored daily distribution images of pollutants are drawn with longitude as the horizontal coordinate and latitude as the vertical coordinate, and the pollutant concentration is represented by different colors; S2. Construct an SRGAN model for generating high-resolution images, which consists of a generator network and a discriminator network; wherein the generator network consists of a first convolutional layer, a first activation function PReLU, a first residual block, a second residual block, a third residual block, a fourth residual block, a fifth residual block, a fourth convolutional layer, a second BN layer, a fifth convolutional layer, a first sub-pixel convolutional layer, a second sub-pixel convolutional layer, a third activation function PReLU and a sixth convolutional layer connected in sequence; each residual block has the same structure, which consists of a second convolutional layer, a first BN layer, a second activation function PReLU and a third convolutional layer connected in sequence; the first convolutional layer The convolution kernel size of the convolution layer and the sixth convolution layer is 9×9, and the convolution kernel size of the second convolution layer, the third convolution layer and the fourth convolution layer is 3×3; the discriminant network is composed of the first convolution layer, the first activation function PReLU, the VGG-like network, the adaptive average pooling layer, the third convolution layer, the third activation function PReLU, the third convolution layer and the activation function Sigmoid connected in sequence; the VGG-like network is composed of seven identical modules connected in sequence, each module is composed of the second convolution layer, the first BN layer and the first activation function LeakyReLU; each convolution layer in the discriminant network is a convolution layer with a convolution kernel size of 3×3; S3. Train the SRGAN model for generating high-resolution images: S301, constructing an image data set for model training, which consists of a low-resolution image set and a high-resolution image set; each image in the low-resolution image set has a one-to-one correspondence with each image in the high-resolution image set, and has the same magnification; S302, define the expression of loss function as: In the formula, and is the content loss function, is the adversarial loss function; where, It represents the pixel-by-pixel MSE loss between the generated high-resolution image (SR) and the real image (HR), and its calculation formula is: Where r, W and H represent the number, width and height of the image respectively. represents a high-resolution image, I LR represents a low-resolution image, G represents the generation network, θ G represents the network parameters, is the generated high-resolution image; The MSE loss of the feature map output by the jth convolution kernel in the i-th layer of the VGG-like network of the discriminant network is calculated as: Where W i,j and H i,j Respectively represent the dimensions of the feature maps in the VGG-like networks of the discriminant network; To counter the loss function, the probability of generating a true or false image is calculated as follows: In the formula, N represents the number of pixels, D represents the discriminant network, and θ D Represents the network parameters of the discriminant network; S303, substituting the image data set and the loss function into the SRGAN model, using the low-resolution image as the input image of the generation network, using the quasi-high-resolution image and the high-resolution image output by the generation network as the input image of the determination network, and using the Adam optimizer to accelerate the training of the model until the set training termination condition is reached; S4. Input the low-resolution image into the trained SRGAN model to obtain a high-resolution image, and reversely generate assimilation result data of pollutant concentration based on the high-resolution image.
2. The pollutant spatial downscaling method based on SRGAN according to claim 1 is characterized in that: In step S3, the image data set is constructed by: 1) using the image set obtained by the method of step S1 as a high-resolution image set; 2) performing image processing by downsampling each image in the high-resolution image set at the same zoom factor to obtain a low-resolution image set.
3. The pollutant spatial downscaling method based on SRGAN according to claim 1 or 2, characterized in that: In step S303, the scaling factor between the low-resolution image set and the high-resolution image set is 8.
4. The pollutant spatial downscaling method based on SRGAN according to claim 1 is characterized in that: In step S302, λ1=1, λ2=0.006, λ3=0.
001.
5. The pollutant spatial downscaling method based on SRGAN according to claim 1 is characterized in that: In step S303, the training termination condition is set as: SR ≤0.0001.
6. The pollutant spatial downscaling method based on SRGAN according to claim 1 is characterized in that: The specific implementation steps of step S4 are as follows: S301, using the method of step S1 to obtain several new images of the same pollutant; S302, taking the new image as a low-resolution image and inputting it into the trained SRGAN model, and the SRGAN model outputs a high-resolution image; S302 , based on the high-resolution image outputted by step S302 , according to the mapping relationship between the image color values set when drawing in step S1 and the pollutant observation data, reversely generate assimilation result data of pollutant concentration.
Citation Information
Patent Citations
Single-frame image super-resolution reconstruction method based on Euclidean subspace group double mapping
CN110020986A
Improved medical image super-resolution method based on generative adversarial network
CN111178499A