Method for determining image synthesis model and related apparatus

By constructing a distribution loss function and adjusting layer parameters in the image synthesis model, the problem of inaccurate synthesis of missing images in multi-modal scenes is solved, and the efficiency and accuracy of image acquisition are improved.

WO2023202194A9PCT designated stage expired Publication Date: 2024-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/076117
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-04-22
Filing Date
2023-02-15
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

In multi-modal scenarios, the synthesis of images of missing modalities through existing technologies is inaccurate and difficult to meet the needs of practical applications, and obtaining multi-modal images requires a lot of manpower and material resources.

Method used

By obtaining training sample pairs, using the feature extraction sub-model in the initial synthesis model to build a distribution loss function, adjusting layer parameters to minimize feature distribution differences, and training the image synthesis model to achieve more accurate cross-modal image synthesis.

Benefits of technology

The efficiency of image acquisition in multi-modal scenes is improved, the generated missing images are closer to reality, and the consumption of manpower and material resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023076117_19092024_PF_FP_ABST
    Figure CN2023076117_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a method for determining an image synthesis model and a related apparatus, which may be applied to various scenarios such as cloud technology, artificial intelligence, intelligent transportation, and assisted driving. In the present method, the influence of a modal difference between a first mode and a second mode on an image synthesis model is reduced by means of training, and the mobility of an effective feature in cross-modal synthesis is enhanced, so that when the image synthesis model runs cross-modal image synthesis, such as when synthesizing a missing image of the second mode on the basis of a target image of the first mode, on the basis of a feature distribution difference between the two modes being quite small, an image feature of the missing image is accurately transformed according to an output feature of the target image; therefore, a missing image closer to reality is synthesized, and image acquisition efficiency in a multi-modal scenario is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method for determining an image synthesis model and related device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 22, 2022, with application number 2022104291443 and application name “A method for determining an image synthesis model and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of image processing, and in particular to image synthesis technology. Background Art

[0003] In practical applications, multiple modal images can be obtained for a target object. Since images of different modalities can reflect different aspects of the target object, images of multiple modalities can describe the target object more comprehensively.

[0004] However, multimodal images often require multiple acquisition methods, consuming significant manpower and resources. For example, multimodal images can be obtained through the modality-diversity of magnetic resonance imaging (MRI), which can significantly improve the productivity of routine diagnosis and advanced research. However, the high variability between devices and the high cost of examinations make the acquisition and utilization of multimodal images challenging.

[0005] In multimodal scenarios, synthesizing images of the missing modality based on images of the existing modality is an effective way to reduce manpower and material resources. However, the images of the missing modality synthesized using related technologies are often inaccurate and difficult to meet practical application requirements.

[0006] Summary of the Invention

[0007] In order to solve the above technical problems, the present application provides a method and related devices for determining an image synthesis model. The obtained image synthesis model can synthesize missing images that are closer to reality, thereby improving the image acquisition efficiency in multimodal scenarios.

[0008] The embodiments of this application disclose the following technical solutions:

[0009] In one aspect, an embodiment of the present application provides a method for determining an image synthesis model, the method comprising:

[0010] Acquire a training sample pair, the training sample pair comprising a first sample image of a first modality and a second sample image of a second modality;

[0011] Inputting the first sample image and the second sample image in the training sample pair into a first feature extraction sub-model and a second feature extraction sub-model in an initial synthesis model, respectively, wherein the first feature extraction sub-model includes N first convolutional layers, and the second feature extraction sub-model includes N second convolutional layers, where N is an integer greater than or equal to 1;

[0012] According to the distribution difference between the first output feature of the first convolutional layer of the i-th layer and the second output feature of the second convolutional layer of the i-th layer, construct the i-th distribution loss function, where i is a positive integer less than or equal to N;

[0013] According to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer, and obtain an image synthesis model based on the initial synthesis model training. The image synthesis model is used to perform cross-modal image synthesis between the first modality and the second modality.

[0014] On the other hand, an embodiment of the present application provides a device for determining an image synthesis model, the device comprising:

[0015] a sample pair acquiring unit, configured to acquire a training sample pair, wherein the training sample pair includes a first sample image of a first modality and a second sample image of a second modality;

[0016] a sample pair input unit, configured to input the first sample image and the second sample image in the training sample pair into a first feature extraction sub-model and a second feature extraction sub-model in an initial synthesis model, respectively, wherein the first feature extraction sub-model includes N first convolutional layers, and the second feature extraction sub-model includes N second convolutional layers, where N is an integer greater than or equal to 1;

[0017] a distribution loss function determining unit, configured to construct an i-th distribution loss function according to a distribution difference in feature distribution between a first output feature of the i-th first convolutional layer and a second output feature of the i-th second convolutional layer, where i is a positive integer less than or equal to N;

[0018] A layer parameter adjustment unit is used to adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer according to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, and obtain an image synthesis model based on the initial synthesis model training. The image synthesis model is used to perform cross-modal image synthesis between the first modality and the second modality.

[0019] On the other hand, an embodiment of the present application provides a computer device, the computer device including a processor and a memory:

[0020] The memory is used to store program code and transmit the program code to the processor;

[0021] The processor is used to execute the method for determining the image synthesis model according to the instructions in the program code.

[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method for determining the image synthesis model.

[0023] On the other hand, an embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method for determining the image synthesis model.

[0024] It can be seen from the above technical solution that after obtaining the training sample pair, the training sample pair can be input into the initial synthesis model, wherein the training sample pair includes a first sample image of the first modality and a second sample image of the second modality, and the initial synthesis model includes a first feature extraction sub-model for processing the first sample image and a second feature extraction sub-model for processing the second sample image, the first feature extraction sub-model includes N layers of first convolutional layers, and the second feature extraction sub-model includes N layers of second convolutional layers, wherein the i-th first convolutional layer can output a first output feature determined according to the first sample image, and the i-th second convolutional layer can output a second output feature determined according to the second sample image, and determine the distribution difference in feature distribution between the first output feature and the second output feature. Since the distribution difference can identify the modal difference between the first modality and the second modality, the larger the modal difference, the more unfavorable it is for the subsequent image synthesis model. The method performs cross-modal image synthesis between the first modality and the second modality based on the distribution difference, and constructs the i-th distribution loss function through the distribution difference. According to the i-th distribution loss function, the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer are adjusted with minimizing the distribution difference as the optimization goal, so that the initial synthesis model is trained as an image synthesis model. Since the influence of the modality difference between the first modality and the second modality on the image synthesis model is reduced through the above training, the transferability of effective features in cross-modal synthesis is enhanced. When the image synthesis model performs cross-modal image synthesis, for example, when synthesizing the missing image of the second modality based on the target image of the first modality, the image features of the missing image are accurately converted according to the output features of the target image based on the characteristic that the feature distribution difference under the two modalities is very small, thereby synthesizing a missing image that is closer to the real one, thereby improving the image acquisition efficiency in multimodal scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1 is a schematic diagram of an image synthesis model for determining a scene according to an embodiment of the present application;

[0026] FIG2 is a flow chart of a method for determining an image synthesis model provided in an embodiment of the present application;

[0027] FIG3 is a schematic diagram of a model training provided in an embodiment of the present application;

[0028] FIG4 is a schematic diagram of another model training provided in an embodiment of the present application;

[0029] FIG5 is a schematic diagram of another model training provided in an embodiment of the present application;

[0030] FIG6 is a schematic diagram of another model training provided in an embodiment of the present application;

[0031] FIG7 is a schematic diagram of another model training provided in an embodiment of the present application;

[0032] FIG8 is a schematic diagram of image synthesis provided by an embodiment of the present application;

[0033] FIG9 is a schematic diagram of a model verification provided in an embodiment of the present application;

[0034] FIG10 is another schematic diagram of model verification provided in an embodiment of the present application;

[0035] FIG11 is a device structure diagram of a device for determining an image synthesis model provided by an embodiment of the present application;

[0036] FIG12 is a structural diagram of a terminal device provided in an embodiment of the present application;

[0037] FIG13 is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The embodiments of the present application are described below with reference to the accompanying drawings.

[0039] The method for determining the image synthesis model provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, car terminals, etc. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0040] This application can be applied to the field of artificial intelligence, mainly involving computer vision technology and machine learning.

[0041] For example, the embodiments of the present application can identify various types of information included in an image based on computer vision technology, and can train an initial synthesis model based on machine learning to obtain an image synthesis model. When the image synthesis model performs cross-modal image synthesis, for example, when synthesizing a missing image of the second modality based on a target image of the first modality, since the feature distribution difference under the two modalities is very small, the image synthesis model can accurately convert the image features of the missing image according to the output features of the target image, thereby synthesizing a missing image that is closer to the real one, thereby improving the image acquisition efficiency in multimodal scenarios.

[0042] It is understandable that in the specific implementation of this application, the image samples and target images used may involve user information, facial features and other related data. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0043] In order to facilitate understanding of the technical solution provided by the present application, the method for determining the image synthesis model provided by the embodiment of the present application will be introduced below in combination with an actual application scenario.

[0044] FIG1 shows a schematic diagram of an image synthesis model determination scenario provided in an embodiment of the present application, wherein the server 100 is taken as the aforementioned computer device for illustration.

[0045] First, a training sample pair 20 and an initial synthesis model 10 for training the model are obtained. The training sample pair 20 includes a first sample image of the first modality and a second sample image of the second modality. The initial synthesis model 10 includes a first feature extraction sub-model 11 and a second feature extraction sub-model 12. The first feature extraction sub-model 11 includes N layers of first convolutional layers, and the second feature extraction sub-model 12 includes N layers of second convolutional layers. The first convolutional layer has an arrangement order according to the flow of data, and the first convolutional layer corresponds to layer numbers 1 to N according to the arrangement order. The second convolutional layer has an arrangement order according to the flow of data, and the second convolutional layer corresponds to layer numbers 1 to N according to the arrangement order. N is a positive integer greater than or equal to 1. Figure 1 takes N greater than 3 as an example for illustration.

[0046] Afterwards, the training sample pair 20 is input into the initial synthesis model 10. Specifically, the first sample image is input into the first feature extraction sub-model 11, and the second sample image is input into the second feature extraction sub-model 12. The i-th first convolutional layer in the first feature extraction sub-model 11 can output a first output feature determined based on the first sample image, and the i-th second convolutional layer in the second feature extraction sub-model 12 can output a second output feature determined based on the second sample image. i is a positive integer greater than or equal to 1 and less than or equal to N. The i-th first convolutional layer is one of the N first convolutional layers in the first feature extraction sub-model 11, and the i-th second convolutional layer is one of the N second convolutional layers in the second feature extraction sub-model 12.

[0047] Afterwards, the distribution difference between the first output feature and the second output feature in the feature distribution can be determined. The distribution difference can identify the modal difference between the first modality and the second modality. The larger the distribution difference, the less conducive it is to the subsequent cross-modal image synthesis between the first modality and the second modality through the image synthesis model. Based on this, the i-th distribution loss function can be constructed through the distribution difference. According to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, the layer parameters of the i-th first convolution layer and the i-th second convolution layer are adjusted, thereby training the image synthesis model 30 based on the initial synthesis model 10.

[0048] Through the above training, the impact of the modal difference between the first modality and the second modality on the image synthesis model can be reduced, and the transferability of effective features in cross-modal synthesis can be enhanced. When the image synthesis model performs cross-modal image synthesis, for example, when synthesizing the missing image of the second modality based on the target image of the first modality, based on the characteristic that the feature distribution difference under the two modalities is very small, the image features of the missing image can be accurately converted according to the output features of the target image, thereby synthesizing a missing image that is closer to the real one, thereby improving the image acquisition efficiency in multimodal scenarios.

[0049] FIG2 is a flow chart of a method for determining an image synthesis model provided in an embodiment of the present application. In this embodiment, a server is used as the aforementioned computer device for illustration. The method includes:

[0050] S101, obtaining training sample pairs.

[0051] In an embodiment of the present application, a training sample pair is used to train an initial synthesis model. The initial synthesis model includes a first feature extraction submodel and a second feature extraction submodel. The first feature extraction submodel is used to extract features of images of the first modality, and the second feature extraction submodel is used to extract features of images of the second modality. For this initial synthesis model, the training sample pair includes a first sample image of the first modality and a second sample image of the second modality, so that the first sample image is input into the first feature extraction submodel, and the second sample image is input into the second feature extraction submodel. Specifically, the first sample image can be denoted as X, and the second sample image can be denoted as Y.

[0052] The training sample pairs can be derived from a training sample set, which can include multiple training sample pairs. The multiple training sample pairs can be sequentially input into the initial synthesis model to train the initial synthesis model. Each training sample pair includes two sample images of different modalities. In the embodiment of the present application, a training sample pair including a first sample image and a second sample image is used as an example for illustration. Among them, images of different modalities of the target object are used to reflect the characteristics of different aspects of the target object. Images of multiple modalities can more comprehensively describe the target object. The target object can be, for example, a person, a scene, an object to be detected, etc. The images of different modalities of the target object can be, for example, images of different image styles of the target object, or images of different parameters of the target object. A modality can be used as a domain, and the image conversion between different modalities can also be called image conversion between different domains.

[0053] For example, magnetic resonance imaging (MRI) is a medical imaging technology used for medical diagnosis. MRI can produce multimodal images of a target object, from which various characteristic data of the target object can be obtained. Images of different modalities can be obtained using different image generation devices, which are detection devices. The target object can include the brain, spinal cord, heart and major blood vessels, joints and bones, soft tissue, and pelvic cavity. Taking the brain as an example, modality 1 images are used to obtain the brain's spin relaxation time T2, modality 2 images are used to obtain the brain's proton density (PD), modality 3 images are used to obtain the brain's MRI fluid attenuated inversion recovery (FLAIR) sequence, and modality 4 images are used to obtain the brain's lattice relaxation time T1. In addition, other modalities are used to obtain physical properties such as diffusion coefficient, magnetic susceptibility, and chemical shift.

[0054] However, multimodal images often need to be acquired through multiple channels, which consumes more manpower and material resources. In multimodal scenarios, synthesizing images of the missing modality through images of the existing modalities is an effective means of reducing manpower and material resource consumption. However, the images of the missing modality synthesized by related technologies are not accurate and difficult to meet the needs. For example, the synthesized image of the missing modality cannot accurately reflect the target object, resulting in the synthesized image being unusable and failing to achieve the purpose of reducing manpower and material resources. The initial synthesis model provided in the embodiment of the present application can be trained and converted into an image synthesis model. Through this image synthesis model, a missing image close to the real one can be obtained, thereby improving the image acquisition efficiency in multimodal scenarios.

[0055] Specifically, the training sample set comprising training sample pairs can include sample images generated by different image generation devices. This prevents overfitting of the initial synthesis model trained using the training sample set and reduces features resulting from differences between image generation devices, thereby improving the generalization of the initial synthesis model. For example, the training sample set may include multiple images of modality 1, each of which comes from device A and device B.

[0056] Specifically, the training sample set comprising training sample pairs can include sample images from different institutions. This prevents overfitting of the initial synthesis model trained using the training sample set, reduces the extraction of features resulting from operational differences between institutions, and improves the generalization of the initial synthesis model. For example, the training sample set includes multiple images of modality 1, each of which comes from Hospital C, Hospital D, and Research Institute E.

[0057] Specifically, the sample images in the training sample set, which includes training sample pairs, may include images of training target objects of the same category in different states. The category of the training target object can be determined based on the functionality of the image synthesis model. Training target objects of the same category can share the same image synthesis model. Examples of training target objects of the same category include people, animals, and scenery, and images of the same detection location. The state of the training target object can be determined based on the functionality of the image synthesis model. Images of the training target object in different states can share the same image synthesis model. For example, images of people in different standing positions can share the same detection location. For example, images of the brain in a healthy state and images of the brain with a brain tumor can share the same detection location. As an example, the training sample set includes a first subset and a second subset. The first subset includes images of the brain in a healthy state, and the second subset includes images of the brain with a brain tumor. The images of the brain in a healthy state can be from the publicly available IXI dataset, and the images of the brain with a brain tumor can be from the publicly available BraTS dataset.

[0058] When the first sample image and the second sample image are images based on the brain, the brain data can be split into multiple two-dimensional slice data. The first sample image can be an image corresponding to the two-dimensional slice data of the last two bottleneck layers, and the second sample image can also be an image corresponding to the two-dimensional slice data of the last two bottleneck layers.

[0059] During specific implementation, the first sample image and the second sample image belonging to the same training sample pair are generated based on the same type of training target object. They can be generated based on different training target objects or based on the same training target object. Images of different modalities generated based on the same training target object are more likely to extract deep information that is independent of the modality, which is beneficial to improving the image synthesis accuracy of the image synthesis model. For example, the first sample image and the second sample image are images of different modalities obtained by multiple detections of the same brain. Of course, since it is difficult to generate multimodal images based on the same training target object, in actual operations, multimodal images based on the same type of training target object are often used as the first sample image and the second sample image of the same training sample pair, which brings challenges to improving the accuracy of the model. The embodiment of the present application eliminates inter-domain differences by improving the transferability of inter-domain features, thereby solving the generalization dilemma of the multivariate nature of multimodal images.

[0060] S102: Input the first sample image and the second sample image in the training sample pair into the first feature extraction sub-model and the second feature extraction sub-model in the initial synthesis model respectively.

[0061] In the embodiment of the present application, the initial synthesis model can be used to implement a convolutional sparse coding algorithm, wherein the sparse coding (SC) algorithm is an image reconstruction technology based on an unsupervised method, which represents sample data more efficiently by finding a set of basis vectors. The purpose of the sparse coding algorithm is to find a set of "over-complete" basis vectors (over-complete dictionary, also known as dictionary) D so that the input vector (input signal) X i It can be expressed as a linear combination of these basis vectors, through the sparse coefficient d i The combination of basis vectors corresponding to each input vector can be represented. The sparse coefficient can be determined through training and reflected by the coefficients in the sparse coding algorithm. The input vector can be expressed as: X i =D*d i , where X i ∈R d×1 , which is a matrix with d rows and 1 column, D∈R d×m , which is a matrix with d rows and m columns, d i ∈Rm×1 , which is a matrix with m rows and one column. In sparse coding algorithms, by training two basis vectors corresponding to the source domain image and the target domain image, respectively, the sparse representations of the source and target domains are made equal. After the source domain image is sparsely represented, the target domain image can be synthesized by replacing the basis vectors corresponding to the source domain with the basis vectors corresponding to the target domain.

[0062] The convolutional sparse coding algorithm is a sparse coding algorithm implemented through convolutional layers. Compared with the sparse coding algorithm, the convolutional sparse coding algorithm can realize the combination of image features, can process global data, and is widely used in the learning of translation-invariant dictionaries in image processing. The convolutional sparse coding algorithm uses a sample-adaptive dictionary, where each filter is a linear combination of a set of basic filters learned from the data, which increases the flexibility of data calculation and allows the capture of a large number of sample-dependent patterns. It is more prominent when processing large or high-dimensional data sets. The model based on convolutional sparse coding can make the convolutional sparse coding algorithm have less computational time and space complexity through learning. In the convolutional sparse coding algorithm, an image with N pixels is used as the input vector X. The convolutional sparse coding algorithm is implemented through the filter D in the model. The filter includes m basic filters. The parameters of the m basic filters are used to reflect the sparse coefficients. The i-th basic filter d among the m basic filters i Feature extraction is performed on the small-size image n that matches the convolution kernel, and the basis vector Γ i is the i-th feature map, which is an image with the same size as the input vector X and corresponding to the i-th basic filter. The input vector can be expressed as:

[0063] Similarly, in the convolutional sparse coding algorithm, by training two basis vectors corresponding to the source domain image and the target domain image respectively, the sparse representations of the source domain and the target domain are made equal. Then, after the source domain image is sparsely represented, the basis vectors corresponding to the source domain are replaced with the basis vectors corresponding to the target domain to synthesize the target domain image.

[0064] The filter D in the convolutional sparse coding algorithm can be implemented by a convolutional layer, which serves as a convolutional filter. The initial synthesis model based on the convolutional sparse coding algorithm may include a first feature extraction sub-model and a second feature extraction sub-model. The first feature extraction sub-model is used to extract features of the image of the first modality, and the second feature extraction sub-model is used to extract features of the image of the second modality. The first feature extraction sub-model includes N layers of first convolutional layers, and the second feature extraction sub-model includes N layers of second convolutional layers, where N is an integer greater than or equal to 1, that is, the first feature extraction sub-model and the second feature extraction sub-model have the same number of convolutional layers.

[0065] Among them, when N is 1, the first feature extraction submodel includes 1 first convolution layer, and the second feature extraction submodel includes 1 second convolution layer. The features of the image of the first modality can be extracted through 1 first convolution layer, and the features of the image of the second modality can be extracted through 1 second convolution layer; when N is greater than 1, the first feature extraction submodel includes multiple layers of first convolution layers, and the second feature extraction submodel includes multiple layers of second convolution layers. The first convolution layer has an arrangement order according to the data flow direction, and the first convolution layer has a layer number corresponding to the arrangement order. The second convolution layer has an arrangement order according to the data flow direction, and the second convolution layer has a layer number corresponding to the arrangement order. The layer number of the first convolution layer and the layer number of the second convolution layer are both positive integers less than or equal to N. Then the output feature of the first convolution layer of the i-th layer is used as the first convolution layer of the i+1-th layer. The input features of the convolution layer, the output features of the second convolution layer of the i-th layer are used as the input features of the second convolution layer of the i+1-th layer, i is a positive integer less than or equal to N, the feature size of the output features of the first convolution layer of the i+1-th layer is smaller than the feature size of the output features of the first convolution layer of the i-th layer, the feature size of the output features of the second convolution layer of the i+1-th layer is smaller than the feature size of the output features of the second convolution layer of the i-th layer, the hierarchical structure of the first feature extraction sub-model enables the multi-layer first convolution layer therein to extract deeper features of the image of the first modality, and the hierarchical structure of the second feature extraction sub-model enables the multi-layer second convolution layer therein to extract deeper features of the image of the second modality, the multi-layer first convolution layer and the multi-layer second convolution layer can be used as convolution filters to take advantage of the depth and convey information in an increasingly compact manner.

[0066] For example, N can be 9, a batch normalization layer can be added after the first convolutional layer to promote convergence, a batch normalization layer can also be added after the second convolutional layer to promote convergence, a global spatial average pooling layer can be set after the last first convolutional layer, and a global spatial average pooling layer can be set after the last second convolutional layer. The sampling step size of the first convolutional layer and the second convolutional layer can be 2 to achieve spatial subsampling of the first sample image and the second sample image. For the initial synthesis model, 200 epochs can be set, the learning rate can be set to 0.0002, the batch size can be 32, the balance parameters are set to λ = 0.2, β = 1, and a Gaussian kernel is used in the equation with a bandwidth configured as the median pairwise squared distance.

[0067] In the embodiment of the present application, the training sample pair can be input into the initial synthesis model. Specifically, the first sample image can be input into the first feature extraction sub-model, and the second sample image can be input into the second feature extraction sub-model. The first convolution layer of the i-th layer can output the first output feature determined according to the first sample image, and the second convolution layer of the i-th layer can output the second output feature determined according to the second sample image. The first output feature can be recorded as Z x,i , the second output feature can be recorded as Zy,i , when i is 1, the first output feature can be recorded as Z x,1 , the second output feature can be recorded as Z y,1 The first convolutional layer of the i-th layer is used as a feature extractor, its operation function is represented by f, and the output result of the filter is represented by F. Then the first output feature can be expressed as: Z x,i =f(X,F x,i-1 ,λ), the second output feature can be expressed as: Z y,i =f(Y,F y,i-1 ,λ),λ is a constant, A feature representing a tensor attribute of height h and width w, Features representing attributes of a tensor of height h and width w.

[0068] In an embodiment of the present application, the first output feature and the second output feature can be processed by intra-domain standardization (IDS). See Figure 3, which is a schematic diagram of a model training provided in an embodiment of the present application. The difference in intra-domain features can be reduced through intra-domain standardization. The difference in intra-domain features is usually not conducive to the effective learning of features. Excessive learning of features with differences in the domain can easily lead to model overfitting. Accordingly, reducing the difference in intra-domain features can prevent model overfitting. The difference in intra-domain features may be caused by different image generation devices or by different image sources. For example, different hospitals use different scanning parameters to obtain different images. Different images have differences in features. Such differences in features are interference features for learning effective features.

[0069] Specifically, a first initial output feature of the first convolutional layer of the i-th layer and a second initial output feature of the second convolutional layer of the i-th layer can be obtained. The first initial output feature is mapped to a first image size through global normalization to obtain a first output feature corresponding to the first initial output feature. The second initial output feature is mapped to a second image size through global normalization to obtain a second output feature corresponding to the second initial output feature. The first image size can be the size of a unit sphere, and the second image size can also be the size of a unit sphere. This unifies the maximum norms of the first and second output features, eliminating scaling ambiguity between the first and second output features.

[0070] S103: construct an i-th distribution loss function according to the distribution difference between the first output feature of the i-th first convolutional layer and the second output feature of the i-th second convolutional layer in feature distribution.

[0071] In an embodiment of the present application, after obtaining the first output feature determined by the first convolutional layer of the i-th layer based on the first sample image and the second output feature determined by the second convolutional layer of the i-th layer based on the second sample image, the distribution difference between the first output feature and the second output feature in the feature distribution can be determined. Since the distribution difference can identify the modal difference between the first modality and the second modality, the greater the difference, the less conducive it is to the subsequent cross-modal image synthesis between the first modality and the second modality through the image synthesis model. Therefore, the i-th distribution loss function is constructed based on the distribution difference. The distribution loss function characterizes the size of the distribution difference. The larger the value of the distribution loss function, the greater the distribution difference, and the smaller the value of the distribution loss function, the smaller the distribution difference. Among them, the first output feature and the second output feature are features processed by IDS, see Figure 3.

[0072] Specifically, the first output feature and the second output feature can be mapped into the same feature space, and the difference in their feature distributions can be determined. The i-th distribution loss function can then be constructed based on the difference in distributions. The feature space can be a Hilbert space, and the difference in feature distributions can be determined using a two-sample test method such as maximum mean discrepancy (MMD) or a mean embedding test.

[0073] Narrowing the distribution difference between the first and second output features in feature distribution is an inter-domain adaptation (IDA) process that essentially reflects the invariant structure across modalities and effectively learns relevant sparse features from different domains. Through the IDA process, inter-domain differences can be narrowed in an unsupervised manner, thereby correcting misalignment and adjusting the model to better generalize different data sets and achieve the purpose of adaptation. Based on the maximum mean difference, the i-th distribution loss function can be determined as:

[0074] Among them, f i (X) is the first output feature, φ(f i (X)) is the feature distribution of the first output feature, f i (Y) is the second output feature, φ(f i (Y) is the feature distribution of the second output feature, is the expectation of the feature distribution of the first output feature, is the expected feature distribution of the second output feature, is the distribution difference between the first output feature and the second output feature in feature distribution.

[0075] S104: According to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer, and obtain the image synthesis model based on the initial synthesis model training.

[0076] Both sparse coding and convolutional sparse coding in related technologies can achieve image synthesis. However, since sparse coding and convolutional sparse coding only focus on the image features of their respective domains and do not consider the adaptive extraction of inter-domain features, the image features have poor transferability between different domains. Based on this, after constructing the i-th distribution loss function based on the distribution difference between the first output feature and the second output feature in the feature distribution, the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer can be adjusted according to the i-th distribution loss function with minimizing the distribution difference as the optimization goal, thereby training the initial synthesis model into an image synthesis model. The image synthesis model can be used for cross-modal image synthesis between the first modality and the second modality. That is, the transferability of convolutional sparse features can be enhanced and quantified through the distribution difference in feature distribution, and the transferability of convolutional sparse features can be improved by minimizing the distribution difference, generalizing the heterogeneous representation of features across modal images.

[0077] Since the distribution difference can identify the modal difference between the first modality and the second modality, the larger the difference, the less conducive it is to the subsequent cross-modal image synthesis between the first modality and the second modality through the image synthesis model. Therefore, minimizing the distribution difference is used as the optimization goal to adjust the layer parameters, which can reduce the impact of the modal difference between the first modality and the second modality on the image synthesis model and enhance the transferability of effective features in cross-modal synthesis. When the image synthesis model performs cross-modal image synthesis, for example, when synthesizing the missing image of the second modality based on the target image of the first modality, when the feature distribution difference between the two modalities is very small, the image features of the missing image are accurately converted according to the output features of the target image, thereby synthesizing a missing image that is closer to the real one, thereby improving the image acquisition efficiency in multimodal scenarios.

[0078] The above description takes the i-th first convolutional layer, the i-th second convolutional layer, and the i-th distribution loss function as an example. In actual operation, the layer numbers i of the first convolutional layer and the second convolutional layer that need parameter adjustment can be set in advance. According to the i-th distribution loss function, the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer are adjusted with minimizing the distribution difference as the optimization goal.

[0079] In actual operation, multiple distribution loss functions can also be set, and the multiple distribution loss functions correspond to multiple first convolutional layers, and also correspond to multiple second convolutional layers. The number of distribution loss functions can be equal to the number N of first convolutional layers and second convolutional layers, and N is greater than 1, that is, each first convolutional layer and each second convolutional layer can correspond to a distribution loss function, then the layer parameters of each first convolutional layer and each second convolutional layer can be adjusted to make the model have higher accuracy, see Figure 4, which is a schematic diagram of another model training provided in an embodiment of the present application, wherein the 1st first convolutional layer and the 1st second convolutional layer correspond to the 1st distribution loss function, the i-th first convolutional layer and the i-th second convolutional layer correspond to the i-th distribution loss function, and the N-th first convolutional layer and the N-th second convolutional layer correspond to the N-th distribution loss function, see Figure 5, which is a schematic diagram of another model training provided in an embodiment of the present application, wherein the first output feature and the second output feature are features that have passed IDS. Of course, the number of distribution loss functions can also be less than the number N of the first convolutional layers and the second convolutional layers, that is, some of the first convolutional layers and the second convolutional layers can correspond to distribution loss functions, and the layer parameters of multiple first convolutional layers and multiple second convolutional layers can be adjusted to make the model have higher accuracy.

[0080] When the number of distribution loss functions is equal to the number N of the first convolutional layer and the second convolutional layer, and N is greater than 1, the N first convolutional layers and the N second convolutional layers have a one-to-one correspondence with the N distribution loss functions, wherein the i-th distribution loss function among the N distribution loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer. Then, according to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer are adjusted. Specifically, according to the N distribution loss functions, with minimizing the distribution difference as the optimization goal, the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N distribution loss functions are adjusted, thereby obtaining an image synthesis model based on the initial synthesis model training.

[0081] In the process of obtaining the image synthesis model based on the initial synthesis model training, the layer parameters of the first convolution layer of the i-th layer and the second convolution layer of the i-th layer can also be adjusted through the mapping association relationship between the first output feature and the second output feature. Specifically, the first output feature can be converted into the feature corresponding to the second modality through the corresponding mapping matrix, as the conversion feature corresponding to the first convolution layer of the i-th layer, and the feature difference between the conversion feature and the second output feature is constructed according to the i-th association loss function. According to the i-th association loss function, the layer parameters of the first convolution layer of the i-th layer and the second convolution layer of the i-th layer are adjusted with minimizing the feature difference and the mapping matrix as the optimization target. Referring to Figure 6, a schematic diagram of another model training provided in an embodiment of the present application, the projection matrix (i.e., the above-mentioned mapping matrix), the first output feature, and the second output feature can be used to construct the i-th association loss function, and the layer parameters of the first convolution layer of the i-th layer and the second convolution layer of the i-th layer are adjusted according to the i association loss functions. Referring to Figure 7, a schematic diagram of another model training provided in an embodiment of the present application, the first output feature and the second output feature are features that have passed IDS.

[0082] The feature difference between the conversion feature and the second output feature reflects the feature correlation between the first output feature and the second output feature. The greater the feature difference, the worse the feature correlation, and the less conducive it is to cross-modal image synthesis between the first modality and the second modality through the image synthesis model. Since the above training improves the correlation of effective features in cross-modal synthesis, improves the consistency of the spatial relationship between the first output feature and the second output feature, and enhances the transferability of effective features in cross-modal synthesis, the image synthesis model can accurately convert the image features of the missing image according to the output features of the target image, thereby synthesizing a missing image that is closer to the real one.

[0083] The mapping matrix can be expressed as P, and the mapping matrix corresponding to the first convolutional layer of the i-th layer can be expressed as P i , from the previous discussion, we can see that the first output feature can be expressed as: Z x,i =f(X,F x,i-1 ,λ), the second output feature can be expressed as: Z y,i =f(Y,F y,i-1 ,λ), two independently learned sub-models will produce irrelevant features. Connecting the two sub-models in series will lead to the conversion of irrelevant features, which is likely to cause the loss of effective features and the increase of invalid features. Therefore, the joint optimization of the two sub-models can be achieved by constructing an associated loss function. The constructed i-th associated loss function can be expressed as:

[0084] Among them, α is a constant, P i Z x,iTo convert features, since the mapping matrix is ​​an additional parameter introduced, it needs to be minimized to reduce its impact on the model.

[0085] The above description takes the i-th first convolutional layer, the i-th second convolutional layer and the i-th associated loss function as examples. In actual operation, the layer numbers i of the first convolutional layer and the second convolutional layer that need parameter adjustment can be set in advance. According to the i-th associated loss function, the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer are adjusted with minimizing the feature difference and the mapping matrix as the optimization goal.

[0086] In actual operation, multiple associated loss functions can also be set, and the multiple associated loss functions correspond to multiple first convolutional layers, and also to multiple second convolutional layers. The number of associated loss functions can be equal to the number N of first convolutional layers and second convolutional layers, where N is greater than 1, that is, each first convolutional layer and each second convolutional layer can correspond to an associated loss function, then the layer parameters of each first convolutional layer and each second convolutional layer can be adjusted to make the model have higher accuracy; the number of associated loss functions can also be less than the number N of first convolutional layers and second convolutional layers, that is, some first convolutional layers and second convolutional layers can correspond to associated loss functions, then the layer parameters of multiple first convolutional layers and multiple second convolutional layers can be adjusted to make the model have higher accuracy.

[0087] When the number of associated loss functions is equal to the number N of the first convolutional layer and the second convolutional layer, and N is greater than 1, the N first convolutional layers and the N second convolutional layers have a one-to-one correspondence with the N associated loss functions, wherein the i-th associated loss function among the N associated loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer. Then, according to the i-th associated loss function, with minimizing the feature difference and the mapping matrix as the optimization target, the layer parameters of the i-th first convolutional layer and the i-th convolutional layer are adjusted. Specifically, according to the N associated loss functions, with minimizing the distribution difference and the mapping matrix as the optimization target, the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N associated loss functions are adjusted, thereby training the initial synthesis model into an image synthesis model.

[0088] In summary, we can minimize the i-th distribution loss function Minimize the i-th associated loss function To adjust the layer parameters of the i-th first convolutional layer and the layer parameters of the i-th second convolutional layer, the overall goal can be expressed as a new minimax function:

[0089] Where β is a constant.

[0090] In one possible implementation, an embodiment of the present application provides a method for performing image synthesis using an image synthesis model. The method includes:

[0091] S201: Acquire a target image of a source modality of a target object.

[0092] S202: Based on the target image, synthesize the missing image of the target modality through the image synthesis model.

[0093] In an embodiment of the present application, the trained image synthesis model has the ability to synthesize an image of the second modality using an image of the first modality, and also has the ability to synthesize an image of the first modality using an image of the second modality. Therefore, the target image of the source modality of the target object can be obtained, and the missing image of the target modality can be synthesized by the image synthesis model. See Figure 8, which is an image synthesis schematic diagram provided by an embodiment of the present application, wherein the image synthesis model 30 can be configured in a server, the acquisition of the target image can be achieved through a terminal connected to the server, and the missing image can be sent to the terminal connected to the server. When the source modality is the first modality, the target modality is the second modality, that is, based on the target image of the first modality, the missing image of the second modality can be synthesized by the image synthesis model. Correspondingly, when the source modality is the second modality, the target modality is the first modality, that is, based on the target image of the second modality, the missing image of the first modality can be synthesized by the image synthesis model.

[0094] According to the target image, the missing image of the target modality is synthesized through the image synthesis model. Specifically, the target image is input into the feature extraction sub-model corresponding to the source modality in the image synthesis model, and the target output features of the Nth convolutional layer in the feature extraction sub-model corresponding to the source modality are converted into the features to be synthesized of the target modality. Then, according to the features to be synthesized, the missing image is synthesized through the Nth convolutional layer in the feature extraction sub-model corresponding to the target modality.

[0095] Specifically, when the source modality is the first modality and the target modality is the second modality, the target image is input into the first feature extraction submodel corresponding to the first modality in the image synthesis model. The target output features of the first convolutional layer of the Nth layer in the first feature extraction submodel are converted into features to be synthesized for the second modality. Then, based on the features to be synthesized, the missing image is synthesized using the second convolutional layer of the Nth layer in the second feature extraction submodel corresponding to the second modality. For example, if the first modality is modality 4, which is used to obtain the lattice relaxation time T1 of the brain, and the second modality is modality 1, which is used to obtain the spin relaxation time T2 of the brain, the image of modality 1 can be synthesized based on the image of modality 4.

[0096] Specifically, when the source modality is the second modality and the target modality is the first modality, the target image is input into the second feature extraction sub-model corresponding to the second modality in the image synthesis model, and the target output features of the second convolutional layer of the Nth layer in the second feature extraction sub-model are converted into features to be synthesized of the first modality, and then according to the features to be synthesized, the missing image is synthesized through the first convolutional layer of the Nth layer in the first feature extraction sub-model corresponding to the first modality.

[0097] Before synthesizing the missing image of the target modality through the image synthesis model, the image synthesis model can also be verified. The verification of the image synthesis model can be achieved through a test sample pair, which includes a third sample image of the first modality and a fourth sample image of the second modality. The third sample image and the fourth sample image are generated based on the same test target object and are well aligned. The third sample image and the fourth sample image are used as basic facts and can be used to verify the quality of the synthesis result of the image synthesis model. The test sample pair can be derived from a test sample set, which can include sample images generated by different image generation devices, sample images from different institutions, and images of the same category of test target objects in different states.

[0098] The test sample set and the training sample set can have the same source, and the data of the two sets do not overlap. For example, among 578 healthy brain images, 80 can be extracted as test samples, and the rest as training samples; among 225 brain images with brain tumors, 45 can be extracted as test samples, and the rest as test samples; or, among 578 healthy brain images, 60 can be extracted as test samples, and the rest as training samples; among 225 brain images with brain tumors, 20 can be extracted as test samples, and the rest as test samples.

[0099] Taking the conversion of the image of the brain in a healthy state from the image of modality 2 for obtaining the PD of the brain to the image of modality 1 for obtaining the T2 of the brain, and the conversion from the image of modality 1 to the image of modality 2 as an example, the peak signal-to-noise ratio (PSNR) and the structural similarity index (SSIM) are used to represent the comparison results. See Figure 9, which is a schematic diagram of a model verification provided by an embodiment of the present application, wherein Figures 9A and 9C show a test sample pair, Figure 9A is the input image of modality 1, Figure 9C is the real image of modality 2 corresponding to the input image, and Figure 9B is the image of modality 2 synthesized by the image synthesis model. It can be seen from the figure that the image synthesized by the image synthesis model and the real image have a high degree of similarity. See Table 1, which is an example of a test result provided by an embodiment of the present application.

[0100] Table 1 An example of test results

[0101] As can be seen from the table, when image conversion is performed through the convolutional sparse network, the PSNR and SSIM are both low. After IDS or IDA, the PSNR and SSIM are improved, and after IDS and IDA, the PSNR and SSIM reach the highest.

[0102] Of course, it is also possible to verify the conversion from the image of modality 3 used to obtain the FLAIR of the brain to the image of modality 4 used to obtain the T1 of the brain in the brain image of the brain in the brain tumor state. See Figure 10, which is another model verification schematic diagram provided for an embodiment of the present application, wherein Figures 10A and 10C show a test sample pair, Figure 10A is the input image of modality 3, Figure 10C is the real image of modality 4 corresponding to the input image, and Figure 10B is the image of modality 4 synthesized by the image synthesis model. It can be seen from the figure that the image synthesized by the image synthesis model and the real image have a high degree of similarity.

[0103] Based on the aforementioned method embodiment, FIG11 is a device structure diagram of a device for determining an image synthesis model provided in an embodiment of the present application. The device 1100 for determining an image synthesis model includes:

[0104] A sample pair acquiring unit 1101 is configured to acquire a training sample pair, wherein the training sample pair includes a first sample image of a first modality and a second sample image of a second modality;

[0105] a sample pair input unit 1102, configured to input the first sample image and the second sample image in the training sample pair into a first feature extraction sub-model and a second feature extraction sub-model in an initial synthesis model, respectively, wherein the first feature extraction sub-model includes N first convolutional layers, and the second feature extraction sub-model includes N second convolutional layers, where N is an integer greater than or equal to 1;

[0106] a distribution loss function determining unit 1103 for constructing an i-th distribution loss function based on a distribution difference in feature distribution between a first output feature of the i-th first convolutional layer and a second output feature of the i-th second convolutional layer, where i is a positive integer less than or equal to N;

[0107] The layer parameter adjustment unit 1104 is used to adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer according to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, and obtain an image synthesis model based on the initial synthesis model training. The image synthesis model is used to perform cross-modal image synthesis between the first modality and the second modality.

[0108] Optionally, the device further includes:

[0109] an initial feature acquisition unit, configured to acquire the first initial output feature of the i-th first convolutional layer and the second initial output feature of the i-th second convolutional layer before constructing the i-th distribution loss function based on the distribution difference in feature distribution between the first output feature of the i-th first convolutional layer and the second output feature of the i-th second convolutional layer;

[0110] A mapping unit is used to map the first initial output feature to a first image size through global normalization to obtain the first output feature corresponding to the first initial output feature; and map the second initial output feature to a second image size through global normalization to obtain the second output feature corresponding to the second initial output feature.

[0111] Optionally, the distribution loss function determining unit includes:

[0112] a space mapping unit, configured to determine the distribution difference by mapping the first output feature and the second output feature into a same feature space;

[0113] The distribution loss function determination subunit is used to construct an i-th distribution loss function according to the distribution difference.

[0114] Optionally, when N≥2, the first output feature is the input feature of the first convolutional layer of the i+1th layer, the second output feature is the input feature of the second convolutional layer of the i+1th layer, the feature size of the output feature of the first convolutional layer of the i+1th layer is smaller than the feature size of the first output feature, and the feature size of the output feature of the second convolutional layer of the i+1th layer is smaller than the feature size of the second output feature.

[0115] Optionally, the N first convolutional layers and the N second convolutional layers each have a one-to-one correspondence with N distribution loss functions, wherein the i-th distribution loss function among the N distribution loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer;

[0116] The layer parameter adjustment unit is specifically used for:

[0117] According to the N distribution loss functions, with minimizing the distribution difference as the optimization goal, the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N distribution loss functions are adjusted, and an image synthesis model is obtained based on the initial synthesis model training.

[0118] Optionally, the device further includes:

[0119] an association loss function determining unit, configured to construct an i-th association loss function according to a feature difference between a conversion feature corresponding to the i-th first convolutional layer and the second output feature during a process of obtaining the image synthesis model through training based on the initial synthesis model, wherein the conversion feature is a feature corresponding to the second modality converted from the first output feature through a corresponding mapping matrix;

[0120] The optimization unit is further used to adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer according to the i-th association loss function, with minimizing the feature difference and the mapping matrix as the optimization target.

[0121] Optionally, when N ≥ 2, the N first convolutional layers and the N second convolutional layers each have a one-to-one correspondence with N association loss functions, wherein the i-th association loss function among the N association loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer;

[0122] The optimization unit is specifically used for:

[0123] In the process of obtaining the image synthesis model based on the initial synthesis model training, according to the N associated loss functions, the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N associated loss functions are adjusted with minimizing the feature difference and the mapping matrix as the optimization goal.

[0124] Optionally, the training sample pairs are derived from a training sample set, the training sample set includes sample images generated by different image generating devices, and the sample images include images of training target objects of the same category in different states.

[0125] Optionally, the first sample image and the second sample image are generated based on the same training target object.

[0126] Optionally, the device further includes:

[0127] an image acquisition unit, configured to acquire a target image of a source modality of a target object;

[0128] an image synthesis unit, configured to synthesize the target image using the image synthesis model to obtain a missing image of the target modality;

[0129] When the source modality is the first modality, the target modality is the second modality; or, when the source modality is the second modality, the target modality is the first modality.

[0130] Optionally, the image synthesis unit includes:

[0131] An image input unit, configured to input the target image into a feature extraction sub-model corresponding to the source modality in the image synthesis model;

[0132] A feature conversion unit, configured to convert the target output features of the Nth convolutional layer in the feature extraction sub-model corresponding to the source modality into features to be synthesized of the target modality;

[0133] An image synthesis subunit is used to synthesize the missing image through the Nth convolution layer in the feature extraction submodel corresponding to the target modality according to the features to be synthesized.

[0134] It can be seen that after obtaining the training sample pair, the training sample pair can be input into the initial synthesis model, wherein the training sample pair includes a first sample image of the first modality and a second sample image of the second modality, and the initial synthesis model includes a first feature extraction sub-model for processing the first sample image and a second feature extraction sub-model for processing the second sample image, the first feature extraction sub-model includes N layers of first convolutional layers, and the second feature extraction sub-model includes N layers of second convolutional layers, wherein the i-th first convolutional layer can output a first output feature determined according to the first sample image, and the i-th second convolutional layer can output a second output feature determined according to the second sample image, and determine the distribution difference in feature distribution between the first output feature and the second output feature. Since the distribution difference can identify the modal difference between the first modality and the second modality, the larger the modal difference is, the more unfavorable it is for the subsequent use of the image synthesis model to perform the first Cross-modal image synthesis between one modality and the second modality, so the i-th distribution loss function is constructed through the distribution difference. According to the i-th distribution loss function, with minimizing the distribution difference as the optimization goal, the layer parameters of the i-th first convolution layer and the i-th second convolution layer are adjusted, so that the image synthesis model is obtained based on the initial synthesis model training. Since the above training reduces the influence of the modality difference between the first modality and the second modality on the image synthesis model, the transferability of effective features in cross-modal synthesis is enhanced. When the image synthesis model performs cross-modal image synthesis, for example, when synthesizing the missing image of the second modality based on the target image of the first modality, based on the characteristic that the feature distribution difference under the two modalities is very small, the image features of the missing image are accurately converted according to the output features of the target image, thereby synthesizing a missing image that is closer to the real one, thereby improving the image acquisition efficiency in multimodal scenarios.

[0135] The present application also provides a computer device, which is the aforementioned computer device and may include a terminal device or a server. The aforementioned image synthesis model determination device may be configured in the computer device. The computer device is described below with reference to the accompanying drawings.

[0136] If the computer device is a terminal device, as shown in FIG12 , an embodiment of the present application provides a terminal device, taking a mobile phone as an example:

[0137] FIG12 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to FIG12 , the mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will appreciate that the mobile phone structure shown in FIG12 does not limit the mobile phone and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0138] The following is a detailed introduction to the various components of the mobile phone in conjunction with Figure 12:

[0139] The RF circuit 1410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1480 for processing. In addition, the designed uplink data is sent to the base station.

[0140] Memory 1420 can be used to store software programs and modules. Processor 1480 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1420. Memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0141] The input unit 1430 may be configured to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .

[0142] The display unit 1440 may be configured to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441 .

[0143] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.

[0144] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.

[0145] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1470, providing users with wireless broadband Internet access.

[0146] The processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.

[0147] The mobile phone also includes a power supply 1490 (such as a battery) for supplying power to various components.

[0148] In this embodiment, the processor 1480 included in the terminal device is also used to execute the method for determining the image synthesis model provided in the embodiment of the present application.

[0149] If the computer device is a server, an embodiment of the present application also provides a server, as shown in Figure 13, which is a structural diagram of a server 1500 provided in an embodiment of the present application. The server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be temporary storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.

[0150] The server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,LinuxTM , FreeBSD TM etc.

[0151] The steps executed by the server in the above embodiment may be based on the server structure shown in FIG13 .

[0152] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.

[0153] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.

[0154] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0155] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.

[0156] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Moreover, based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for determining an image synthesis model, performed by a computer device, the method comprising: Acquire a training sample pair, wherein the training sample pair includes a first sample image of a first modality and a second sample image of a second modality; Inputting the first sample image and the second sample image in the training sample pair into a first feature extraction sub-model and a second feature extraction sub-model in an initial synthesis model, respectively, wherein the first feature extraction sub-model includes N first convolutional layers, and the second feature extraction sub-model includes N second convolutional layers, where N is an integer greater than or equal to 1; According to the distribution difference between the first output feature of the first convolutional layer of the i-th layer and the second output feature of the second convolutional layer of the i-th layer in feature distribution, construct the i-th distribution loss function, where i is a positive integer less than or equal to N; According to the i-th distribution loss function, taking minimizing the distribution difference as the optimization goal, adjusting the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer, and obtaining an image synthesis model based on the initial synthesis model training, wherein the image synthesis model is used to perform cross-modal image synthesis between the first modality and the second modality.

2. According to the method of claim 1, before constructing the i-th distribution loss function based on the distribution difference between the first output feature of the i-th first convolutional layer and the second output feature of the i-th second convolutional layer in feature distribution, the method further comprises: Obtaining a first initial output feature of the i-th first convolutional layer and a second initial output feature of the i-th second convolutional layer; Mapping the first initial output feature to a first image size through global normalization to obtain the first output feature corresponding to the first initial output feature; The second initial output feature is mapped to a second image size through global normalization to obtain the second output feature corresponding to the second initial output feature.

3. The method according to claim 1, wherein constructing the i-th distribution loss function according to the distribution difference between the first output feature of the i-th first convolutional layer and the second output feature of the i-th second convolutional layer in feature distribution comprises: Determining the distribution difference by mapping the first output feature and the second output feature into the same feature space; An i-th distribution loss function is constructed according to the distribution difference.

4. According to the method of claim 1, when N≥2, the first output feature is the input feature of the first convolutional layer of the i+1th layer, the second output feature is the input feature of the second convolutional layer of the i+1th layer, the feature size of the output feature of the first convolutional layer of the i+1th layer is smaller than the feature size of the first output feature, and the feature size of the output feature of the second convolutional layer of the i+1th layer is smaller than the feature size of the second output feature.

5. According to the method of claim 4, the N first convolutional layers and the N second convolutional layers each have a one-to-one correspondence with N distribution loss functions, wherein: The i-th distribution loss function among the N distribution loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer; The method further comprises: adjusting the layer parameters of the i-th first convolution layer and the i-th second convolution layer according to the i-th distribution loss function and taking minimizing the distribution difference as an optimization target, and obtaining an image synthesis model based on the initial synthesis model training, including: According to the N distribution loss functions, taking minimizing the distribution difference as the optimization goal, adjusting the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N distribution loss functions, and obtaining the image synthesis model based on the initial synthesis model training.

6. According to any one of claims 1 to 5, in the process of obtaining the image synthesis model based on the initial synthesis model training, the method further comprises: Constructing an i-th association loss function according to a feature difference between a conversion feature corresponding to the i-th first convolutional layer and the second output feature, wherein the conversion feature is a feature corresponding to the second modality converted by a corresponding mapping matrix according to the first output feature; According to the i-th associated loss function, the layer parameters of the i-th first convolution layer and the i-th second convolution layer are adjusted with minimization of the feature difference and the mapping matrix as an optimization target.

7. The method according to claim 6, when N ≥ 2, the N first convolutional layers and the N second convolutional layers each have a one-to-one correspondence with N associated loss functions, wherein: The i-th association loss function among the N association loss functions corresponds to the i-th first convolutional layer and the i-th second convolutional layer; The step of adjusting the layer parameters of the i-th first convolution layer and the i-th second convolution layer according to the i-th association loss function with minimizing the feature difference and the mapping matrix as an optimization target comprises: According to the N associated loss functions, the layer parameters of the N first convolutional layers and the N second convolutional layers corresponding to the N associated loss functions are adjusted with minimization of the feature difference and the mapping matrix as an optimization target.

8. According to the method of claim 1, the training sample pairs are derived from a training sample set, the training sample set includes sample images generated by different image generating devices, and the sample images include images of training target objects of the same category in different states.

9. According to the method of claim 1 or 8, the first sample image and the second sample image are generated based on the same training target object.

10. The method according to claim 1, further comprising: Obtain a target image of a source modality of a target object; According to the target image, synthesizing the missing image of the target modality through the image synthesis model; When the source modality is the first modality, the target modality is the second modality; or, when the source modality is the second modality, the target modality is the first modality.

11. The method according to claim 10, wherein synthesizing the missing image of the target modality by using the image synthesis model according to the target image comprises: Inputting the target image into the feature extraction sub-model corresponding to the source modality in the image synthesis model; Convert the target output features of the Nth convolutional layer in the feature extraction sub-model corresponding to the source modality into features to be synthesized of the target modality; According to the features to be synthesized, the missing image is synthesized through the Nth convolutional layer in the feature extraction sub-model corresponding to the target modality.

12. A device for determining an image synthesis model, the device comprising: A sample pair acquisition unit, configured to acquire a training sample pair, wherein the training sample pair includes a first sample image of a first modality and a second sample image of a second modality; A sample pair input unit, used to input the first sample image and the second sample image in the training sample pair into a first feature extraction sub-model and a second feature extraction sub-model in an initial synthesis model, respectively, wherein the first feature extraction sub-model includes N first convolutional layers, and the second feature extraction sub-model includes N second convolutional layers, where N is an integer greater than or equal to 1; A distribution loss function determination unit, configured to construct an i-th distribution loss function according to a distribution difference between a first output feature of an i-th first convolutional layer and a second output feature of an i-th second convolutional layer in feature distribution, where i is a positive integer less than or equal to N; A layer parameter adjustment unit is used to adjust the layer parameters of the i-th first convolutional layer and the i-th second convolutional layer according to the i-th distribution loss function, with minimizing the distribution difference as an optimization goal, and obtain an image synthesis model based on the initial synthesis model training. The image synthesis model is used to perform cross-modal image synthesis between the first modality and the second modality.

13. A computer device, comprising a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the method for determining the image synthesis model described in any one of claims 1-11 according to the instructions in the program code.

14. A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is used to execute the method for determining an image synthesis model as described in any one of claims 1 to 11.

15. A computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method for determining an image synthesis model according to any one of claims 1 to 11.