Method and equipment for translating SAR (Synthetic Aperture Radar) image to optical image based on discrete feature mapping
By constructing a compression-reconstructor and a cross-modal feature mapper based on discrete feature mapping, the cross-modal translation of SAR image to optical image is achieved, and the problem of poor quality of SAR image to optical image translation results in the prior art is solved, and higher image processing accuracy and multi-source fusion capability are achieved.
Patent Information
- Application Number
- CN202510581118.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-05-07
AI Technical Summary
The existing SAR image-to-optical image translation methods have poor quality and inaccurate characteristics, and cannot fully utilize the complementary advantages of SAR and optical images.
Using a discrete feature map based method, the cross-modal translation of SAR images to optical images is realized by constructing a compression-reconstructor and a cross-modal feature mapper. The method includes a spatial encoder, a feature discrete and a spatial decoder, which optimizes feature maps and image reconstruction using a frequency-attention fusion generator and a pixel discriminator.
The processing and conversion accuracy of image data is improved, and is suitable for multi-source fusion and application of remote sensing image data. The generated optical images show significant advantages in structure, color and detail recovery.
Smart Images

Figure CN120088619A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image processing, and particularly to a method and device for translating SAR images into optical images based on discrete feature mapping. Background Art
[0002] Synthetic Aperture Radar (SAR) data and Optical Image data are two of the most commonly used data types in the field of remote sensing. SAR is an active earth observation system whose operation is not restricted by weather and time, and has all-weather and all-time imaging capabilities. However, the complex scattering characteristics of SAR data result in relatively complex processing and analysis, requiring certain professional knowledge and skills. On the other hand, optical images can provide high-resolution and colorful images, and dominate in remote sensing tasks with their intuitive visibility, rich texture features, and advantages of being easy to analyze and interpret. However, it is affected by weather conditions and lighting, and cannot obtain effective data at night or in bad weather, resulting in insufficient continuity and reliability of data acquisition. To give full play to the complementary advantages of SAR and optical images, combine their advantages and overcome their respective limitations, it is very important to conduct research on SAR-to-Optical (S2O) translation technology. However, remote sensing image data has a large amount of information, complex features, and the quality of the results generated by existing translation methods is poor and the features are inaccurate. Summary of the Invention
[0003] Aiming at the above problems existing in the prior art, the present invention expands the traditional image generation model and provides a method and device for translating SAR images into optical images based on discrete feature mapping.
[0004] The above object of the present invention is achieved by the following technical means: A method for translating SAR images into optical images based on discrete feature mapping includes the following steps: Step S1, obtain the SAR image and the corresponding real optical image, and construct a training set and a test set; Step S2, construct and train a compression-reconstructor, the compression-reconstructor includes a spatial encoder, a feature discretizer, and a spatial decoder, and there are three compression-reconstructors, namely an optical image compression-reconstructor, a high compression ratio SAR image compression-reconstructor, and a low compression ratio SAR image compression-reconstructor; Step S3: Construct and train a cross-modal feature mapper. The cross-modal feature mapper includes a frequency-attention fusion generator. The high-compression-ratio SAR discrete feature vector and the low-compression-ratio SAR discrete feature vector output by the feature discretizer of the high-compression-ratio SAR image compression-reconstructor and the low-compression-ratio SAR image compression-reconstructor are input into the frequency-attention fusion generator to obtain corresponding discrete feature vectors. The obtained discrete feature vectors are input into the spatial decoder of the optical image compression-reconstructor to obtain a generated optical image. Step S4: Input the SAR image to be translated into the feature discretizers of the trained high-compression-ratio SAR image compression-reconstructor and the low-compression-ratio SAR image compression-reconstructor. The high-compression-ratio SAR discrete feature vector and the low-compression-ratio SAR discrete feature vector obtained are input into the frequency-attention fusion generator to obtain corresponding discrete feature vectors. The obtained discrete feature vectors are input into the spatial decoder of the optical image compression-reconstructor to obtain a translated generated optical image.
[0005] As described above, the number of convolutional layers in the spatial encoder and the spatial decoder of the high-compression-ratio SAR image compression-reconstructor is more than that in the spatial encoder and the spatial decoder of the low-compression-ratio SAR image compression-reconstructor.
[0006] As described above, the optical image compression-reconstructor takes a real optical image as the input image and a reconstructed optical image as the output image; both the high-compression-ratio SAR image compression-reconstructor and the low-compression-ratio SAR image compression-reconstructor take a SAR image as the input image and a reconstructed SAR image as the output image. The input image obtains a continuous feature vector through the spatial encoder. The continuous feature vector is input into the feature discretizer. The feature discretizer searches for the discrete feature vector closest to the continuous feature vector in the feature dictionary. The discrete feature vector is input into the spatial decoder, and the spatial decoder outputs a reconstructed image with the same size as the input image.
[0007] As described above, training the compression-reconstructor includes using a discriminator to discriminate the optical image compression-reconstructor, the high-compression-ratio SAR image compression-reconstructor, and the low-compression-ratio SAR image compression-reconstructor, and training the optical image compression-reconstructor, the high-compression-ratio SAR image compression-reconstructor, and the low-compression-ratio SAR image compression-reconstructor based on minimizing the reconstruction loss.
[0008] As described above, the frequency-attention fusion generator includes a frequency enhancement-attention fusion module and a discrete feature mapper. In the frequency enhancement-attention fusion module, the high-compression-ratio SAR discrete feature vectors and the low-compression-ratio SAR discrete feature vectors are enhanced by frequency filters respectively to obtain the high-compression-ratio enhancement result and the low-compression-ratio enhancement result; the high-compression-ratio enhancement result and the low-compression-ratio enhancement result are stacked to obtain the stacked result; the stacked result is multiplied by the weight matrix respectively to obtain the query vector , the key vector , and the value vector . The attention weight matrix is calculated through , where T represents the transpose operation; the attention weight matrix is multiplied by to obtain the fusion result . The discrete feature mapper performs multi-layer convolution processing on the fusion result to obtain the mapped discrete feature vectors.
[0009] As described above, the cross-modal feature mapper further includes a pixel discriminator, and the real optical image and the generated optical image are respectively input into the pixel discriminator for determination.
[0010] As described above, the loss function of the frequency-attention fusion generator is: , where is the adversarial loss, is the Smooth L1 loss, is the structural similarity loss, are the weights respectively, , , where is the number of samples, is the generated optical image, is the pixel value at the -th position of the generated optical image, is the target matrix with all values equal to 1 and the same size as , is the target matrix at the -th position of the pixel value, is the Sigmod function, is the spatial decoder of the optical image compression-reconstructor, is the frequency-attention fusion generator, is the feature discretizer of the low-compression-ratio SAR compression-reconstructor, is the spatial encoder of the low-compression-ratio SAR compression-reconstructor, is a SAR image, is the feature discretizer of the high compression ratio SAR compression-reconstructor, is the spatial encoder of the high compression ratio SAR compression-reconstructor, , wherein, is the pixel value at the th position of the real optical image, is the pixel value at the th position of the generated optical image, is to take the absolute value, , , , wherein, is the pixel mean of the real optical image, is the pixel mean of the generated optical image, is the variance of the real optical image, is the variance of the generated optical image, is the covariance between the real optical image and the generated optical image, is the dynamic range of the real optical image. and are both intermediate parameters.
[0011] The loss function of the pixel discriminator as described above is: , wherein, is the number of samples, is the Sigmod function, is the real optical image, is the pixel value at the th position of the real optical image, is the generated optical image, is the pixel value at the th position of the generated optical image, is a target matrix with all values equal to 1 and the same size as , is the pixel value at the th position of the target matrix , is a target matrix with all values equal to 0 and the same size as , is the pixel value at the th position of the target matrix .
[0012] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above translation method are implemented.
[0013] A computer program product includes a computer program. When the computer program is executed by a processor, the steps of the above translation method are implemented.
[0014] The present invention has the following beneficial effects compared with the prior art: Based on the feature mapping method of pixel-feature conversion and frequency-attention fusion, the present invention realizes cross-modal translation from SAR images to optical images. The aim is to improve the processing and conversion accuracy of image data, and it is applicable to multi-source fusion and application of remote sensing image data. Description of the Drawings
[0015] Figure 1 It is a schematic diagram of the implementation process provided by an embodiment of the present invention; Figure 2 It is a training process diagram of the compression-reconstructor used in an embodiment of the present invention; Figure 3 It is a training process diagram of the cross-modal feature mapper used in an embodiment of the present invention; Figure 4 It is a comparison diagram of the results of SAR-optical image translation of the method of an embodiment of the present invention and other methods. Among them, (a1) is the first SAR image, and (b1), (c1), (d1), (e1), and (f1) are the optical images obtained by processing the first SAR image by the Pix2pix method, BicycleGAN method, CycleGAN method, CUT method, and the method of the present invention respectively, and (g1) is the corresponding real optical image; (a2) is the second SAR image, and (b2), (c2), (d2), (e2), and (f2) are the optical images obtained by processing the second SAR image by the Pix2pix method, BicycleGAN method, CycleGAN method, CUT method, and the method of the present invention respectively, and (g2) is the corresponding real optical image; (a3) is the third SAR image, and (b3), (c3), (d3), (e3), and (f3) are the optical images obtained by processing the third SAR image by the Pix2pix method, BicycleGAN method, CycleGAN method, CUT method, and the method of the present invention respectively, and (g3) is the corresponding real optical image; (a4) is the fourth SAR image, and (b4), (c4), (d4), (e4), and (f4) are the optical images obtained by processing the fourth SAR image with the Pix2pix method, BicycleGAN method, CycleGAN method, CUT method, and the method of the present invention respectively, and (g4) is the corresponding real optical image; (a5) is the fifth SAR image, and (b5), (c5), (d5), (e5), and (f5) are the optical images obtained by processing the fifth SAR image with the Pix2pix method, BicycleGAN method, CycleGAN method, CUT method, and the method of the present invention respectively, and (g5) is the corresponding real optical image. Detailed implementation manners
[0016] To facilitate the understanding and implementation of the present invention by those of ordinary skill in the art, the present invention will be further described in detail below in conjunction with implementation examples. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.
[0017] Example 1
[0018] Figure 1 It is a schematic flow chart of the method for translating SAR images to optical images based on discrete feature mapping provided by the present invention, including the following steps: Step S1, obtain high-resolution SAR images and real optical images of the same area, and construct a training set and a test set, specifically including: Step S11, obtain high-resolution SAR images of the same area as samples, and use the corresponding real optical images of the SAR images as the labels corresponding to the SAR images. In this embodiment, the MSAW (Multi-Sensor All Weather Mapping) dataset is obtained. This dataset combines real optical images and corresponding SAR images and is dedicated to promoting high-precision land use classification research. The dataset covers an area of 120 square kilometers and is collected in the Port of Rotterdam, the Netherlands. The real optical images of the dataset are from the Maxar WorldView-2 satellite and include real optical images of the panchromatic band with a resolution of 0.5 meters, multi-spectral band images (RGBN) with a resolution of 2 meters, and sharpened multi-spectral band images (RGBN) with a resolution of 0.5 meters; the SAR images are provided by Capella Space Company, with a resolution of 0.5 meters and four polarization mode bands of VV, VH, HV, and HH.
[0019] Step S12: Process the MSAW dataset. Obtain paired SAR images and true optical images from the above MSAW dataset. For the SAR images, select three bands: VV band, HH band, and VV / HH band. For the true optical images, select the RGB bands of the sharpened multispectral images with a resolution of 0.5 meters. Perform Lee filtering on the SAR images to reduce speckle noise and retain edges and details. Crop the SAR images and the corresponding true optical images to a size of 256×256 pixels, and divide the SAR images into a training set and a validation set at a ratio of 8:2.
[0020] Step S2: Construct a compression-reconstructor (pixel-discrete feature compression-reconstructor) to achieve the conversion of images in different data spaces. In this embodiment, there are 3 compression-reconstructors, namely the optical image compression-reconstructor, the high compression ratio SAR image compression-reconstructor, and the low compression ratio SAR image compression-reconstructor. The compression-reconstructor includes a spatial encoder, a feature discretizer, and a spatial decoder. The present invention needs to train the optical image compression-reconstructor, the high compression ratio SAR image compression-reconstructor, and the low compression ratio SAR image compression-reconstructor. The compression ratios of the high and low compression ratio SAR image compression-reconstructors are controlled by the number of convolutional layers in the spatial encoder and the spatial decoder. The number of convolutional layers in the spatial encoder and the spatial decoder inside the high compression ratio SAR image compression-reconstructor is more than that in the spatial encoder and the spatial decoder of the low compression ratio SAR image compression-reconstructor. The optical image compression-reconstructor has the same structure as the low compression ratio SAR image compression-reconstructor. The optical image compression-reconstructor takes the true optical image as the input image and the reconstructed optical image as the output image. Both the high and low compression ratio SAR image compression-reconstructors take the SAR image as the input image and the reconstructed SAR image as the output image. Specifically: Step S21: The input image gradually reduces the spatial dimension and increases the number of channels through the spatial encoder of the compression-reconstructor, obtaining the continuous feature vector of the input image in the feature space and inputting it into the feature discretizer of the compression-reconstructor.
[0021] The true optical image obtains the continuous feature vector of the optical image in the feature space through the spatial encoder of the optical image compression-reconstructor. The SAR image obtains the high compression ratio continuous feature vector of the SAR image in the feature space through the spatial encoder of the high compression ratio SAR image compression-reconstructor. The SAR image obtains the low compression ratio continuous feature vector of the SAR image in the feature space through the spatial encoder of the low compression ratio SAR image compression-reconstructor.
[0022] Step S22: Use the feature discretizer to make each continuous feature vector output by the spatial encoder find the closest discrete feature vector in the feature dictionary, and input the discrete feature vector into the spatial decoder.
[0023] The optical image continuous feature vector is replaced by an optical discrete feature vector through the feature discretizer of the optical image compression-reconstructor. The high compression ratio SAR continuous feature vector is replaced by a high compression ratio SAR discrete feature vector through the feature discretizer of the high compression ratio SAR image compression-reconstructor. The low compression ratio SAR continuous feature vector is replaced by a low compression ratio SAR discrete feature vector through the feature discretizer of the low compression ratio SAR image compression-reconstructor.
[0024] Step S23: The spatial decoder takes the discrete feature vector as input and gradually increases the spatial dimension and reduces the number of channels through a series of transposed convolutional layers or upsampling layers, and finally outputs a reconstructed image with the same size as the input image. The optical discrete feature vector obtains an optical reconstructed image through the spatial decoder of the optical image compression-reconstructor. The high compression ratio SAR discrete feature vector obtains a corresponding high compression ratio SAR reconstructed image through the spatial decoder of the high compression ratio SAR image compression-reconstructor. The low compression ratio SAR discrete feature vector obtains a corresponding low compression ratio SAR reconstructed image through the spatial decoder of the low compression ratio SAR image compression-reconstructor.
[0025] Step S24: Use the discriminator to discriminate each compression-reconstructor, and train the optical image compression-reconstructor, the high compression ratio SAR image compression-reconstructor, and the low compression ratio SAR image compression-reconstructor based on minimizing the reconstruction loss, that is: calculate the reconstruction loss based on the SAR image and the high compression ratio SAR reconstructed image, and optimize the high compression ratio SAR image compression-reconstructor based on minimizing the reconstruction loss; calculate the reconstruction loss based on the SAR image and the low compression ratio SAR reconstructed image, and train the low compression ratio SAR image compression-reconstructor based on minimizing the reconstruction loss; calculate the reconstruction loss based on the real optical image and the optical reconstructed image, and optimize the optical image compression-reconstructor based on minimizing the reconstruction loss.
[0026] Step S3: Train the cross-modal feature mapper on the basis of the already trained compression-reconstructor. The cross-modal feature mapper includes a frequency-attention fusion generator and a pixel discriminator. Specifically: Step S31: Use the spatial encoder and feature discretizer of the trained high compression ratio SAR compression-reconstructor to compress the SAR image into a high compression ratio SAR discrete feature vector, and use the spatial encoder and feature discretizer of the trained low compression ratio SAR compression-reconstructor to compress the SAR image into a low compression ratio SAR discrete feature vector; Step S32: Construct a frequency-attention fusion generator, which includes a frequency enhancement-attention fusion module and a discrete feature mapper; Step S321. Construct a frequency enhancement-attention fusion module: In the frequency enhancement-attention fusion module, the high-compression-ratio SAR discrete feature vectors and the low-compression-ratio SAR discrete feature vectors are respectively enhanced by frequency filters to obtain the high-compression-ratio enhancement result and the low-compression-ratio enhancement result; the high-compression-ratio enhancement result and the low-compression-ratio enhancement result are stacked to obtain a stacked result; the stacked result is respectively multiplied by the weight matrices to obtain query vectors after multiplying by three weight matrices , key vectors , and value vectors , where the three weight matrices are generated by random initialization and are optimized in step 35; by calculating the similarity between the query vector and the key vector (T represents the transpose operation), the attention weight matrix is obtained; the attention weight matrix is multiplied by to obtain the final output, that is, the fusion result. The high-compression-ratio discrete feature vectors preserve more semantic information but lose spatial information, while the low-compression-ratio discrete feature vectors preserve more spatial information but less semantic information. By fusing the effective information in the two types of data, the performance of the model can be improved.
[0027] Step S322. Construct a discrete feature mapper: Process the fusion result of step S321 to obtain the mapped discrete feature vectors. In this embodiment, the fusion result input to the discrete feature mapper passes through 10 convolutional blocks composed of a convolutional layer + a BatchNorm layer + a ReLU layer to obtain the mapped discrete feature vectors.
[0028] Step S33. Input the mapped discrete feature vectors into the spatial decoder of the optical image compression-reconstructor to reconstruct and obtain the generated optical image; Step S34. Construct a pixel discriminator to discriminate between the generated optical image and the real optical image. The real optical image and the generated optical image are respectively input into the pixel discriminator.
[0029] In this embodiment, the images input to the pixel discriminator first pass through 1 convolutional layer and 1 ReLU layer, then pass through 3 convolutional blocks composed of a convolutional layer + a BatchNorm layer + a ReLU layer, and finally pass through 1 convolutional layer to obtain the discrimination result.
[0030] Step S35. Calculate the loss between the generated optical image and the real optical image, and optimize the frequency-attention fusion generator and the pixel discriminator.
[0031] The frequency-attention fusion generator is based on the loss function of the frequency-attention fusion generator Optimize it as follows: Specifically: , Among them, is the adversarial loss, is the Smooth L1 loss, is the structural similarity loss, are respectively the weights of
[0032] Adversarial loss : , , Among them, is the number of samples, is the generated optical image, is the pixel value at the -th position of the generated optical image, is a target matrix with all values equal to 1 and the same size as , is the target matrix at the -th position of the pixel value, is the Sigmod function, is the spatial decoder of the optical image compression-reconstructor, is the frequency-attention fusion generator, is the feature discretizer of the low compression ratio SAR compression-reconstructor, is the spatial encoder of the low compression ratio SAR compression-reconstructor, is the SAR image, is the feature discretizer of the high compression ratio SAR compression-reconstructor, is the spatial encoder of the high compression ratio SAR compression-reconstructor, Smooth L1 loss : The Smooth L1 loss calculates the loss for each pixel point at each position of the real optical image and the generated optical image separately, and finally calculates an average loss value.
[0033] , Among them, is the pixel value at the -th position of the real optical image, is the pixel value at the -th position of the generated optical image, is to find the absolute value.
[0034] Structural similarity loss : , , , wherein, is the pixel mean of the real optical image, is the pixel mean of the generated optical image, is the variance of the real optical image, is the variance of the generated optical image, is the covariance between the real optical image and the generated optical image, is the dynamic range of the real optical image. and are both intermediate parameters.
[0035] The pixel discriminator is optimized according to the loss function of the pixel discriminator, specifically as follows: , wherein, is the number of samples, is the Sigmod function, is the real optical image, is the -th pixel value at the position of the real optical image, is the generated optical image, is the -th pixel value at the position of the generated optical image, is the target matrix with all values equal to 1 and the same size as , is the pixel value at the -th position of the target matrix , is the target matrix and is the pixel value at the
[0036] After the optical image compressor-reconstructor, the high compression ratio SAR image compressor-reconstructor, the low compression ratio SAR image compressor-reconstructor, and the cross-modal feature mapper are trained, the SAR image to be translated is subjected to steps S31 - S33 to obtain the translated generated optical image.
[0037] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0038] Figure 4 It is a comparison chart of the results of the method of the present invention with the Pix2pix method, the BicycleGAN method, the CycleGAN method, and the CUT method. The generated result of the Pix2pix method looks relatively blurred, with serious loss of details, especially in the edge and building areas; the generated result of the BicycleGAN method is poor, with the problem of blurred edges, and the color and structure reconstruction are not accurate enough; the CycleGAN method generates a clearer structure to a certain extent, but there are still large deviations in the color accuracy and overall texture distribution; the CUT method has improvements in color and edge structure and looks more natural, but there are still problems with incorrect reconstruction of image objects; the method of the present invention shows significant advantages in terms of structure, color, and detail restoration of the generated optical image. Especially in the reconstruction of storage tanks, houses, and ground textures, this method can better restore the characteristics of real optical images, and the overall generation quality is better than other methods.
[0039] Table 1 shows the quantitative evaluation results of the method of the present invention and other methods. The quantitative evaluation indicators selected are the structural similarity index and the peak signal-to-noise ratio. The Structural Similarity Index Measure (SSIM) is an indicator used to measure the structural similarity between two images. It evaluates the similarity between images by considering luminance, contrast, and structural information. SSIM is based on the perceptual characteristics of the human visual system, especially in the perception of image details and overall structure. It is mainly used for image quality evaluation, especially in the fields of image compression, image enhancement, and image restoration. The Peak Signal-to-Noise Ratio (PSNR) is an indicator used for image quality evaluation, mainly measuring the difference between the reconstructed image and the original image. PSNR gives a quantitative measure of image quality by calculating the ratio between the maximum possible value of the image and the noise. It is usually used in the fields of image compression, image restoration, and image processing. The generation results of this method on the MSAW dataset are more prominent than those of other methods, achieving the best results in both SSIM and PSNR, two image quality evaluation indicators. Specifically, the SSIM of this method reaches 0.3605, showing a slight improvement compared to the sub-optimal BicycleGAN method (0.3542), indicating that it has better performance in maintaining the structural similarity of the generated images. In terms of PSNR, this method significantly leads other methods, reaching 17.6309, nearly 2 points higher than the sub-optimal BicycleGAN method (15.7278), indicating that the generated images have a lower noise level and higher quality.
[0040] Table 1
[0041] Example 2
[0042] This embodiment provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0043] Example 3
[0044] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0045] Example 4
[0046] This embodiment provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0047] It should be noted that the embodiments described in the present invention are only illustrative of the spirit of the present invention. Those skilled in the art to which the present invention pertains can make various modifications or supplements to the described embodiments or use similar means for substitution, but will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A SAR image to optical image translation method based on discrete feature mapping, characterized in that: The following steps are involved: Step S1, obtaining SAR images and corresponding real optical images, and constructing training sets and test sets; Step S2, constructing and training a compression-reconstructor, the compression-reconstructor comprising a spatial encoder, a feature discretizer, and a spatial decoder, and there are three compression-reconstructors, namely an optical image compression-reconstructor, a high compression ratio SAR image compression-reconstructor, and a low compression ratio SAR image compression-reconstructor; Step S3, constructing and training a cross-modal feature mapper, the cross-modal feature mapper includes a frequency-attention fusion generator, a high compression ratio SAR discrete feature vector and a low compression ratio SAR discrete feature vector output by a feature discretizer of a high compression ratio SAR image compression-reconstructor and a low compression ratio SAR image compression-reconstructor are input into the frequency-attention fusion generator to obtain a corresponding discrete feature vector, and the obtained discrete feature vector is input into a spatial decoder of an optical image compression-reconstructor to obtain a generated optical image; Step S4, inputting the SAR image to be translated into the feature discretizers of the trained high compression ratio SAR image compression-reconstructor and the low compression ratio SAR image compression-reconstructor, inputting the obtained high compression ratio SAR discrete feature vectors and low compression ratio SAR discrete feature vectors into the frequency-attention fusion generator to obtain the corresponding discrete feature vectors, and inputting the obtained discrete feature vectors into the spatial decoder of the optical image compression-reconstructor to obtain the translated generated optical image.
2. The SAR image to optical image translation method based on discrete feature mapping according to claim 1, characterized in that: The number of convolutional layers in the spatial encoder and spatial decoder of the high compression ratio SAR image compression-reconstructor is greater than the number of convolutional layers in the spatial encoder and spatial decoder of the low compression ratio SAR image compression-reconstructor.
3. The SAR image to optical image translation method based on discrete feature mapping according to claim 1, characterized in that: The optical image compression-reconstructor uses the real optical image as the input image and the reconstructed optical image as the output image; the high compression ratio SAR image compression-reconstructor and the low compression ratio SAR image compression-reconstructor both use the SAR image as the input image and the reconstructed SAR image as the output image; The input image obtains a continuous feature vector through the spatial encoder, and the continuous feature vector is input into the feature discretizer. The feature discretizer searches for the discrete feature vector closest to the continuous feature vector in the feature dictionary. The discrete feature vector is input into the spatial decoder, and the spatial decoder outputs a reconstructed image of the same size as the input image.
4. The SAR image to optical image translation method based on discrete feature mapping according to claim 3, characterized in that: The training compression-reconstructor includes using a discriminator to discriminate an optical image compression-reconstructor, a high compression ratio SAR image compression-reconstructor and a low compression ratio SAR image compression-reconstructor, and training the optical image compression-reconstructor, the high compression ratio SAR image compression-reconstructor and the low compression ratio SAR image compression-reconstructor based on minimizing reconstruction loss.
5. The SAR image to optical image translation method based on discrete feature mapping according to claim 3, characterized in that: The frequency-attention fusion generator includes a frequency enhancement-attention fusion module and a discrete feature mapper, In the frequency enhancement-attention fusion module, the high compression ratio SAR discrete feature vector and the low compression ratio SAR discrete feature vector are enhanced by frequency filters respectively to obtain a high compression ratio enhancement result and a low compression ratio enhancement result; the high compression ratio enhancement result and the low compression ratio enhancement result are stacked to obtain a stacked result; The stacking results are respectively related to the weight matrix Multiply to get the query vector , key vector , value vector ,pass Calculate the attention weight matrix , T is the transpose operation; the attention weight matrix and Multiply them to get the fusion result. The discrete feature mapper performs multi-layer convolution processing on the fusion result to obtain the mapped discrete feature vector.
6. The SAR image to optical image translation method based on discrete feature mapping according to claim 5, characterized in that: The cross-modal feature mapper also includes a pixel discriminator, and the real optical image and the generated optical image are respectively input into the pixel discriminator for judgment.
7. The SAR image to optical image translation method based on discrete feature mapping according to claim 6, characterized in that: The loss function of the frequency-attention fusion generator for: , in To combat losses, is the Smooth L1 loss, is the structural similarity loss, are weights, , , in, is the number of samples, To generate optical images, To generate the optical image The pixel value at each position, For A target matrix of uniform size with all values set to 1. The target matrix No. The pixel value at each position, is the Sigmod function, A spatial decoder for the optical image compression-reconstruction device. is the frequency-attention fusion generator, is the characteristic discretizer of the low compression ratio SAR compression-reconstructor, The spatial encoder of the low compression ratio SAR compression-reconstructor, is a SAR image, is the characteristic discretizer of the high compression ratio SAR compression-reconstructor, It is a spatial encoder for high compression ratio SAR compression-reconstruction. , in, The real optical image The pixel value at each position, To generate the optical image The pixel value at each position, To find the absolute value, , , , in, is the pixel mean of the real optical image, is the pixel mean value for generating the optical image, is the variance of the real optical image, is the variance of the generated optical image, is the covariance between the real optical image and the generated optical image, is the dynamic range of the real optical image, and All are intermediate parameters.
8. The SAR image to optical image translation method based on discrete feature mapping according to claim 6, characterized in that: The loss function of the pixel discriminator for: , in, is the number of samples, is the Sigmod function, For real optical images, The real optical image The pixel value at each position, To generate optical images, To generate the optical image The pixel value at each position, For A target matrix of uniform size with all values set to 1. The target matrix No. The pixel value at each position, For A target matrix of uniform size with all values set to zero. The target matrix No. The pixel value at that location.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the translation method according to any one of claims 1 to 8 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the translation method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method for translating SAR image into optical image
CN105809194A
Optical image translation method based on ViT-Pix2Pix
CN115272787A
SAR-optical image translation method and system based on image evaluation and feature selection
CN115859606A
Systems and methods for enhancing synthetic aperture radar imagery
US20180172824A1
Dictionary based temporally compressed synthetic aperture radar image reconstruction
US20240077604A1
Cited By
SAR (Synthetic Aperture Radar) image speckle noise suppression method based on multi-scale strong complex domain alternating restoration network
CN120725912A