Model training method, image reconstruction method, equipment, medium and product
By training the model and adjusting the parameters, the problem of QR code recognition failure caused by image interpolation algorithm was solved, achieving high-quality image reconstruction and improving the efficiency of QR code transactions and user experience.
Patent Information
- Application Number
- CN202510994257.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-10-31
AI Technical Summary
In existing technologies, image interpolation algorithms often produce stepped jagged edges after processing QR code images, which reduces the success rate of QR code recognition and affects transaction efficiency and user experience.
By training the model and adjusting the model parameters using reconstruction loss and triplet loss, high-quality reconstructed images are generated, avoiding the appearance of stair-step jagged edges.
It improved the success rate of QR code recognition, thus enhancing the efficiency of QR code transactions and the user experience.
Smart Images

Figure CN120876648A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a model training method, an image reconstruction method, an apparatus, a medium, and a product. Background Technology
[0002] In mobile payment scenarios, QR codes are tools that carry payment information in the form of image encoding, and their core function is to enable quick transactions between customers and merchants. However, static QR codes are easily soiled or damaged, affecting their recognition accuracy. Dynamic QR codes may fail to be recognized due to the low resolution of the QR code recognition device.
[0003] Currently, QR code images are mainly reconstructed using image interpolation algorithms. That is, within a model-based framework, high-resolution images are generated from low-resolution images to recover the information lost in the images.
[0004] However, image interpolation algorithms often produce jagged edges after processing images, which severely affects the image quality of the reconstructed QR code image, reduces the success rate of QR code recognition, and thus affects the efficiency of daily transactions, thereby impacting the user experience. Summary of the Invention
[0005] This application provides a model training method, an image reconstruction method, an apparatus, a medium, and a product to solve the problem that in the prior art, image interpolation algorithms often produce stepped jagged edges after image processing, which seriously affects the image quality of the reconstructed QR code image, reduces the success rate of QR code recognition, and thus affects the efficiency of daily transactions and the user experience.
[0006] Firstly, this application provides a model training method, the method comprising:
[0007] A first image to be reconstructed, a first interference image, and a first original image are obtained. The first image to be reconstructed is input into a training model to obtain a training reconstructed image output by the training model. The first image to be reconstructed is an image generated after the first original image is contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images in the training image library.
[0008] The reconstruction loss is determined based on the first original image and the training reconstructed image, and the triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image.
[0009] The model parameters of the model to be trained are adjusted based on the reconstruction loss and the triplet loss to obtain a new model to be trained.
[0010] The second image to be reconstructed in the training image library is used as the new first image to be reconstructed, the second interference image is used as the new first interference image, and the second original image is used as the new first original image. The process of "inputting the first image to be reconstructed into the training model to obtain the training reconstructed image output by the training model" is repeated until the preset iteration termination condition is met. The new training model is then used as the image reconstruction model. The second image to be reconstructed is an image generated after the second original image is contaminated. The image reconstruction model is used to reconstruct the target image to be reconstructed and generate the target original image corresponding to the target image to be reconstructed.
[0011] Secondly, this application also provides an image reconstruction method, the method comprising:
[0012] Acquire the target image to be reconstructed;
[0013] The target image to be reconstructed is input into the image reconstruction model to obtain the target original image corresponding to the target image to be reconstructed, which is output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method described in the first aspect of this application.
[0014] Thirdly, this application provides a model training apparatus, comprising:
[0015] The training input module is used to acquire a first image to be reconstructed, a first interference image, and a first original image, and input the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained; wherein, the first image to be reconstructed is an image generated after the first original image is contaminated, and the first image to be reconstructed, the first interference image, and the first original image are all images in the training image library.
[0016] The loss determination module is used to determine the reconstruction loss based on the first original image and the training reconstructed image, and to determine the triplet loss based on the first original image, the first interference image and the training reconstructed image.
[0017] The parameter adjustment module is used to adjust the model parameters of the model to be trained according to the reconstruction loss and the triplet loss to obtain a new model to be trained.
[0018] The model determination module is used to take the second image to be reconstructed in the training image library as the new first image to be reconstructed, the second interference image as the new first interference image, and the second original image as the new first original image, and return to execute the step of "inputting the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained" until a preset iteration end condition is reached, and the new model to be trained is used as the image reconstruction model; wherein, the second image to be reconstructed is an image generated after the second original image is contaminated, and the image reconstruction model is used to reconstruct the target image to be reconstructed to generate the target original image corresponding to the target image to be reconstructed.
[0019] Fourthly, this application provides an image reconstruction apparatus, comprising:
[0020] The image acquisition module is used to acquire the target image to be reconstructed;
[0021] An image input module is used to input the target image to be reconstructed into an image reconstruction model to obtain the target original image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method described in the first aspect of this application.
[0022] Fifthly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the model training method as described in the first aspect of this application, or the image reconstruction method as described in the second aspect of this application.
[0023] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model training method as described in the first aspect of this application, or the image reconstruction method as described in the second aspect of this application.
[0024] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the model training method as described in the first aspect of this application, or the image reconstruction method as described in the second aspect of this application.
[0025] The model training method of this application obtains a first image to be reconstructed, a first interference image, and a first original image. The first image to be reconstructed is input into the model to be trained to obtain a training reconstructed image output by the model. The first image to be reconstructed is an image generated after the first original image has been contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images from a training image library. A reconstruction loss is determined based on the first original image and the training reconstructed image, and a triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image. The model parameters of the model to be trained are adjusted based on the reconstruction loss and the triplet loss to obtain a new model to be trained. A second image to be reconstructed from the training image library is used as the new first image to be reconstructed, a second interference image is used as the new first interference image, and a second original image is used as the new first original image. The process of "inputting the first image to be reconstructed into the model to obtain a training reconstructed image output by the model" is repeated until a preset iteration termination condition is met. The new model to be trained is then used as the image reconstruction model. The second image to be reconstructed is an image generated after the second original image has been contaminated. The image reconstruction model is used to reconstruct the target image to be reconstructed, generating the target original image corresponding to the target image to be reconstructed. The model training method of this application, on the one hand, after obtaining the training reconstructed image, determines the reconstruction loss based on the training reconstructed image and the first original image, and then determines the triplet loss based on the first original image, the first interference image, and the training reconstructed image, thus providing multiple training losses for subsequent training. This allows the similarity between the training reconstructed image and the first original image to be improved after training the model based on the reconstruction loss and the triplet loss, thereby improving the model performance of the image reconstruction model and increasing the efficiency of model training. On the other hand, by reconstructing the target image to be reconstructed using the image reconstruction model, the target original image is obtained, avoiding the stair-step jagged edges that occur after image processing using image interpolation algorithms, which affect the image quality of the reconstructed QR code image. This improves the success rate of QR code recognition, thereby improving the efficiency of QR code transactions and the user experience. Attached Figure Description
[0026] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart illustrating the model training method provided in this application;
[0028] Figure 2aThis is another flowchart illustrating the model training method provided in this application;
[0029] Figure 2b This is an exemplary structural diagram of the model to be trained using the model training method provided in this application;
[0030] Figure 3 This is a flowchart illustrating the image reconstruction method provided in this application;
[0031] Figure 4 This is a schematic diagram of the model training device provided in this application;
[0032] Figure 5 This is a schematic diagram of the image reconstruction apparatus provided in this application;
[0033] Figure 6 This is a schematic diagram of the electronic device provided in this application. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0035] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0036] Figure 1 This is a flowchart illustrating the model training method provided in this application. This method can be executed by the model training device provided in this application, which can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device. For example, the device can be integrated into a computer. The following embodiments will illustrate this using the integration of the device into an electronic device as an example. Reference Figure 1 The method may specifically include the following steps:
[0037] Step 101: Obtain the first image to be reconstructed, the first interference image, and the first original image. Input the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained.
[0038] The first image to be reconstructed is an image generated after the first original image has been contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images from the training image library.
[0039] Specifically, the first original image is the image to be trained in the training database. In this embodiment, all images in the training database are QR code images, so the first original image is a QR code image in the training database. The first image to be reconstructed refers to the image obtained after corrupting the first original image. For example, brightness transformation, contrast transformation, or covering the first original image with a preset area of material, such as 2mm, can be performed on the first original image. 2 The first interfering image is an image from the training image library that differs from the first original image but has the same shape and attributes. For example, the first interfering image is another QR code image different from the first original image. The first image to be reconstructed, the first interfering image, and the first original image can be obtained by the electronic device performing this embodiment from a pre-built training image library. The training image library includes multiple interfering images, multiple original images, and the image to be reconstructed corresponding to each original image. The training image library can be constructed by capturing high-quality QR code images and then contaminating a portion of the QR code images.
[0040] The first image to be reconstructed is input into the training model, which extracts features from the image to obtain its feature information. Based on this feature information, spatial and frequency domain image features are then obtained. These features are then fused to obtain domain-fused image features. Finally, the domain-fused image features are upsampled to complete the reconstruction of the image, resulting in the training reconstructed image corresponding to the first image to be reconstructed, as output by the training model.
[0041] Step 102: Determine the reconstruction loss based on the first original image and the training reconstructed image, and determine the triplet loss based on the first original image, the first interference image and the training reconstructed image.
[0042] Specifically, the reconstruction loss is used to indicate the difference between the training reconstructed image and the first original image. By reducing the reconstruction loss, the training reconstructed image is made as close as possible to the first original image. The triplet loss is a loss determined by comparing the features of the first original image, the first interfering image, and the training reconstructed image. This aims to make the features of the training reconstructed image as close as possible to the features of the first original image, and as far away as possible from the features of the first interfering image, thereby enhancing the model's ability to distinguish the features of QR code images.
[0043] The reconstruction loss can be determined by calculating the difference between each pixel in the first original image and the training reconstructed image. For example, the sum of squared or absolute differences between each pixel in the first original image and the training reconstructed image can be calculated, and then the differences of all pixels can be summed to obtain the total reconstruction loss. In addition to the pixel-level loss, the structural similarity between the first original image and the training reconstructed image can also be calculated to obtain a further reconstruction loss.
[0044] The triplet loss is determined based on the first original image, the first interfering image, and the training reconstructed image. These three images are fed into the feature extraction part of the deep learning model to obtain their corresponding feature representations. Then, the similarity between the features of the training reconstructed image and the features of the first original image, as well as the similarity between the features of the training reconstructed image and the features of the first interfering image, is calculated. For example, the similarity can be Euclidean distance. The triplet loss is represented as a loss function that compares the similarity between the features of the training reconstructed image and the features of the first original image, and the similarity between the features of the training reconstructed image and the features of the first interfering image.
[0045] Optionally, the determination of reconstruction loss based on the first original image and the training reconstructed image in step 102 can be implemented through steps 1021 to 1023, and the determination of triplet loss based on the first original image, the first interference image and the training reconstructed image in step 102 can be implemented through steps 1024 to 1027.
[0046] Step 1021: Obtain the first pixel value of the first original image at each pixel position, and the second pixel value of the trained reconstructed image at each pixel position.
[0047] Specifically, since the training reconstructed image is reconstructed from the first image to be reconstructed obtained by corrupting the first original image, the first original image and the training reconstructed image have the same shape and resolution. Therefore, pixel values at the same pixel location can be compared. For each pixel location, the first pixel value of the first original image at that pixel location and the second pixel value of the training reconstructed image at that pixel location are obtained. The first and second pixel values can be obtained by indexing the pixel location.
[0048] Step 1022: Determine the cross-entropy of each pixel position based on the first pixel value and the second pixel value of each pixel position.
[0049] Specifically, for each pixel location, the cross-entropy can be calculated based on the first pixel value and the second pixel value at that location. For example, for pixel location (i,j), the cross-entropy H(i,j) can be represented by Equation 1.
[0050] H(i,j)=-p(i,j)log(q(i,j))+∈ Formula 1
[0051] Where H(i,j) represents the cross-entropy at pixel position (i,j), p(i,j) represents the normalized pixel value of the first original image at pixel position (i,j), q(i,j) represents the normalized pixel value of the trained reconstructed image at pixel position (i,j), and ∈ represents a very small constant, such as 10. -9 .
[0052] Step 1023: Determine the reconstruction loss based on the cross-entropy of multiple pixel locations in the first original image.
[0053] Specifically, after obtaining the cross-entropy at multiple pixel locations, the sum of these cross-entropies determines the reconstruction loss. This effectively measures the reconstruction quality of the entire image and provides a target for model optimization.
[0054] Step 1024: Obtain the original domain fusion image feature information of the first original image, the interference domain fusion image feature information of the first interference image, and the domain fusion image feature information of the training and reconstructed image.
[0055] Specifically, domain-fused image feature information refers to the result of extracting image features from the spatial and frequency domains and fusing these features with the image's overall features. Spatial domain features are extracted directly from the image's pixel values, reflecting the image's local structure and texture information. Frequency domain features are extracted from the image through Fourier transform, reflecting the image's frequency information, including details such as edges and textures. The first original image, the first interfering image, and the training reconstructed image are input into the feature extraction part of the deep learning model, respectively, to obtain their corresponding fused image feature information: the original domain-fused image feature information of the first original image, the interfering domain-fused image feature information of the first interfering image, and the domain-fused image feature information of the training reconstructed image.
[0056] Step 1025: Determine the original similarity based on the domain fusion image feature information and the original domain fusion image feature information.
[0057] Specifically, the original similarity refers to the similarity between the domain fusion image feature information of the training reconstructed image and the original domain fusion image feature information of the first original image. For example, the original similarity can be the Euclidean distance between the domain fusion image feature information of the training reconstructed image and the original domain fusion image feature information of the first original image. Based on the domain fusion image feature information and the original domain fusion image feature information, the original similarity is calculated using a similarity calculation method. For example, the similarity calculation method can be the cosine similarity calculation method, the Euclidean distance calculation method, or the structural similarity index calculation method, etc. If the calculated original similarity is high, it indicates that the features of the training reconstructed image are very close to the features of the first original image, and the reconstruction effect is good. If the calculated original similarity is low, it indicates that there is a large difference between the features of the training reconstructed image and the features of the first original image, and further optimization of the image reconstruction model is needed.
[0058] Step 1026: Determine the interference similarity based on the feature information of the domain fusion image and the feature information of the interference domain fusion image.
[0059] Specifically, interference similarity refers to the similarity between the domain fusion image feature information of the training reconstructed image and the interference domain fusion image feature information of the first interference image. For example, interference similarity can be the Euclidean distance between the domain fusion image feature information of the training reconstructed image and the interference domain fusion image feature information of the first interference image. Interference similarity is calculated using a similarity calculation method based on the domain fusion image feature information and the interference domain fusion image feature information. If the calculated interference similarity is low, it indicates that there is a significant difference between the features of the training reconstructed image and the features of the first interference image, resulting in a good reconstruction effect. If the calculated interference similarity is high, it indicates that the features of the training reconstructed image and the features of the first interference image are similar, requiring further optimization of the image reconstruction model.
[0060] Step 1027: Determine the triplet loss based on the original similarity and the interference similarity.
[0061] Specifically, the triplet loss is represented as a comparison between the original similarity and the interference similarity. For example, the triplet loss is the difference between the original similarity and the interference similarity. The triplet loss should be greater than a certain set value, such as greater than 0. When the original similarity is large and the interference similarity is small, the features of the reconstructed image are similar to the features of the first original image, while the features of the reconstructed image are significantly different from the features of the first interference image.
[0062] Step 103: Adjust the model parameters of the model to be trained based on the reconstruction loss and triplet loss to obtain a new model to be trained.
[0063] Specifically, by reducing the combination of reconstruction loss and triplet loss, the model parameters are optimized to minimize this combination, enabling the model to better reconstruct the image and distinguish between the original image and interfering images. The model parameters, such as the learning rate, are then adjusted based on the reconstruction loss and triplet loss to obtain the new model to be trained.
[0064] Optionally, after performing steps 1021 to 1027, step 103 can be implemented through steps 1031 to 1032.
[0065] Step 1031: Construct a loss function based on the reconstruction loss and the triplet loss.
[0066] Specifically, the loss function is obtained by adding the reconstruction loss and the triplet loss. By combining the triplet loss function with the reconstruction loss during training, the model's performance can be optimized.
[0067] Step 1032: Adjust the model parameters of the model to be trained according to the loss function to obtain a new model to be trained.
[0068] Specifically, after constructing a loss function based on reconstruction loss and triplet loss, the model parameters of the model to be trained are adjusted according to the loss function to minimize the loss function, enabling the model to better reconstruct the image and distinguish between the original image and the interference image. After adjusting the model parameters, the interface obtains a new model to be trained.
[0069] Step 104: Take the second image to be reconstructed in the training image library as the new first image to be reconstructed, the second interference image as the new first interference image, and the second original image as the new first original image. Return to the step of step 101 in which the first image to be reconstructed is input into the model to be trained until the preset iteration end condition is reached, and take the new model to be trained as the image reconstruction model.
[0070] The second image to be reconstructed is an image generated after the second original image has been contaminated. The image reconstruction model is used to reconstruct the target image to be reconstructed and generate the target original image corresponding to the target image to be reconstructed.
[0071] Specifically, the second image to be reconstructed is used as the new first image to be reconstructed, the second interference image is used as the new first interference image, and the second original image is used as the new first original image. The process then returns to the step of inputting the first image to be reconstructed into the training model, until a preset iteration termination condition is reached. The new training model is then used as the image reconstruction model. For example, the preset iteration termination condition could be that the number of training epochs reaches a preset number, or the loss function falls below a certain value, etc.
[0072] The model training method of this application obtains a first image to be reconstructed, a first interference image, and a first original image. The first image to be reconstructed is input into the model to be trained to obtain a training reconstructed image output by the model. The first image to be reconstructed is an image generated after the first original image has been contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images from a training image library. A reconstruction loss is determined based on the first original image and the training reconstructed image, and a triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image. The model parameters of the model to be trained are adjusted based on the reconstruction loss and the triplet loss to obtain a new model to be trained. A second image to be reconstructed from the training image library is used as the new first image to be reconstructed, a second interference image is used as the new first interference image, and a second original image is used as the new first original image. The process of "inputting the first image to be reconstructed into the model to obtain a training reconstructed image output by the model" is repeated until a preset iteration termination condition is met. The new model to be trained is then used as the image reconstruction model. The second image to be reconstructed is an image generated after the second original image has been contaminated. The image reconstruction model is used to reconstruct the target image to be reconstructed, generating the target original image corresponding to the target image to be reconstructed. The model training method of this application, on the one hand, after obtaining the training reconstructed image, determines the reconstruction loss based on the training reconstructed image and the first original image, and then determines the triplet loss based on the first original image, the first interference image, and the training reconstructed image, thus providing multiple training losses for subsequent training. This allows the similarity between the training reconstructed image and the first original image to be improved after training the model based on the reconstruction loss and the triplet loss, thereby improving the model performance of the image reconstruction model and increasing the efficiency of model training. On the other hand, by reconstructing the target image to be reconstructed using the image reconstruction model, the target original image is obtained, avoiding the stair-step jagged edges that occur after image processing using image interpolation algorithms, which affect the image quality of the reconstructed QR code image. This improves the success rate of QR code recognition, thereby improving the efficiency of QR code transactions and the user experience.
[0073] Figure 2a This is another flowchart illustrating the model training method provided in this application. This embodiment... Figure 1 Based on the illustrated embodiment and various optional implementation schemes, the model to be trained includes a feature extraction unit to be trained, a self-information enhancement unit to be trained, a Fourier transform unit to be trained, a domain information fusion unit to be trained, and an upsampling unit to be trained. The steps of inputting the first image to be reconstructed into the model to be trained to obtain the training reconstructed image are described in detail. For example... Figure 2a As shown, the method may include the following steps:
[0074] Step 201: Obtain the first image to be reconstructed, the first interference image, and the first original image.
[0075] Step 202: Input the first image to be reconstructed into the feature extraction unit to be trained to obtain the image feature information output by the feature extraction unit to be trained.
[0076] Specifically, the model to be trained includes a feature extraction unit, a self-information enhancement unit, a Fourier transform unit, a domain information fusion unit, and an upsampling unit. During model training, the parameters of these units are continuously adjusted until training is complete. The first image to be reconstructed is input into the feature extraction unit, which downsamples the image. For example, it performs convolution and pooling operations on the image to obtain and output the image feature information.
[0077] Step 203: Input the image feature information into the self-information enhancement unit to be trained to obtain the spatial domain image feature information output by the self-information enhancement unit to be trained.
[0078] Specifically, after obtaining the image feature information output by the feature extraction unit to be trained, the image feature information is input into the self-information enhancement unit to be trained, and self-information enhancement processing is performed on the image feature information to obtain the feature information of the image feature information in the spatial domain, that is, the spatial domain image feature information, and then output.
[0079] Step 204: Input the image feature information into the Fourier transform unit to be trained to obtain the frequency domain image feature information output by the Fourier transform unit to be trained.
[0080] Specifically, after obtaining the image feature information output by the feature extraction unit to be trained, the image feature information is input into the Fourier transform unit to be trained, and the Fourier transform is performed on the image feature information to obtain the feature information in the frequency domain, that is, the frequency domain image feature information, and then output.
[0081] Step 205: Input the image feature information, spatial domain image feature information and frequency domain image feature information into the domain information fusion unit to be trained, and obtain the domain fused image feature information output by the domain information fusion unit to be trained.
[0082] Specifically, image feature information, spatial domain image feature information, and frequency domain image feature information are input into the training domain information fusion unit. The training domain information fusion unit performs feature fusion on the image feature information, spatial domain image feature information, and frequency domain image feature information to obtain domain fused image feature information and output it.
[0083] Step 206: Input the domain fusion image feature information into the upsampling unit to be trained to obtain the training reconstructed image output by the upsampling unit to be trained.
[0084] Specifically, the domain fusion image feature information is input into the upsampling unit to be trained. The upsampling unit performs upsampling processing on the domain fusion image feature information, for example, by deconvolution to restore the feature information to the original resolution, and then outputs the trained reconstructed image.
[0085] Optionally, the feature extraction unit to be trained is used to downsample the first image to be reconstructed to generate image feature information; the self-information enhancement unit to be trained is used to perform self-information enhancement processing on the image feature information to generate spatial domain image feature information; the Fourier transform unit to be trained is used to perform Fourier transform on the image feature information to generate frequency domain image feature information; the domain information fusion unit is used to perform feature fusion on the image feature information, spatial domain image feature information and frequency domain image feature information to generate domain fused image feature information; and the upsampling unit to be trained is used to upsample the domain fused image feature information to obtain the training reconstructed image.
[0086] Specifically, the feature extraction unit to be trained downsamples the input first image to be reconstructed, for example, by using convolutional and pooling layers, or convolutional layers with a stride greater than 1, to generate image feature information. These features typically have fewer spatial dimensions but contain richer semantic information. The self-information enhancement unit to be trained performs self-information enhancement processing on the image feature information to generate spatial domain image feature information. For example, the self-information enhancement unit to be trained generates spatial domain image feature information through attention mechanisms, residual connections, or other feature enhancement techniques, further extracting and enhancing important information in the features and suppressing unimportant features. The Fourier transform unit to be trained performs Fourier transform on the image feature information to generate frequency domain image feature information. The image features are transformed to the frequency domain through Fourier transform. Frequency domain features can capture the global structure and periodic information of the image. The domain information fusion unit performs feature fusion on the image feature information, spatial domain image feature information, and frequency domain image feature information to generate domain fused image feature information. Through feature fusion, feature information from different domains is combined to generate a more comprehensive feature representation. For example, the fusion method of the domain information fusion unit can be stitching, weighted summation, or multi-scale feature fusion. The upsampling unit to be trained upsamples the feature information of the domain fused image to obtain the training reconstructed image, that is, the feature map is restored to the resolution of the original image through upsampling. In subsequent model training steps, the model parameters of the above-mentioned training unit are also adjusted through backpropagation and optimization algorithms to minimize the difference between the reconstructed image and the original image. By combining multiple units such as feature extraction, feature enhancement, frequency domain transformation, and feature fusion, multi-domain feature information of the image can be effectively extracted and utilized, thereby generating a high-quality reconstructed image.
[0087] For example, Figure 2bThis is an exemplary structural diagram of the model to be trained using the model training method provided in this application. The arrows in the diagram only indicate the input direction and do not indicate a process of sending information between units. In this embodiment, the step of inputting information into any unit to be trained is completed by the electronic device executing this embodiment. Figure 2b As shown, the model to be trained includes a feature extraction unit, a self-information enhancement unit, a Fourier transform unit, a domain information fusion unit, and an upsampling unit. The first image to be reconstructed is input into the feature extraction unit to obtain image feature information. The image feature information is then input into the self-information enhancement unit to obtain spatial domain image feature information. The image feature information is then input into the Fourier transform unit to obtain frequency domain image feature information. The image feature information, spatial domain image feature information, and frequency domain image feature information are then input into the domain information fusion unit to obtain domain-fused image feature information. Finally, the domain-fused image feature information is input into the upsampling unit to obtain the training reconstructed image.
[0088] Step 207: Determine the reconstruction loss based on the first original image and the training reconstructed image, and determine the triplet loss based on the first original image, the first interference image and the training reconstructed image.
[0089] Step 208: Adjust the model parameters of the model to be trained based on the reconstruction loss and triplet loss to obtain a new model to be trained.
[0090] Step 209: Take the second image to be reconstructed in the training image library as the new first image to be reconstructed, the second interference image as the new first interference image, and the second original image as the new first original image, and return to step 202 until the preset iteration termination condition is reached, and take the new model to be trained as the image reconstruction model.
[0091] The model training method of this application enhances image features by fusing feature information, frequency domain feature information and spatial domain feature information of the image to be reconstructed, thereby achieving the reconstruction of the image to be reconstructed and obtaining a trained reconstructed image. This enables the reconstruction of QR code images in subsequent model applications, improving the accuracy of the reconstructed image and thus improving the accuracy of QR code recognition.
[0092] Figure 3 This is a schematic flowchart of the image reconstruction method provided in this application. This method can be executed by the image reconstruction apparatus provided in this application, which can be implemented in software and / or hardware. In a specific embodiment, the apparatus can be integrated into an electronic device. For example, the apparatus can be integrated into a computer. The following embodiments will be described using the integration of the apparatus into an electronic device as an example. Reference Figure 3 The method may specifically include the following steps:
[0093] Step 301: Obtain the target image to be reconstructed.
[0094] Specifically, the target image to be reconstructed is obtained. For example, the target image to be reconstructed is a static QR code image contaminated with oil.
[0095] Step 302: Input the target image to be reconstructed into the image reconstruction model to obtain the original target image corresponding to the target image to be reconstructed output by the image reconstruction model.
[0096] The image reconstruction model is a model trained according to the model training method of any embodiment of this application.
[0097] Specifically, the target image to be reconstructed is input into the image reconstruction model. The image reconstruction model obtains the feature information, spatial domain image feature information and frequency domain image feature information of the target image to be reconstructed based on the target image to be reconstructed. The feature information, spatial domain image feature information and frequency domain image feature information of the target image to be reconstructed are fused to obtain fused feature information. Then, the target original image corresponding to the target image to be reconstructed is obtained by upsampling the fused feature information.
[0098] The image reconstruction method of this application obtains a target image to be reconstructed; inputs the target image to be reconstructed into an image reconstruction model to obtain the target original image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method of any embodiment of this application. That is, the image reconstruction method of this application obtains the spatial domain image feature information and frequency domain image feature information of the target image to be reconstructed based on the target image, and then obtains the target original image. This avoids the situation where step-like jagged edges appear after image processing using image interpolation algorithms, which affect the image quality of the reconstructed QR code image, thereby improving the success rate of QR code recognition, and thus improving the efficiency of QR code transactions and the user experience.
[0099] Figure 4 This is a schematic diagram of the model training apparatus provided in this application, which is suitable for executing the model training method provided in this application. Figure 4 As shown, the device may specifically include:
[0100] The training input module 401 is used to acquire a first image to be reconstructed, a first interference image, and a first original image, and input the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained; wherein, the first image to be reconstructed is an image generated after the first original image is contaminated, and the first image to be reconstructed, the first interference image, and the first original image are all images in the training image library.
[0101] The loss determination module 402 is used to determine the reconstruction loss based on the first original image and the training reconstructed image, and to determine the triplet loss based on the first original image, the first interference image and the training reconstructed image.
[0102] The parameter adjustment module 403 is used to adjust the model parameters of the model to be trained according to the reconstruction loss and the triplet loss to obtain a new model to be trained.
[0103] The model determination module 404 is used to take the second image to be reconstructed in the training image library as the new first image to be reconstructed, the second interference image as the new first interference image, and the second original image as the new first original image, and return to execute the step of "inputting the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained" until the preset iteration end condition is reached, and the new model to be trained is used as the image reconstruction model; wherein, the second image to be reconstructed is an image generated after the second original image is contaminated, and the image reconstruction model is used to reconstruct the target image to be reconstructed to generate the target original image corresponding to the target image to be reconstructed.
[0104] In one embodiment, the training input module 401 includes a training feature extraction unit, a training self-information enhancement unit, a training Fourier transform unit, a training domain information fusion unit, and a training upsampling unit in the training input module 401. Specifically, in the aspect of inputting the first image to be reconstructed into the training model to obtain the training reconstructed image output by the training model, the training input module 401 is configured to: input the first image to be reconstructed into the training feature extraction unit to obtain image feature information output by the training feature extraction unit; input the image feature information into the training self-information enhancement unit to obtain spatial domain image feature information output by the training self-information enhancement unit; input the image feature information into the training Fourier transform unit to obtain frequency domain image feature information output by the training Fourier transform unit; input the image feature information, the spatial domain image feature information, and the frequency domain image feature information into the training domain information fusion unit to obtain domain fused image feature information output by the training domain information fusion unit; and input the domain fused image feature information into the training upsampling unit to obtain the training reconstructed image output by the training upsampling unit.
[0105] In one embodiment, the training input module 401 includes a training feature extraction unit for downsampling the first image to be reconstructed to generate the image feature information; a training self-information enhancement unit for performing self-information enhancement processing on the image feature information to generate the spatial domain image feature information; a training Fourier transform unit for performing Fourier transform on the image feature information to generate the frequency domain image feature information; a domain information fusion unit for performing feature fusion on the image feature information, the spatial domain image feature information, and the frequency domain image feature information to generate the domain fused image feature information; and a training upsampling unit for upsampling the domain fused image feature information to obtain the training reconstructed image.
[0106] In one embodiment, the loss determination module 402, in determining the reconstruction loss based on the first original image and the training reconstructed image, is specifically configured to: obtain a first pixel value of the first original image at each pixel location and a second pixel value of the training reconstructed image at each pixel location; determine the cross entropy of each pixel location based on the first pixel value and the second pixel value of each pixel location; and determine the reconstruction loss based on the cross entropy of multiple pixel locations of the first original image.
[0107] In one embodiment, the loss determination module 402, in determining the triplet loss based on the first original image, the first interference image, and the training reconstructed image, is specifically configured to: acquire original domain fusion image feature information of the first original image, interference domain fusion image feature information of the first interference image, and domain fusion image feature information of the training reconstructed image; determine the original similarity based on the domain fusion image feature information and the original domain fusion image feature information; determine the interference similarity based on the domain fusion image feature information and the interference domain fusion image feature information; and determine the triplet loss based on the original similarity and the interference similarity.
[0108] In one embodiment, the parameter adjustment module 403 is specifically used to: construct a loss function based on the reconstruction loss and the triplet loss; and adjust the model parameters of the model to be trained based on the loss function to obtain a new model to be trained.
[0109] The model training apparatus of this application has the same optional implementation methods and the beneficial effects that can be achieved as those in the above-described model training method embodiments, and will not be repeated here.
[0110] Figure 5 This is a schematic diagram of the image reconstruction apparatus provided in this application, which is suitable for performing the image reconstruction method provided in this application. Figure 5 As shown, the device may specifically include:
[0111] Image acquisition module 501 is used to acquire the target image to be reconstructed;
[0112] The image input module 502 is used to input the target image to be reconstructed into the image reconstruction model to obtain the target original image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method described in the first aspect of this application.
[0113] The image reconstruction apparatus of this application has the same optional implementation methods and the beneficial effects that can be achieved as those in the above-described image reconstruction method embodiments, and will not be repeated here.
[0114] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the model training method provided in any of the above embodiments, or the image reconstruction method provided in any of the above embodiments.
[0115] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model training method provided in any of the above embodiments, or implements the image reconstruction method provided in any of the above embodiments.
[0116] The following is for reference. Figure 6 It shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the present application. Figure 6 The electronic device shown is merely an example and should not impose any limitations on the functionality and scope of this application.
[0117] like Figure 6 As shown, the electronic device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the electronic device 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0119] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this application.
[0120] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0121] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0122] The modules and / or units described in this application can be implemented in software or hardware. The described modules and / or units can also be housed in a processor; for example, a processor may be described as including a training input module, a loss determination module, a parameter tuning module, and a model determination module. Alternatively, a processor may be described as including an image acquisition module and an image input module. The names of these modules do not, in certain circumstances, constitute a limitation on the module itself.
[0123] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist alone and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include:
[0124] The process involves acquiring a first image to be reconstructed, a first interference image, and a first original image. The first image to be reconstructed is input into the training model to obtain the training reconstructed image output by the training model. The first image to be reconstructed is an image generated after the first original image has been corrupted. The first image to be reconstructed, the first interference image, and the first original image are all images from the training image library. A reconstruction loss is determined based on the first original image and the training reconstructed image, and a triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image. The model parameters of the training model are adjusted based on the reconstruction loss and the triplet loss to obtain a new training model. A second image to be reconstructed from the training image library is used as the new first image to be reconstructed, a second interference image is used as the new first interference image, and a second original image is used as the new first original image. The process returns to the step of "inputting the first image to be reconstructed into the training model to obtain the training reconstructed image output by the training model" until a preset iteration termination condition is met. The new training model is then used as the image reconstruction model. The second image to be reconstructed is an image generated after the second original image has been corrupted. The image reconstruction model is used to reconstruct the target image to be reconstructed, generating the target original image corresponding to the target image to be reconstructed.
[0125] According to the model training method of this application, a first image to be reconstructed, a first interference image, and a first original image are obtained. The first image to be reconstructed is input into the model to be trained to obtain the training reconstructed image output by the model. The first image to be reconstructed is an image generated after the first original image has been contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images from the training image library. A reconstruction loss is determined based on the first original image and the training reconstructed image, and a triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image. The model parameters of the model to be trained are then adjusted based on the reconstruction loss and the triplet loss. The process involves adjusting the image to obtain a new model to be trained. The second image to be reconstructed from the training image library is used as the new first image to be reconstructed, the second interfering image as the new first interfering image, and the second original image as the new first original image. The process then returns to the step of "inputting the first image to be reconstructed into the model to obtain the training reconstructed image output by the model," continuing until a preset iteration termination condition is met. The new model to be trained is then used as the image reconstruction model. Here, the second image to be reconstructed is an image generated after the second original image has been contaminated. The image reconstruction model is used to reconstruct the target image to generate the target original image corresponding to the target image to be reconstructed. In other words, the model training method of this application, on the one hand, after obtaining the training reconstructed image, determines the reconstruction loss based on the training reconstructed image and the first original image, and then determines the triplet loss based on the first original image, the first interfering image, and the training reconstructed image. This provides multiple training losses for subsequent training, enabling the similarity between the training reconstructed image and the first original image to be improved after training the model based on the reconstruction loss and the triplet loss. This improves the model performance of the image reconstruction model and increases the efficiency of model training. On the other hand, by reconstructing the target image using an image reconstruction model, the original target image is obtained. This avoids the situation where step-like jagged edges appear after processing the image using an image interpolation algorithm, which affects the image quality of the reconstructed QR code image. This improves the success rate of QR code recognition, thereby enhancing the efficiency of QR code transactions and the user experience.
[0126] Alternatively, when one or more of the above programs are executed by the device, the device includes:
[0127] Obtain the target image to be reconstructed; input the target image to be reconstructed into the image reconstruction model to obtain the target original image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method of any embodiment of this application.
[0128] According to the image reconstruction method of this application, a target image to be reconstructed is obtained; the target image to be reconstructed is input into an image reconstruction model to obtain the original target image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained according to the model training method of any embodiment of this application. That is, the image reconstruction method of this application obtains the spatial domain image feature information and frequency domain image feature information of the target image to be reconstructed based on the target image to be reconstructed, and then obtains the original target image. This avoids the situation where step-like jagged edges appear after image processing using image interpolation algorithms, which affect the image quality of the reconstructed QR code image, thereby improving the success rate of QR code recognition, and thus improving the efficiency of QR code transactions and the user experience.
[0129] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the model training method provided in any embodiment of this application, or the image reconstruction method provided in any embodiment of this application.
[0130] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.
[0132] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A model training method, characterized in that, include: A first image to be reconstructed, a first interference image, and a first original image are obtained. The first image to be reconstructed is input into a training model to obtain a training reconstructed image output by the training model. The first image to be reconstructed is an image generated after the first original image is contaminated. The first image to be reconstructed, the first interference image, and the first original image are all images in the training image library. The reconstruction loss is determined based on the first original image and the training reconstructed image, and the triplet loss is determined based on the first original image, the first interference image, and the training reconstructed image. The model parameters of the model to be trained are adjusted based on the reconstruction loss and the triplet loss to obtain a new model to be trained. The second image to be reconstructed in the training image library is used as the new first image to be reconstructed, the second interference image is used as the new first interference image, and the second original image is used as the new first original image. The process of "inputting the first image to be reconstructed into the training model to obtain the training reconstructed image output by the training model" is repeated until the preset iteration termination condition is met. The new training model is then used as the image reconstruction model. The second image to be reconstructed is an image generated after the second original image is contaminated. The image reconstruction model is used to reconstruct the target image to be reconstructed and generate the target original image corresponding to the target image to be reconstructed.
2. The method according to claim 1, characterized in that, The model to be trained includes a feature extraction unit to be trained, a self-information enhancement unit to be trained, a Fourier transform unit to be trained, a domain information fusion unit to be trained, and an upsampling unit to be trained. The step of inputting the first image to be reconstructed into the model to be trained to obtain the training reconstructed image output by the model to be trained includes: The first image to be reconstructed is input into the feature extraction unit to be trained, and the image feature information output by the feature extraction unit to be trained is obtained. The image feature information is input into the self-information enhancement unit to be trained, and the spatial domain image feature information output by the self-information enhancement unit to be trained is obtained. The image feature information is input into the Fourier transform unit to be trained to obtain the frequency domain image feature information output by the Fourier transform unit to be trained. The image feature information, the spatial domain image feature information, and the frequency domain image feature information are input into the domain information fusion unit to be trained, and the domain fused image feature information output by the domain information fusion unit to be trained is obtained. The domain fusion image feature information is input into the upsampling unit to be trained to obtain the training reconstructed image output by the upsampling unit to be trained.
3. The method according to claim 2, characterized in that, The feature extraction unit to be trained is used to downsample the first image to be reconstructed to generate the image feature information; The self-information enhancement unit to be trained is used to perform self-information enhancement processing on the image feature information to generate the spatial domain image feature information; The Fourier transform unit to be trained is used to perform Fourier transform on the image feature information to generate the frequency domain image feature information; The domain information fusion unit is used to perform feature fusion on the image feature information, the spatial domain image feature information and the frequency domain image feature information to generate the domain fused image feature information. The upsampling unit to be trained is used to upsample the feature information of the domain fusion image to obtain the training reconstructed image.
4. The method according to claim 1, characterized in that, The step of determining the reconstruction loss based on the first original image and the trained reconstructed image includes: Obtain the first pixel value of the first original image at each pixel location, and the second pixel value of the trained reconstructed image at each pixel location; The cross-entropy of each pixel location is determined based on the first pixel value and the second pixel value of each pixel location; The reconstruction loss is determined based on the cross-entropy of multiple pixel locations in the first original image.
5. The method according to claim 4, characterized in that, The step of determining the triplet loss based on the first original image, the first interference image, and the trained reconstructed image includes: Obtain the original domain fusion image feature information of the first original image, the interference domain fusion image feature information of the first interference image, and the domain fusion image feature information of the trained reconstructed image; The original similarity is determined based on the domain fusion image feature information and the original domain fusion image feature information; The interference similarity is determined based on the feature information of the fused image in the domain and the feature information of the fused image in the interference domain. The triplet loss is determined based on the original similarity and the interference similarity.
6. The method according to claim 5, characterized in that, The step of adjusting the model parameters of the model to be trained based on the reconstruction loss and the triplet loss to obtain a new model to be trained includes: Construct a loss function based on the reconstruction loss and the triplet loss; The model parameters of the model to be trained are adjusted according to the loss function to obtain a new model to be trained.
7. An image reconstruction method, characterized in that, The method includes: Acquire the target image to be reconstructed; The target image to be reconstructed is input into the image reconstruction model to obtain the original target image corresponding to the target image to be reconstructed output by the image reconstruction model; wherein, the image reconstruction model is a model trained by the model training method according to any one of claims 1-6.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the model training method as described in any one of claims 1 to 6, or, when it executes the program, it implements the image reconstruction method as described in claim 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the model training method as described in any one of claims 1 to 6, or, when the program is executed, it implements the image reconstruction method as described in claim 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the model training method as described in any one of claims 1 to 6, or, when the program is executed, it implements the image reconstruction method as described in claim 7.