Image processing methods, model training methods, equipment, media and products

The trained generative network extracts the core characteristics of the disease in medical images and generates random anonymous features with high similarity, and performs fusion processing, solving the technical difficulties of anonymous blurring of medical images data and achieving effective protection of patient privacy.

CN118213048BActive Publication Date: 2024-11-05TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410337026.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-11-20
Filing Date
2024-03-22
Publication Date
2024-11-05
Estimated Expiration
2044-03-22

AI Technical Summary

Technical Problem

The prior art cannot accurately perform anonymous blurring of medical imaging data, which poses a risk of leaking patient privacy.

Method used

By obtaining the trained generative network, including encoding network, random sampling network and decoding network, the core features of the disease in medical images and the random anonymous features with high similarity to non-core features, fusion and decoding processing are performed to generate anonymous medicine image.

Benefits of technology

It realizes that while retaining the core characteristics of the disease, blurring non-core characteristics, accurately performing anonymous blurring of medical imaging data, and protecting patient privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118213048B_ABST
    Figure CN118213048B_ABST
Patent Text Reader

Abstract

The present application provides an image processing method, a model training method, a device, a medium and a product. The method includes: obtaining a trained generation network, the trained generation network includes: a trained encoding network, a trained random sampling network and a trained decoding network; using the trained encoding network to extract and output the real disease core features in the real medical image; using the trained random sampling network to generate and output random anonymous features based on random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; inputting the real disease core features and the random anonymous features into the trained decoding network, and using the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate and output anonymous medical images. The present application can accurately perform anonymous fuzzification processing on medical image data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on November 20, 2023, with application number 202311548284.3 and application name “Image processing method, device, equipment and storage medium”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of machine learning technology, and in particular to an image processing method, a model training method, a device, a medium and a product. Background Art

[0003] Medical imaging data is one of the most diagnostically valuable, widely used and reliable medical data. It can intuitively reflect the patient's physical health status and is conducive to the diagnosis and treatment of various diseases. However, only a sufficient amount of medical imaging data can support the training of high-accuracy artificial intelligence discrimination models. In the case of insufficient amount of real medical imaging data, synthetic data can be generated from real medical imaging data and random noise data by generating artificial intelligence models to support the training of high-accuracy artificial intelligence discrimination models.

[0004] At present, when using synthetic data generated by generative artificial intelligence models, people usually only focus on the ability of generative artificial intelligence models to generate synthetic data. Therefore, the synthetic data generated by the generative artificial intelligence models may retain some patients' privacy characteristics, and the patient's identity cannot be anonymized and blurred, which poses a risk of leaking patient privacy.

[0005] In summary, the existing technology has the problem of being unable to accurately perform anonymous fuzzy processing on medical imaging data. Summary of the invention

[0006] The present application provides an image processing method, a model training method, a device, a medium and a product to solve the problem in the prior art that medical image data cannot be accurately anonymized and fuzzified.

[0007] In a first aspect, the present application provides an image processing method, comprising: obtaining a trained generation network, the trained generation network comprising: a trained encoding network, a trained random sampling network and a trained decoding network; inputting a real medical image into the trained encoding network, and using the trained encoding network to extract and output the real disease core features in the real medical image; inputting random noise data into the trained random sampling network, and using the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; inputting the real disease core features and the random anonymous features into the trained decoding network, and using the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate and output an anonymous medical image.

[0008] In a second aspect, the present application provides a model training method, including: obtaining a training data set and a preset generation network; the training data set includes multiple medical image samples of multiple types of diseases; the preset generation network includes: a preset encoding network, a preset random sampling network and a preset decoding network; using the training data set to perform overall training on the preset generation network until the loss value of the preset generation network is less than or equal to a first loss threshold, or until the number of training times of the preset generation network reaches a first number threshold, to obtain a trained generation network; the trained generation network generates random sampling features corresponding to each medical image sample based on random noise data, which are similar to non-core features of sample diseases in each medical image sample. The degree is greater than the first similarity threshold; or, the preset codec combination network and the preset random sampling network are trained in sequence using the training data set to obtain an intermediate codec combination network and an intermediate random sampling network; the preset codec combination network includes a preset encoding network and a preset decoding network; the intermediate codec combination network includes an intermediate encoding network and an intermediate decoding network; the intermediate codec combination network and the random sampling network are used to form an intermediate generation network; the intermediate generation network is trained as a whole using the training data set until the loss value of the intermediate generation network is less than or equal to the second loss threshold, or until the number of training times of the intermediate generation network reaches the second number threshold, to obtain a trained generation network.

[0009] In a third aspect, the present application provides an image processing device, comprising: an acquisition module, an encoding module, a random sampling module and a decoding module; the acquisition module is used to acquire a trained generation network, and the trained generation network includes: a trained encoding network, a trained random sampling network and a trained decoding network; the encoding module is used to input a real medical image into the trained encoding network, and use the trained encoding network to extract and output the real disease core features in the real medical image; the random sampling module is used to input random noise data into the trained random sampling network, and use the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; the decoding module is used to input the real disease core features and the random anonymous features into the trained decoding network, and use the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate an anonymous medical image and output it.

[0010] In a fourth aspect, the present application provides a model training device, including an acquisition module, a first overall training module, and / or a separate training module, a composition module, and a second overall training module; the acquisition module is used to acquire a training data set and a preset generation network; the training data set includes multiple medical image samples of multiple types of diseases; the preset generation network includes: a preset encoding network, a preset random sampling network, and a preset decoding network; the first overall training module is used to use the training data set to perform overall training on the preset generation network until the loss value of the preset generation network is less than or equal to a first loss threshold, or until the number of training times of the preset generation network reaches a first number threshold, to obtain a trained generation network; the trained generation network generates random sampling features corresponding to each medical image sample based on random noise data, and compares them with each The similarity of non-core features of sample diseases in medical image samples is greater than a first similarity threshold; the separate training modules are used to use the training data set to train the preset codec combination network and the preset random sampling network in sequence to obtain an intermediate codec combination network and an intermediate random sampling network; the preset codec combination network includes a preset encoding network and a preset decoding network; the intermediate codec combination network includes an intermediate encoding network and an intermediate decoding network; the composition module is used to use the intermediate codec combination network and the random sampling network to form an intermediate generation network; the second overall training module is used to use the training data set to perform overall training on the intermediate generation network until the loss value of the intermediate generation network is less than or equal to the second loss threshold, or until the number of training times of the intermediate generation network reaches the second number threshold, to obtain a trained generation network.

[0011] In a fifth aspect, the present application provides an electronic device, comprising: a memory, and at least one processor communicatively connected to the memory;

[0012] Memory is used to store computer executable instructions;

[0013] At least one processor executes the computer-executable instructions stored in the memory to implement the method of the first aspect and / or the second aspect.

[0014] In a sixth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the first aspect and / or the second aspect.

[0015] In a seventh aspect, the present application provides a computer program product, comprising a computer program, which implements the method of the first aspect and / or the second aspect when executed by a processor.

[0016] The image processing method, model training method, device, medium and product provided by the present application are obtained by obtaining a trained generation network, and the trained generation network includes: a trained encoding network, a trained random sampling network and a trained decoding network; a real medical image is input into the trained encoding network, and the trained encoding network is used to extract and output the real disease core features in the real medical image; random noise data is input into the trained random sampling network, and the trained random sampling network is used to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; the real disease core features and the random anonymous features are input into the trained decoding network, and the trained decoding network is used to fuse and decode the real disease core features and the random anonymous features to generate and output anonymous medical images. Since the trained encoding network can extract and output the core features of the real disease in the real medical image, the trained random sampling network can generate and output random anonymous features based on random noise data, the trained decoding network can fuse and decode the core features of the real disease and the random anonymous features to obtain anonymous medical features, and the similarity between the random anonymous features and the non-core features of the real disease in the real medical image is greater than the first similarity threshold, therefore, the trained decoding network is used to fuse and decode the core features of the real disease and the random anonymous features, so as to generate an anonymous medical image that retains the core features of the real disease and blurs the non-core features of the real disease, thereby realizing accurate anonymous fuzzification processing of medical image data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] Figure 1A schematic diagram of the process of the image processing method provided in the first embodiment of the present application;

[0019] Figure 2 A schematic diagram of the structure of a trained generation network provided in Example 1 of the present application;

[0020] Figure 3 A schematic diagram of the structure of a trained coding network provided in Example 1 of the present application;

[0021] Figure 4 Another structural diagram of a trained coding network provided in Example 1 of the present application

[0022] Figure 5 A schematic diagram of the structure of a trained random sampling network provided in Example 1 of the present application;

[0023] Figure 6 A schematic diagram of the structure of a trained denoising sub-network provided in Example 1 of the present application;

[0024] Figure 7 Another structural schematic diagram of a trained denoising sub-network provided in Example 1 of the present application;

[0025] Figure 8 A schematic diagram of the structure of a trained decoding network provided in Example 1 of the present application;

[0026] Fig. 9 A flowchart of the model training method provided in Example 2 of the present application;

[0027] Fig.10 A flowchart of the model training method provided in Example 3 of the present application;

[0028] Fig.11 A flowchart of the model training method provided in Example 4 of the present application;

[0029] Fig.12 A schematic diagram of the structure of an image processing device provided in Embodiment 5 of the present application;

[0030] Fig.13 A schematic diagram of the structure of the model training device provided in Example 5 of the present application;

[0031] Fig.14 This is a schematic diagram of the structure of an electronic device provided in Example 6 of the present application.

[0032] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0033] The terms "first", "second", "third", etc. in the description and claims of the embodiments of the present invention and the drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein.

[0034] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements explicitly listed but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.

[0035] The terms "and / or", "and / or", "including at least one of the following", etc. may be interpreted as inclusive, or mean any one or any combination. For example, "including at least one of the following: A, B, C" means "any one of the following: A; B; C; A and B; A and C; B and C; A and B and C", and for another example, "A and / or B" or "A and / or B" means any one of the following: A; B; A and B.

[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0037] First, the prior art involved in this application is described in detail.

[0038] Medical imaging data is one of the most diagnostically valuable, widely reliable data in medical data. It can directly reflect the patient's physical health status and is conducive to the diagnosis and treatment of various diseases. However, only a sufficient amount of medical imaging data can support the training of high-accuracy artificial intelligence discrimination models. In the case of insufficient amount of real medical imaging data, it can be solved by generating artificial intelligence models to generate synthetic data.

[0039] However, at present, conventional data anonymity fuzzification technology is not suitable for anonymizing medical imaging data. For example, the k-anonymity algorithm can only be applied to features with specific physical meanings and cannot be applied to high-dimensional medical imaging data. Although differential privacy algorithms can be applied to medical imaging data, if the added noise is small, the privacy features cannot be effectively blurred. If the added noise is large, the disease characteristics in the medical imaging data will be destroyed. Therefore, when using synthetic data generated by generative artificial intelligence models, synthetic data is usually generated based on real medical imaging data and random noise data, and only the ability of generative artificial intelligence models to generate synthetic data is focused. Therefore, the synthetic data generated by the generative artificial intelligence model may retain some of the privacy features of the patient, and the patient identity cannot be anonymously blurred, which poses a risk of leaking patient privacy.

[0040] In summary, the existing technology has the problem of being unable to accurately perform anonymous fuzzy processing on medical imaging data.

[0041] In response to the above problems in the prior art, the present application proposes the following inventive concept: since real medical imaging data contains not only disease core features related to the disease, but also disease non-core features unrelated to the disease, and features related to the patient's privacy information often exist in the disease non-core features, therefore, if the disease core features can be retained and replaced with random features that are highly similar to the non-core features, then the patient's identity can be anonymized while retaining the disease features in the medical imaging data.

[0042] Based on the above concept, the technical solution of the present application obtains a trained generation network, and the trained generation network includes: a trained encoding network, a trained random sampling network and a trained decoding network; inputs a real medical image into the trained encoding network, and uses the trained encoding network to extract and output the real disease core features in the real medical image; inputs random noise data into the trained random sampling network, and uses the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; inputs the real disease core features and the random anonymous features into the trained decoding network, and uses the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate an anonymous medical image and output it. Since the trained encoding network can extract and output the core features of the real disease in the real medical image, the trained random sampling network can generate and output random anonymous features based on random noise data, the trained decoding network can fuse and decode the core features of the real disease and the random anonymous features to obtain anonymous medical features, and the similarity between the random anonymous features and the non-core features of the real disease in the real medical image is greater than the first similarity threshold, therefore, the trained decoding network is used to fuse and decode the core features of the real disease and the random anonymous features, so as to generate an anonymous medical image that retains the core features of the real disease and blurs the non-core features of the real disease, thereby realizing accurate anonymous fuzzification processing of medical image data.

[0043] The image processing method provided in this application is intended to solve the above technical problems in the prior art.

[0044] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0045] In an embodiment of the present application, the generation network may also be referred to as a generation network model, the encoding network may also be referred to as a feature extraction encoding module, the random sampling network may be referred to as a random sampling module, and the decoding network may also be referred to as a feature decoding generation module.

[0046] Medical imaging may also be referred to as medical imaging.

[0047] Real medical images may also be referred to as: real images, original real medical image data, real medical image data, real patient medical images or original real patient medical image data, original data.

[0048] Disease core features refer to features related to disease diagnosis and treatment. True disease core features are features related to disease diagnosis and treatment in real medical images during application. True disease core features can also be called: disease diagnosis and treatment related core features. Sample disease core features are features related to disease diagnosis and treatment in medical image samples during training.

[0049] Disease non-core features refer to features that are related to individual identity and unrelated to disease diagnosis and treatment. Real disease non-core features are features in real medical images that are related to individual identity and unrelated to disease diagnosis and treatment during application. Sample disease non-core features are features in medical image samples that are related to individual identity and unrelated to disease diagnosis and treatment during training.

[0050] Random noise data may also be called: noise, random noise or noise distribution.

[0051] Random anonymous features and random sampling features are both random features generated based on random noise data. Random anonymous features are random features corresponding to real medical images during application, and can also be called: identity anonymous non-core features. Random sampling features are random features corresponding to medical image samples during training, and can also be called: anonymous non-core features.

[0052] Anonymous medical images can also be called: anonymous medical image data, anonymized medical image data.

[0053] Medical image samples can also be called: samples, sample data, and real samples.

[0054] Embodiment 1

[0055] Figure 1 This is a flowchart of the image processing method provided in Example 1 of the present application. Figure 2 A schematic diagram of a structure of a trained generation network provided in Example 1 of the present application, Figure 3 A schematic diagram of a structure of a trained coding network provided in Example 1 of the present application, Figure 4 Another structural diagram of a trained coding network provided in Example 1 of the present application is shown in FIG. Figure 5 A schematic diagram of the structure of a trained random sampling network provided in Example 1 of the present application, Figure 6 A schematic diagram of the structure of a trained denoising sub-network provided in Example 1 of the present application, Figure 7 Another structural diagram of the trained denoising sub-network provided in Example 1 of the present application is shown in FIG. Figure 8 A schematic diagram of the structure of a trained decoding network provided in Example 1 of the present application.

[0056] The image processing method provided in this embodiment is performed by an image processing device, which is located in an electronic device. Figure 1As shown, the image processing method provided by this embodiment includes steps 101 to 104.

[0057] Step 101, obtaining a trained generated network, where the trained generated network includes: a trained encoding network, a trained random sampling network, and a trained decoding network.

[0058] In this embodiment, the trained generated network can be pre-stored in the memory of the electronic device, or pre-stored in a database that is communicatively connected to the electronic device. The electronic device can obtain the trained generated network from its own memory, or obtain the trained generated network from the database through a communication connection with the database.

[0059] like Figure 2 As shown, the trained generation network 20 includes a trained encoding network 21, a trained random sampling network 22 and a trained decoding network 23. The inputs of the trained encoding network 21 and the trained random sampling network 22 are the inputs of the trained generation network 20, the outputs of the trained encoding network 21 and the trained random sampling network 22 are connected to the input of the trained decoding network 23, and the output of the trained decoding network 23 is the output of the trained generation network 20.

[0060] Step 102: input the real medical image into the trained encoding network, and use the trained encoding network to extract and output the real disease core features in the real medical image.

[0061] In this embodiment, the real medical image may contain features related to patient privacy such as patient identity, and is a medical image that needs to be anonymized and blurred.

[0062] Optionally, the trained encoding network includes multiple convolution blocks and a first linear layer, each convolution block includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence, and the "using the trained encoding network to extract and output the real disease core features in the real medical image" in step 102 is refined to include steps 201 to 202.

[0063] Step 201, using each convolution block to perform convolution processing on the real medical image data in turn to obtain image features of the real medical image; the image features of the real medical image include real disease core features and real disease non-core features.

[0064] like Figure 3 As shown, the trained encoding network may include a plurality of convolution blocks and a first linear layer connected in sequence. The convolution block may include a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence. Each convolution block may extract features of different sizes from real medical image data.

[0065] The input of the first convolutional block in the trained encoder network is the input of the trained encoder network, the output of the first convolutional block is connected to the input of the second convolutional block, and so on.

[0066] The output of the last convolutional block in the trained encoding network is the input of the first linear layer, and the output of the first linear layer is the output of the trained encoding network.

[0067] In the convolution block, the input of the convolution layer is the input of the convolution block, the output of the convolution layer is connected to the input of the pooling layer, the output of the pooling layer is connected to the input of the normalization layer, the output of the normalization layer is connected to the input of the activation layer, and the output of the activation layer is the output of the convolution block.

[0068] The convolution layer is used to perform convolution processing on real medical image data to obtain the convolution features of real medical images. The convolution processing can be Conv2d convolution.

[0069] The pooling layer is used to perform pooling processing on the convolution features of the real medical image to obtain the convolution features of the real medical image after pooling processing. The pooling processing can be maximum pooling, minimum pooling, and average pooling.

[0070] The normalization process is used to normalize the convolutional features of the real medical image after the pooling process to obtain the convolutional features of the real medical image after the normalization process. The normalization process can be BatchNorm2d normalization.

[0071] The activation layer is used to activate the convolutional features of the normalized real medical image to obtain the image features of the real medical image. The activation process may be ReLU activation.

[0072] Step 202: Use a first linear layer to perform a first linear mapping process on the image features of the real medical image to obtain the real disease core features.

[0073] The image features of the real medical image include real disease core features and real disease non-core features. The first linear layer is used to perform a first linear mapping process on the image features of the real medical image. The first linear mapping process is used to separate the real disease core features from the image features of the real medical image.

[0074] Alternatively, if Figure 4 As shown, the trained coding network may include a plurality of convolution blocks, a first linear layer, and a second linear layer connected in sequence. The output of the last convolution block in the trained coding network is the input of the first linear layer and the second linear layer, and the output of the first linear layer and the second linear layer is the output of the trained coding network.

[0075] The second linear layer is used to perform a second linear mapping process on the image features of the real medical image, and the second linear mapping process is used to separate the real disease non-core features from the image features of the real medical image.

[0076] The image processing method provided in this embodiment can accurately extract the core features of real diseases from real medical images through linear mapping processing of the first linear layer and the second linear layer.

[0077] Step 103: input the random noise data into the trained random sampling network, and use the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than the first similarity threshold.

[0078] Random noise data is randomly generated noise data, for example, random noise data can be randomly sampled from a predefined prior distribution. Random noise data can be randomly generated each time it is needed. In other words, the random noise data used by the trained generative network in multiple inference processes are different.

[0079] Optionally, the trained random sampling network includes at least one trained denoising sub-network; each trained denoising sub-network has the same structure and parameters; the input data and output data of the trained denoising sub-network have the same shape; the trained denoising sub-network includes at least one convolutional combination network or linear layer, and the convolutional combination network includes a convolutional layer and a deconvolutional layer; in step 103, "using the trained random sampling network to generate and output random anonymous features corresponding to real medical images based on random noise data" is refined to include step 301.

[0080] Step 301, sequentially using at least one trained denoising sub-network to denoise random noise data to obtain random anonymous features.

[0081] like Figure 5 As shown, the trained random sampling network 22 includes at least one trained denoising sub-network 221, each trained denoising sub-network 221 is connected in sequence, and each trained denoising sub-network 221 has the same structure and parameters.

[0082] In this embodiment, random noise data is input into a trained random sampling network, and the trained random sampling network sequentially samples at least one trained denoising sub-network to denoise the random noise data, and the data denoised by the last trained denoising sub-network is determined as a random anonymous feature. After the random noise data passes through the trained denoising sub-network, the data shape remains unchanged.

[0083] Each trained denoising sub-network can denoise and restore random noise data to different degrees.

[0084] The trained denoising sub-network may include at least one of the following: at least one convolutional combination network, at least one linear layer. The trained denoising sub-network may also include an activation layer.

[0085] like Figure 6 As shown, the trained denoising sub-network includes multiple linear layers, and the parameters of each linear layer can be the same or different.

[0086] like Figure 7 As shown, the trained denoising sub-network includes multiple convolutional layers and multiple deconvolutional layers, and the number of convolutional layers is the same as the number of deconvolutional layers.

[0087] The image processing method provided in this embodiment can generate random anonymous features with similar distribution to the non-core features of real diseases in real medical images based on random noise data through a trained random sampling network, thereby realizing anonymous fuzzy processing of real medical images.

[0088] Step 104, input the real disease core features and the random anonymous features into the trained decoding network, and use the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate and output anonymous medical images.

[0089] In this embodiment, Figure 8 As shown, the trained decoding network may include a feature fusion layer and multiple convolutional blocks.

[0090] The feature fusion layer is used to concatenate and fuse the core features of the disease and the randomly sampled non-core features. For example, a fully connected Linear layer can be used as the fusion layer.

[0091] The convolution block may include a convolution layer, an upsampling layer, a normalization layer, and an activation layer. Each convolution block may decode features of different sizes. For example, Conv2d convolution, Upsample upsampling, BatchNorm2d normalization, and ReLU activation may be used.

[0092] After the core features of the real disease and the random anonymous features are fused and decoded, a new medical image can be generated whose core features are consistent with the real medical image, but whose non-core features such as individual identity identifiers are different from the real medical image, thereby achieving anonymous blurring of the real medical image.

[0093] The image processing method provided in this embodiment obtains a trained generation network, and the trained generation network includes: a trained encoding network, a trained random sampling network and a trained decoding network; inputs a real medical image into the trained encoding network, and uses the trained encoding network to extract and output the real disease core features in the real medical image; inputs random noise data into the trained random sampling network, and uses the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; inputs the real disease core features and the random anonymous features into the trained decoding network, and uses the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate and output an anonymous medical image. Since the trained encoding network can extract and output the core features of the real disease in the real medical image, the trained random sampling network can generate and output random anonymous features based on random noise data, the trained decoding network can fuse and decode the core features of the real disease and the random anonymous features to obtain anonymous medical features, and the similarity between the random anonymous features and the non-core features of the real disease in the real medical image is greater than the first similarity threshold, therefore, the trained decoding network is used to fuse and decode the core features of the real disease and the random anonymous features, so as to generate an anonymous medical image that retains the core features of the real disease and blurs the non-core features of the real disease, thereby realizing accurate anonymous fuzzification processing of medical image data.

[0094] Embodiment 2

[0095] Fig. 9 This is a flow chart of the model training method provided in the second embodiment of the present application. The execution subject of the model training method provided in this embodiment is a model training device, which is located in an electronic device. Fig. 9 As shown, the model training method provided in this embodiment includes step 401 and step 402, or includes step 401, step 403, step 404 and step 405.

[0096] Step 401, obtaining a training data set and a preset generation network; the training data set includes multiple medical image samples of multiple types of diseases; the preset generation network includes: a preset encoding network, a preset random sampling network and a preset decoding network.

[0097] In this embodiment, the training data set is constructed based on real patient medical imaging data. The training data set includes multiple medical imaging samples of multiple diseases. For ease of description, the medical imaging samples are referred to as samples below. Each sample in the training data set also includes its disease type label.

[0098] For example, a head CT scan image may include multiple disease classifications such as intraparenchymal intracranial hemorrhage, intraventricular intracranial hemorrhage, subdural intracranial hemorrhage, subarachnoid intracranial hemorrhage, etc.

[0099] Step 402, use the training data set to perform overall training on the preset generation network until the loss value of the preset generation network is less than or equal to the first loss threshold, or until the number of training times of the preset generation network reaches the first number threshold, to obtain a trained generation network; the trained generation network generates random sampling features corresponding to each medical image sample based on the random noise data, and the similarity with the non-core features of the sample disease in each medical image sample is greater than the first similarity threshold.

[0100] In this embodiment, the training data set can be sampled according to the disease classification label of each medical image sample to obtain multiple batches of training data, each batch of training data contains more than one disease classification label, and each existing disease classification label contains no less than two medical image samples. Each batch of training data is denoted as B{(x,y)}, where x is a medical image sample and y is a disease classification label of the medical image sample.

[0101] In this embodiment, the preset generation network can be trained as a whole according to multiple batches of training data, and during the training process, the parameters of the preset generation network are updated using multiple batches of stochastic gradient descent. Gradient descent is a type of iterative method, which is a method for minimizing the loss function. Specifically, when solving the minimum value of the loss function, the gradient descent method is used to iterate step by step to obtain the minimized loss function and the corresponding model parameter value.

[0102] The formula of the gradient descent method can be expressed as: Among them, L(x,y) represents the loss function, θ represents the parameters of the model, and η represents the learning rate. Represents the gradient.

[0103] In a possible implementation, the objective function L for overall training of the preset generative network is total It can be expressed as: total =L h_core +L gen +L sample +L anony .

[0104] L h_core Used to optimize the similarity of disease core features. h_coreAfter calculating the similarity of the core features of diseases of different samples in each batch of training data, the softmax operation is used to score and normalize the similarity of the core features between each sample, maximizing the similarity score of the core features of diseases of samples in the same disease category while minimizing the similarity score of the core features of diseases of samples in different disease categories.

[0105] In one possible implementation, L h_core Can satisfy:

[0106]

[0107] x represents the current medical image sample, h core represents the core features of the sample disease obtained by the feature extraction and encoding module of the current medical image sample x; + represents the positive samples in this batch of training data that have the same label y as the current medical image sample, |x + | is the number of positive samples in the batch of training data, x is the core disease feature of the positive sample obtained by the feature extraction and encoding module; - is a negative sample in the batch of training data that is inconsistent with the label y of the current medical image sample. The core features of the sample disease are obtained by the feature extraction and encoding module of the corresponding negative sample.

[0108] Through L h_core The optimization can enable the feature extraction encoding module to effectively learn to extract the core features of the disease and separate the non-core features of other diseases.

[0109] L gen is the decoding ability measurement function of the feature decoding network, which is used to measure the ability of the feature decoding network to restore medical image samples based on the core features of sample diseases and non-core features of sample diseases. gen , which enables the feature decoding generation module to effectively learn how to fuse the core features of the disease with the non-core features of the disease to restore reasonable image data.

[0110] In one possible implementation, L gen Can satisfy:

[0111] L gen =||D(E(x))-x|| 2 .

[0112] Where E(x) = h core ,h other , D(E(x))=D(h core ,h other )=x gen .

[0113] Among them, x represents the medical image sample, h core represents the core characteristics of the sample disease, h other represents the non-core characteristics of the sample disease, and x gen The restored sample corresponding to the medical image sample x.

[0114] L sample It is a metric function that measures the ability of the preset random sampling network to randomly generate random features with similar distribution to the non-core features of the disease. By optimizing L sample This allows the random sampling module to effectively learn the distribution of non-core features of the disease.

[0115] In one possible implementation, L sample Can satisfy:

[0116] L sample =||S(∈(h other ))-h other || 2 .

[0117] Among them, h other represents the non-core features of the disease, ∈(h other ) represents the non-core noisy features of the sample disease, S(∈(h other )) indicates the restoration feature.

[0118] L anony is the anonymity measurement function of anonymous samples. Anonymous samples are new image data (anonymous samples) obtained by splicing and fusing the core features of sample diseases extracted by the preset encoding network and the anonymous non-core features (random sampling features) generated by the preset random sampling network and then inputting them into the preset decoding network.

[0119] The optimization goal of the anonymity measurement function is to minimize the distance between the original data sample and the corresponding generated new data, thereby achieving the anonymization requirement of the image data. anony The optimization of can enable the generation network to effectively generate anonymous images that meet the anonymity requirements.

[0120] In one possible implementation, L anony Can satisfy:

[0121]

[0122] Among them, h core (x i ) is the current medical image sample x i The core features of the sample disease obtained by the feature extraction and encoding module, x jare other samples in the batch of training data that are not the current medical image samples, ∈ is the noise feature sampled from the predefined prior distribution, and γ is a hyperparameter that measures the desired degree of anonymity. The larger the γ, the higher the anonymity requirement.

[0123] In this embodiment, overall training refers to the training process through the objective function L total To adjust the trainable parameters θ of the preset encoding network E(·) as a whole E , the trainable parameters θ of the preset random sampling network S(·) S , and the trainable parameters θ of the preset decoding network D(·) D .

[0124] Step 403, using the training data set to train the preset codec combination network and the preset random sampling network in sequence, to obtain an intermediate codec combination network and an intermediate random sampling network; the preset codec combination network includes a preset encoding network and a preset decoding network; the intermediate codec combination network includes an intermediate encoding network and an intermediate decoding network.

[0125] In this embodiment, training in sequence means first training the trainable parameters θ of the preset encoding network in the preset encoding and decoding combination network. E and the trainable parameters θ of the preset decoding network D Train to obtain an intermediate encoding and decoding network consisting of an intermediate encoding network and an intermediate decoding network; on the basis of the intermediate encoding and decoding network, trainable parameters θ of the preset random sampling network S(·) are adjusted. S Conduct training to obtain the intermediate random sampling network. Separate training can reduce the hardware performance requirements of electronic devices during training and increase the training speed.

[0126] Step 404: Use the intermediate codec combination network and the random sampling network to form an intermediate generation network.

[0127] In this embodiment, according to the connection relationship between the preset encoding network, the preset random sampling network and the preset decoding network in the preset generation network, an intermediate encoding network, an intermediate random sampling network and an intermediate decoding network can be used to form an intermediate generation network.

[0128] Step 405, use the training data set to perform overall training on the intermediate generation network until the loss value of the intermediate generation network is less than or equal to the second loss threshold, or until the number of training times of the intermediate generation network reaches the second number threshold, to obtain a trained generation network.

[0129] In this embodiment, the process of using the training data set to perform overall training on the intermediate generation network is the same as the process of using the training data set to perform overall training on the preset generation network, which is not described in detail here. The second loss threshold may be the same as or different from the first loss threshold, and the second number threshold may be the same as or different from the first number threshold.

[0130] The model training method provided in this embodiment can make the training method of the preset generation network more flexible by training the preset generation network as a whole, or training each module of the preset generation network in sequence and then combining each module for overall training. At the same time, by generating random sampling features corresponding to each medical image sample based on random noise data through the trained generation network, the similarity with the non-core features of the sample disease in each medical image sample is greater than the first similarity threshold, and the anonymous fuzzy processing of the real medical image can be accurately achieved.

[0131] Embodiment 3

[0132] Fig.10 This is a flow chart of the model training method provided in Example 3 of this application. Fig.10 As shown, the model training method provided in this embodiment is based on the second embodiment, and step 402 is further refined to include steps 501 to 507.

[0133] Step 501: input the training data set and random noise data into a preset generation network.

[0134] The structure of the preset generative network may be the same as the structure of the trained generative network.

[0135] Step 502: extract sample features of each medical image sample using a preset coding network; the sample features include: sample disease core features and sample disease non-core features.

[0136] The preset encoding network may have the same structure as the trained encoding network.

[0137] Step 503 , performing at least one noise addition process on each sample disease non-core feature to obtain a sample disease non-core noisy feature corresponding to each sample disease non-core feature.

[0138] Noise addition processing refers to the process of adding noise to the non-core features of the sample disease. The added noise can be of different types and intensities, which are not limited here.

[0139] Step 504 , using a preset random sampling network to generate restoration features corresponding to the non-core features of each disease sample based on the non-core noisy features of each disease sample, and generating random sampling features corresponding to each medical image sample based on the random noise data.

[0140] The preset random sampling network may have the same structure as the trained random sampling network. The random sampling features corresponding to each medical image sample may be extracted from different random noise data.

[0141] The preset random sampling network is used to generate the restored features corresponding to the non-core features of each sample disease based on the non-core noisy features of each sample disease. This is to denoise and restore the random noise data, and then train the preset random sampling network to generate random sampling features similar to the non-core features of the sample disease.

[0142] A preset random sampling network is used to generate random sampling features corresponding to each medical image sample based on random noise data, so that a preset decoding network can anonymize each medical image sample by using the random sampling features corresponding to each medical image sample.

[0143] Step 505: Use a preset decoding network to fuse and decode the core features of each sample disease with its corresponding non-core features of the sample disease to generate a restored sample corresponding to the medical image sample, and fuse and decode the core features of each sample disease with its corresponding random sampling features to generate an anonymous sample of each medical image sample.

[0144] The preset decoding network may have the same structure as the trained decoding network.

[0145] The fusion process may be to splice the sample disease core feature with the sample disease non-core feature corresponding to the sample disease core feature.

[0146] The decoding process may be to generate an image by deconvolving the spliced ​​sample disease core features and sample disease non-core features.

[0147] Step 506, calculating the loss value of the preset generation network according to each medical image sample, each sample feature, each restored feature, each random sampling feature, each restored sample and each anonymous sample.

[0148] In this embodiment, the loss value of the preset generation network can be calculated by the loss function of the preset generation network, and the loss function of the preset generation network is the objective function L when the preset generation network is trained as a whole. total , which will not be elaborated here.

[0149] Optionally, step 505 is further refined to include steps 601 to 605 .

[0150] Step 601, calculate the first sub-loss value of the preset generation network according to the core features of each disease; the first sub-loss value is negatively correlated with the similarity of the same disease, and is positively correlated with the similarity of different diseases; the similarity of the same disease is the similarity of the core features of the sample diseases of the medical image samples of the same disease, and the similarity of different diseases is the similarity of the core features of the sample diseases of the medical image samples of different diseases.

[0151] In this embodiment, the similarity of the sample disease core features of the medical image samples of the same disease may be the cosine similarity, Euclidean distance, etc. between the sample disease core features of the medical image samples of the same disease. Similarly, the similarity of the sample disease core features of the medical image samples of different diseases whose similarities are different diseases may also be the cosine similarity, Euclidean distance, etc. between the sample disease core features of the medical image samples of different diseases whose similarities are different diseases.

[0152] In order to enable the trained encoding network to accurately extract the real disease core features of real medical images, it is necessary to train the trained encoding network with the goal of extracting the highest similarity of the disease core features of samples of the same disease and the lowest similarity of the disease core features of samples of different diseases. Therefore, the first sub-loss value is negatively correlated with the similarity of the same disease, and positively correlated with the similarity of different diseases.

[0153] Optionally, step 601 is refined to include step 701 .

[0154] Substitute each disease core feature into the following formula to calculate the first sub-loss value:

[0155]

[0156] Among them, L h_core represents the first sub-loss value, x represents the current medical image sample, h core represents the core features of the sample disease obtained by the feature extraction and encoding module of the current medical image sample x, x + represents the positive samples in this batch of training data that have the same disease type as the current medical image sample, |x + | represents the number of positive samples in the batch of training data, represents the core features of the disease of the positive sample; x - Indicates the negative samples in this batch of training data that have different disease types from the current medical image samples. Represents the core features of the disease in negative samples

[0157] Step 602, based on each medical image sample and its corresponding restored sample, calculate the second sub-loss value of the preset generation network; the second sub-loss value is related to the restoration degree of multiple samples; the sample restoration degree is the similarity between the medical image sample and its corresponding restored sample.

[0158] The second sub-loss value may be negatively correlated with the restoration degree of multiple samples.

[0159] Optionally, step 602 is further refined to include step 801 .

[0160] Substitute each medical image sample and its corresponding restored sample into the following formula to calculate the second sub-loss value:

[0161] L gen =||D(E(x))-x|| 2 .

[0162] Where E(x) = h core ,h other , D(E(x))=D(h core ,h other )=x gen .

[0163] Among them, L gen represents the second sub-loss value, x represents the medical image sample, h core represents the core characteristics of the sample disease, h other represents the non-core characteristics of the sample disease, and x gen The restored sample corresponding to the medical image sample x.

[0164] In this embodiment, the second sub-loss value can enable the generative network to restore reasonable medical images based on the core features of the disease and the anonymous features. It is necessary to train the generative network to restore the medical image samples.

[0165] Step 603, calculate the third sub-loss value of the preset generation network according to the non-core features of each sample disease and its corresponding restored features; the third sub-loss value is related to multiple feature restoration degrees; the feature restoration degree is the similarity between the non-core features of the sample disease and its corresponding restored features.

[0166] The third sub-loss value may be negatively correlated with multiple feature restoration degrees.

[0167] Optionally, step 603 is further refined to include step 901 .

[0168] Step 901, the non-core features of each sample disease and its corresponding random sampling features are put into the following formula to calculate the third sub-loss value:

[0169] L sample =||S(∈(hother ))-h other || 2 .

[0170] Among them, L sample represents the third sub-loss value, h other represents the non-core features of the disease, ∈(h other ) represents the non-core noisy features of the sample disease, S(∈(h other )) indicates the restoration feature.

[0171] In this embodiment, by optimizing L sample The random sampling module can effectively learn the distribution of non-core features of the disease, and then generate random features with similar distribution to the non-core features of the disease based on random noise data.

[0172] Step 604, calculating the fourth sub-loss value of the preset generation network according to each medical image sample and its corresponding anonymous sample; the fourth sub-loss value is related to the anonymity of multiple samples; the sample anonymity is the similarity between the medical image sample and its corresponding anonymous sample.

[0173] The fourth sub-loss value may be negatively correlated with the anonymity of each sample.

[0174] Optionally, step 604 is further refined to include step 1001 .

[0175] Step 1001, each medical image sample and its corresponding anonymous sample are put into the following formula to calculate the fourth sub-loss value:

[0176]

[0177] Among them, L anony represents the fourth sub-loss value, h core (x i ) is the current medical image sample x i The core features of the sample disease obtained by the feature extraction and encoding module, x j are other samples in the batch of training data that are not the current medical image samples, ∈ is the noise feature sampled from the predefined prior distribution, and γ is a hyperparameter that measures the desired degree of anonymity. The larger the γ, the higher the anonymity requirement.

[0178] Step 605, using the preset weights corresponding to the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value respectively, a weighted sum calculation is performed on the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value to obtain the loss value of the preset generation network.

[0179] In this embodiment, the preset weights corresponding to the first sub-loss value, the second sub-loss value, the third sub-loss value, and the fourth sub-loss value may be equal, for example, all 1, then the preset loss value L of the generated network total It can be expressed as: total =L h_core +L gen +L sample +L anony .

[0180] The model training method provided in this embodiment can quantify the ability of the preset generation network to extract core features of the disease, extract random anonymous features, fuse core features of the disease and random anonymous features and perform decoding and restoration, and anonymize samples through the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value. Then, the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value can be combined to adjust the parameters of the model, realize the training of the preset generation network, and obtain a trained generation network that meets user requirements.

[0181] Step 506, updating the parameters of the preset generation network according to the loss value of the preset generation network.

[0182] Here, you can refer to the above description and use the gradient descent method to update the parameters of the preset generation network.

[0183] Step 507, repeatedly executing the step from inputting the training data set into the preset generation network to updating the parameters of the preset generation network according to the loss value of the preset generation network, until the loss value of the preset generation network is less than or equal to the first loss threshold, or until the number of repetitions reaches the first number threshold, and determining the preset generation network as a trained generation network.

[0184] The model training method provided in this embodiment can obtain a trained generation network that can accurately perform anonymous fuzzification processing on real medical images through overall training of a preset generation network.

[0185] Embodiment 4

[0186] Fig.11 This is a flow chart of the model training method provided in Example 4 of this application. Fig.11 As shown, the model training method provided in this embodiment is based on the second or third embodiment, and the step 403 of "using the training data set to train the preset codec combination network to obtain the intermediate codec combination network" is refined to include steps 1101 to 1106.

[0187] Step 1101, using a preset coding network to extract sample features of each medical image sample; the sample features include: sample disease core features and sample disease non-core features.

[0188] Step 1102, calculating the loss value of the preset encoding network according to the core features of the disease of each sample.

[0189] The loss value of the preset encoding network is negatively correlated with the similarity of the same disease, and positively correlated with the similarity of different diseases; the similarity of the same disease is the similarity of the core features of the sample diseases of the medical image samples of the same disease, and the similarity of different diseases is the similarity of the core features of the sample diseases of the medical image samples of different diseases.

[0190] Step 1103, using a preset decoding network to fuse and decode the core features of each sample disease and its corresponding non-core features of the sample disease, so as to generate a restored sample corresponding to each medical image sample.

[0191] Step 1104, calculating the loss value of the preset decoding network according to the sample characteristics of each medical image sample and the corresponding restored sample.

[0192] Step 1105: adjusting parameters of the preset encoding network and parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network.

[0193] Step 1106, repeatedly executing the step of extracting sample features of each medical image sample by using a preset encoding network, to adjusting the parameters of the preset encoding network and the parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network, until the preset condition is met, or until the number of repetitions reaches a third number threshold, to obtain an intermediate encoding and decoding combination network, the preset condition is: the loss value of the preset encoding network is less than or equal to the loss threshold of the preset encoding network and the loss value of the preset decoding network is less than or equal to the loss threshold of the preset decoding network.

[0194] In this embodiment, L in the second embodiment can be used. h_core To calculate the loss value of the preset coding network, such as L in the second embodiment sample To calculate the loss value of the preset random sampling network, and use the gradient descent method to adjust the parameters of the preset encoding network and the parameters of the preset random sampling network with the goal of reducing the loss value of the preset encoding network and reducing the loss value of the preset random sampling network.

[0195] In this embodiment, the structure of the intermediate coding network is the same as that of the preset coding network, and the structure of the intermediate random sampling network is the same as that of the preset random sampling network.

[0196] The model training method provided in this embodiment adjusts the parameters of the preset encoding network and the parameters of the preset random sampling network by using the loss value of the preset encoding network and the loss value of the preset random sampling network, so as to obtain an intermediate encoding network that can accurately extract the core characteristics and non-core characteristics of the disease, and an intermediate decoding network that can accurately restore medical impact samples, thereby reducing the training complexity of subsequent overall training, reducing the hardware performance requirements for training the training generation network and improving the training efficiency of the preset generation network.

[0197] Optionally, the preset encoding network includes a plurality of convolution blocks connected in sequence, and also includes a first linear layer and a second linear layer; each convolution block includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence; in step 1101, "using a preset encoding network to extract sample features of each medical image sample" is refined to include steps 1201 to 1202.

[0198] In this embodiment, the network structure of the preset coding network can be referred to as Figure 4 The network structure of the trained encoding network shown is not described here.

[0199] Step 1201: Use each convolution block to perform convolution processing on each medical image sample in turn to obtain image features of each medical image sample.

[0200] Step 1202 , using a first linear layer and a second linear layer to perform a first linear mapping process and a second linear mapping process on the image features of the medical image sample, respectively, to obtain the sample disease core features and the sample disease non-core features.

[0201] In this embodiment, the image features of the medical image samples incorporate the sample disease core features and the sample disease non-core features of the medical image samples, and the linear mapping process separates the features without changing the shapes of the features. Therefore, the image features of the medical image samples can be subjected to the first linear mapping process and the second linear mapping process respectively through the first linear layer and the second linear layer to achieve the separation of the sample disease core features and the sample disease non-core features, and obtain the sample disease core features and the sample disease non-core features of the medical image samples.

[0202] The model training method provided in this embodiment can accurately separate the core features of sample diseases from medical image samples through the first linear layer and the second linear layer, and then accurately train the preset encoding network.

[0203] Optionally, after “obtaining the intermediate coding network” in step 1104, steps 1301 to 1306 are also included.

[0204] Step 1301, using an intermediate coding network to extract intermediate features of the disease of each medical image sample; the intermediate features include: intermediate disease core features and intermediate disease non-core features.

[0205] In this embodiment, after the preset coding network is trained to obtain the intermediate coding network, the intermediate coding network can accurately extract the intermediate features of the disease of the medical image sample.

[0206] Intermediate disease core features refer to the core features in medical image samples that are extracted by the intermediate coding network and are related to disease diagnosis and treatment. Intermediate disease non-core features refer to the non-core features in medical image samples that are extracted by the intermediate coding network and are not related to disease diagnosis and treatment but are related to individual identity.

[0207] The sample disease core features and the intermediate disease core features are both core features related to disease diagnosis and treatment in medical image samples, and the sample disease non-core features and the intermediate disease non-core features are both non-core features in medical image samples that are not related to disease diagnosis and treatment but are related to individual identity. They are just extracted from different networks and are described in different ways to facilitate understanding.

[0208] In this embodiment, an intermediate coding network is used to extract intermediate features of the disease of each medical image sample, and the preset random sampling network can be trained with accurate intermediate disease non-core features to improve training efficiency.

[0209] Step 1302, performing at least one noise addition process on each intermediate disease non-core feature to obtain each intermediate disease non-core noisy feature.

[0210] Step 1303, using a preset random sampling module to generate restored features corresponding to the non-core features of each sample disease based on the non-core noisy features of each intermediate disease.

[0211] Step 1304, calculating the loss value of the preset random sampling network according to each intermediate disease non-core feature and its corresponding restored feature.

[0212] Step 1305: adjust the parameters of the preset random sampling network according to the loss value of the preset random sampling network.

[0213] In this embodiment, L in the second embodiment can be used. sample To calculate the loss value of the preset random sampling network, and use the gradient descent method to adjust the parameters of the preset random sampling network with the goal of reducing the loss value of the preset random sampling network.

[0214] Step 1306, repeatedly executing the step of using a preset random sampling module to generate the restored features corresponding to the non-core features of each sample disease based on the non-core noisy features of each intermediate disease, to the step of adjusting the parameters of the preset random sampling network according to the loss value of the preset random sampling network, until the loss value of the preset random sampling network is less than or equal to the preset random sampling network loss threshold, or until the number of repetitions reaches the fourth threshold, to obtain the intermediate random sampling network.

[0215] The structure of the intermediate random sampling network is the same as that of the preset random sampling network.

[0216] The model training method provided in this embodiment obtains an intermediate random sampling network by training a preset random sampling network based on an intermediate codec combination network. The intermediate random sampling network can accurately generate random features with similar distribution to non-core features of the disease, thereby improving the training efficiency of the preset generation network.

[0217] The image processing method and model training method provided in the present application, by training a preset generation network on real original patient medical image data, enable the preset generation network to generate new medical image data with the same core features related to disease diagnosis and treatment as the original data but different non-core features such as individual identity identifiers, thereby completing the anonymization and privacy protection of the real original image data while retaining the core features related to disease diagnosis and treatment, which is beneficial to protecting the privacy and security of patients and facilitating the sharing and collaboration of medical data from multiple sources to carry out training and analysis of downstream task models.

[0218] Existing generative network technology usually only includes an encoding module and a decoding module, and the output of the encoding module is directly used as the input of the decoding module. The present application additionally adds random anonymous features obtained by random sampling by a random sampling module, and only extracts the real disease core features of real medical images in the encoding module part, and simultaneously integrates the above-mentioned random anonymous features and the real disease core features in the decoding module part to generate new image data, thereby completing the anonymization and privacy protection of the real original image data while retaining the relevant core features such as disease diagnosis and treatment.

[0219] In addition, compared with the existing methods, the present application redesigns two types of objective functions: one is the similarity measurement function of the core features of the disease obtained by the feature extraction and encoding module; the other is the anonymity measurement function of the new image data obtained by splicing and fusing the extracted core features of the disease and the randomly sampled anonymous non-core features and inputting them into the feature decoding generation module. The two types of functions cooperate to train the generated network to meet the requirements of data anonymization.

[0220] Embodiment 5

[0221] Fig.12This is a structural diagram of an image processing device provided in Embodiment 5 of the present application. Fig.13 This is a schematic diagram of the structure of the model training device provided in Example 5 of the present application.

[0222] like Fig.12 As shown, the image processing device 120 provided in this embodiment includes: an acquisition module 121 , an encoding module 122 , a random sampling module 123 and a decoding module 124 .

[0223] The acquisition module 121 is used to acquire a trained generated network, where the trained generated network includes: a trained encoding network, a trained random sampling network, and a trained decoding network.

[0224] The encoding module 122 is used to input the real medical image into the trained encoding network, and use the trained encoding network to extract and output the real disease core features in the real medical image.

[0225] The random sampling module 123 is used to input random noise data into the trained random sampling network, and use the trained random sampling network to generate and output random anonymous features corresponding to the real medical image based on the random noise data; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than the first similarity threshold.

[0226] The decoding module 124 is used to input the real disease core features and the random anonymous features into the trained decoding network, and use the trained decoding network to fuse and decode the real disease core features and the random anonymous features to generate and output anonymous medical images.

[0227] Optionally, the trained random sampling network includes at least one trained denoising sub-network; each trained denoising sub-network has the same structure and parameters; the input data and output data of the trained denoising sub-network have the same shape; the trained denoising sub-network includes at least one convolutional combination network or linear layer, and the convolutional combination network includes a convolutional layer and a deconvolutional layer; the random sampling module is specifically used to: sequentially use at least one trained denoising sub-network to denoise the random noise data to obtain random anonymous features.

[0228] Optionally, the trained encoding network includes a plurality of convolution blocks and a first linear layer connected in sequence, and the convolution block includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence; the encoding module is specifically used to: use each convolution block to perform convolution processing on the real medical image data in sequence to obtain image features of the real medical image; the image features of the real medical image include real disease core features and real disease non-core features; use the first linear layer to perform a first linear mapping process on the image features of the real medical image to obtain the real disease core features.

[0229] The image processing device provided in this embodiment can execute the image processing method of any of the above embodiments. The specific implementation method and principle are similar and will not be repeated here.

[0230] like Fig.13 As shown, the model training device 130 provided in this embodiment includes an acquisition module 131, a first overall training module 132, and / or a separate training module 132, a composition module 134, and a second overall training module 135.

[0231] The acquisition module 131 is used to acquire a training data set and a preset generation network; the training data set includes multiple medical image samples of multiple types of diseases; the preset generation network includes: a preset encoding network, a preset random sampling network and a preset decoding network.

[0232] The first overall training module 133 is used to use the training data set to perform overall training on the preset generation network until the loss value of the preset generation network is less than or equal to the first loss threshold, or until the number of training times of the preset generation network reaches the first number threshold, to obtain a trained generation network; the trained generation network generates random sampling features corresponding to each medical image sample based on random noise data, and the similarity with the non-core features of the sample disease in each medical image sample is greater than the first similarity threshold.

[0233] The separate training module 132 is used to use the training data set to train the preset codec combination network and the preset random sampling network in sequence to obtain an intermediate codec combination network and an intermediate random sampling network; the preset codec combination network includes a preset encoding network and a preset decoding network; the intermediate codec combination network includes an intermediate encoding network and an intermediate decoding network.

[0234] The composition module 134 is used to form an intermediate generation network using an intermediate codec combination network and a random sampling network.

[0235] The second overall training module 135 is used to use the training data set to perform overall training on the intermediate generation network until the loss value of the intermediate generation network is less than or equal to the second loss threshold, or until the number of training times of the intermediate generation network reaches the second number threshold, to obtain a trained generation network.

[0236] Optionally, the first overall training module is specifically used to: input the training data set and random noise data into a preset generation network; use a preset encoding network to extract sample features of each medical image sample; the sample features include: sample disease core features and sample disease non-core features; perform at least one noise addition process on each sample disease non-core feature to obtain a sample disease non-core noisy feature corresponding to each sample disease non-core feature; use a preset random sampling network to generate a restoration feature corresponding to each sample disease non-core feature based on each sample disease non-core noisy feature, and generate a random sampling feature corresponding to each medical image sample based on the random noise data; use a preset decoding network to fuse and decode each sample disease core feature with its corresponding sample disease non-core feature, so as to obtain a sample disease non-core noisy feature corresponding to each sample disease non-core feature; Generate restored samples corresponding to the medical image samples, and fuse and decode the core disease features of each sample with the corresponding random sampling features to generate anonymous samples of each medical image sample; calculate the loss value of the preset generation network according to each medical image sample, each sample feature, each restored feature, each random sampling feature, each restored sample and each anonymous sample; update the parameters of the preset generation network according to the loss value of the preset generation network; repeatedly perform the steps from inputting the training data set into the preset generation network to updating the parameters of the preset generation network according to the loss value of the preset generation network, until the loss value of the preset generation network is less than or equal to the first loss threshold, or until the number of repetitions reaches the first number threshold, and determine the preset generation network as a trained generation network.

[0237] Optionally, the first overall training module is also specifically used to: calculate a first sub-loss value of a preset generation network according to the core features of each disease; the first sub-loss value is negatively correlated with the similarity of the same disease, and is positively correlated with the similarity of different diseases; the similarity of the same disease is the similarity of the core features of the sample diseases of the medical image samples of the same disease, and the similarity of different diseases is the similarity of the core features of the sample diseases of the medical image samples of different diseases; calculate a second sub-loss value of the preset generation network according to each medical image sample and its corresponding restored sample; the second sub-loss value is related to multiple sample restoration degrees; the sample restoration degree is the similarity between the medical image sample and its corresponding restored sample; according to the non-core features and The corresponding random sampling features are used to calculate the third sub-loss value of the preset generation network; the third sub-loss value is related to multiple feature restoration degrees; the feature restoration degree is the similarity between the non-core features of the sample disease and its corresponding restored features; according to each medical image sample and its corresponding anonymous sample, the fourth sub-loss value of the preset generation network is calculated; the fourth sub-loss value is related to multiple sample anonymity degrees; the sample anonymity degree is the similarity between the medical image sample and its corresponding anonymous sample; the preset weights corresponding to the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value are used to perform weighted sum calculation on the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value to obtain the loss value of the preset generation network.

[0238] Optionally, the training modules are respectively used to: extract sample features of each medical image sample using a preset encoding network; the sample features include: sample disease core features and sample disease non-core features; calculate the loss value of the preset encoding network according to each sample disease core feature; use a preset decoding network to fuse and decode each sample disease core feature and its corresponding sample disease non-core feature to generate a restored sample corresponding to each medical image sample; calculate the loss value of the preset decoding network according to the sample features of each medical image sample and the corresponding restored sample; adjust the parameters of the preset encoding network and the parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network; repeatedly perform the steps from extracting sample features of each medical image sample using a preset encoding network to adjusting the parameters of the preset encoding network and the parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network, until the preset condition is met, or until the number of repetitions reaches a third number threshold, and obtain an intermediate encoding and decoding combination network, the preset condition is: the loss value of the preset encoding network is less than or equal to the loss threshold of the preset encoding network and the loss value of the preset decoding network is less than or equal to the loss threshold of the preset decoding network.

[0239] Optionally, the preset encoding network includes a plurality of convolution blocks connected in sequence, and also includes a first linear layer and a second linear layer; each convolution block includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence; the training modules are also used to: use each convolution block to perform convolution processing on each medical image sample in sequence to obtain the image features of each medical image sample; use the first linear layer and the second linear layer to perform first linear mapping processing and second linear mapping processing on the image features of the medical image samples, respectively, to obtain the core features of the sample disease and the non-core features of the sample disease.

[0240] Optionally, the training modules are also used to: extract intermediate features of the disease of each medical image sample using an intermediate coding network; the intermediate features include: intermediate disease core features and intermediate disease non-core features; perform at least one denoising process on each intermediate disease non-core feature to obtain each intermediate disease non-core noisy feature; use a preset random sampling module to generate a restored feature corresponding to each sample disease non-core feature based on each intermediate disease non-core noisy feature; calculate the loss value of the preset random sampling network based on each intermediate disease non-core feature and its corresponding restored feature; adjust the parameters of the preset random sampling network according to the loss value of the preset random sampling network; repeatedly perform the steps from using a preset random sampling module to generate a restored feature corresponding to each sample disease non-core feature based on each intermediate disease non-core noisy feature, to adjusting the parameters of the preset random sampling network according to the loss value of the preset random sampling network, until the loss value of the preset random sampling network is less than or equal to the preset random sampling network loss threshold, or until the number of repetitions reaches a fourth threshold, to obtain the intermediate random sampling network.

[0241] The model training device provided in this embodiment can execute the model training method provided in any of the above embodiments. The specific implementation method and principle are similar and will not be repeated here.

[0242] Embodiment 6

[0243] Fig.14 This is a schematic diagram of the structure of an electronic device provided in Example 6 of the present application. Fig.14 As shown, the electronic device 140 provided in this embodiment includes a memory 141 and at least one processor 142 communicatively connected to the memory 141 .

[0244] The memory 141 is used to store computer executable instructions.

[0245] At least one processor 142 executes computer-executable instructions stored in the memory 141 to implement an image processing method or a model training method as provided in any of the above embodiments. The specific implementation method and principle are similar and will not be repeated here.

[0246] The communication connection between the memory 141 and the processor 142 can be through a bus. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.14 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0247] The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk, etc.

[0248] The electronic device can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned image processing methods or model training methods.

[0249] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, they are used to implement the image processing method or model training method provided in any of the above embodiments, and the specific implementation method and principle are similar, and will not be repeated here. Exemplarily, the computer-readable storage medium can be a read-only memory, a random access memory, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0250] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method or model training method provided by any of the above embodiments. The specific implementation method and principle are similar and will not be repeated here.

[0251] It should be understood that the above device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of modules in the above embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple modules can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0252] In addition, unless otherwise specified, the functional modules in the various embodiments of the present application may be integrated into one module, or each module may exist physically separately, or two or more modules may be integrated together. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software program modules.

[0253] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0254] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0255] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0256] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. An image processing method, characterized in that: include: Acquire a trained generated network, wherein the trained generated network includes: a trained encoding network, a trained random sampling network, and a trained decoding network; Inputting a real medical image into the trained coding network, and using the trained coding network to extract and output the real disease core features in the real medical image; the trained coding network comprises a plurality of convolution blocks and a first linear layer connected in sequence, the plurality of convolution blocks are used to obtain the image features of the real medical image based on the real medical image, and the first linear layer is used to obtain the real disease core features of the real medical image based on the image features; Inputting random noise data into the trained random sampling network, and sequentially using at least one trained denoising sub-network in the trained random sampling network to denoise the random noise data, so as to generate and output random anonymous features corresponding to the real medical image; the similarity between the random anonymous features and the real disease non-core features in the real medical image is greater than a first similarity threshold; The real disease core features and the random anonymous features are input into the trained decoding network, and the trained decoding network is used to fuse and decode the real disease core features and the random anonymous features to generate and output anonymous medical images.

2. The method according to claim 1, characterized in that Each of the trained denoising sub-networks has the same structure and parameters; the input data and output data of the trained denoising sub-networks have the same shape; the trained denoising sub-networks include at least one convolutional combination network or linear layer, and the convolutional combination network includes a convolutional layer and a deconvolutional layer.

3. The method according to claim 1, characterized in that The convolution block includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence; The method of extracting and outputting the core features of the real disease in the real medical image using the trained encoding network includes: Using each convolution block to perform convolution processing on the real medical image data in turn to obtain the image features of the real medical image; the image features of the real medical image include the real disease core features and the real disease non-core features; A first linear layer is used to perform a first linear mapping process on the image features of the real medical image to obtain the real disease core features.

4. A model training method, characterized in that: include: Get the training data set and preset generation network; The training data set includes multiple medical image samples of multiple types of diseases; The preset generation network includes: a preset encoding network, a preset random sampling network and a preset decoding network; wherein the preset encoding network is used to extract the core features of each sample disease of each medical image sample; the preset encoding network includes a plurality of convolution blocks and a first linear layer connected in sequence, the plurality of convolution blocks are used to obtain the image features of each medical image sample based on the medical image samples, and the first linear layer is used to obtain the core features of each sample disease of each medical image sample based on each image feature; the preset random sampling network is used to sequentially use at least one denoising sub-network in the preset random sampling network to perform denoising processing on the input random noise data to generate random sampling features corresponding to each medical image sample, and the similarity between each random sampling feature and the non-core features of the sample disease in each medical image sample is greater than a first similarity threshold; the preset decoding network is used to fuse and decode the core features of each sample disease and the corresponding random sampling features to generate anonymous samples of each medical image sample; The preset generating network is trained as a whole using the training data set until the loss value of the preset generating network is less than or equal to a first loss threshold, or until the number of training times of the preset generating network reaches a first number threshold, to obtain a trained generating network; Alternatively, the training data set is used to train the preset codec combination network and the preset random sampling network in sequence to obtain an intermediate codec combination network and an intermediate random sampling network; the preset codec combination network includes a preset encoding network and a preset decoding network; the intermediate codec combination network includes an intermediate encoding network and an intermediate decoding network; The intermediate codec combination network and the random sampling network are used to form an intermediate generation network; The intermediate generation network is trained as a whole using the training data set until the loss value of the intermediate generation network is less than or equal to a second loss threshold, or until the number of training times of the intermediate generation network reaches a second number threshold, to obtain a trained generation network.

5. The method according to claim 4, characterized in that The method of using the training data set to train the preset generation network as a whole until the loss value of the preset generation network is less than or equal to a first loss threshold, or until the number of training times of the preset generation network reaches a first number threshold, to obtain a trained generation network, includes: Inputting the training data set and random noise data into the preset generation network; The preset coding network is used to extract sample features of each of the medical image samples; the sample features include: sample disease core features and sample disease non-core features; Performing at least one noise addition process on each of the sample disease non-core features to obtain the sample disease non-core noisy features corresponding to each of the sample disease non-core features; The preset random sampling network is used to generate the restoration features corresponding to the non-core features of each of the sample diseases based on the non-core noisy features of each of the sample diseases, and the random sampling features corresponding to each of the medical image samples are generated based on the random noise data; The preset decoding network is used to fuse and decode each of the sample disease core features with the corresponding sample disease non-core features to generate a restored sample corresponding to the medical image sample, and each of the sample disease core features is fused and decoded with each of the corresponding random sampling features to generate an anonymous sample of each of the medical image samples; Calculating the loss value of the preset generation network according to each of the medical image samples, each of the sample features, each of the restored features, each of the random sampling features, each of the restored samples, and each of the anonymous samples; Updating parameters of the preset generation network according to the loss value of the preset generation network; Repeat the step of inputting the training data set into the preset generation network to the step of updating the parameters of the preset generation network according to the loss value of the preset generation network, until the loss value of the preset generation network is less than or equal to the first loss threshold, or until the number of repetitions reaches the first threshold, and determine the preset generation network as a trained generation network.

6. The method according to claim 5, characterized in that The calculating the loss value of the preset generation network according to each of the medical image samples, each of the sample features, each of the restored features, each of the random sampling features, each of the restored samples and each of the anonymous samples comprises: According to each of the core features of the disease, a first sub-loss value of the preset generation network is calculated; the first sub-loss value is negatively correlated with the similarity of the same disease, and is positively correlated with the similarity of different diseases; the similarity of the same disease is the similarity of the core features of the sample diseases of the medical image samples of the same disease, and the similarity of the different diseases is the similarity of the core features of the sample diseases of the medical image samples of different diseases; According to each of the medical image samples and the corresponding restored samples, a second sub-loss value of the preset generation network is calculated; the second sub-loss value is related to a plurality of sample restoration degrees; the sample restoration degree is the similarity between the medical image sample and the corresponding restored sample; According to each of the non-core features of the sample disease and the corresponding restored features, a third sub-loss value of the preset generation network is calculated; the third sub-loss value is related to a plurality of feature restoration degrees; the feature restoration degree is the similarity between the non-core feature of the sample disease and the corresponding restored feature; According to each of the medical image samples and the corresponding anonymous samples, a fourth sub-loss value of the preset generation network is calculated; the fourth sub-loss value is related to a plurality of sample anonymity levels; the sample anonymity level is the similarity between the medical image sample and the corresponding anonymous sample; Using the preset weights corresponding to the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value respectively, the first sub-loss value, the second sub-loss value, the third sub-loss value and the fourth sub-loss value are weightedly summed to obtain the loss value of the preset generation network.

7. The method according to claim 4, characterized in that The preset codec combination network is trained using the training data set to obtain an intermediate codec combination network, including: The preset coding network is used to extract sample features of each of the medical image samples; the sample features include: sample disease core features and sample disease non-core features; Calculating the loss value of the preset encoding network according to the core features of each of the sample diseases; The preset decoding network is used to fuse and decode the core features of each of the sample diseases with the corresponding non-core features of the sample diseases, so as to generate a restored sample corresponding to each of the medical image samples; Calculating the loss value of the preset decoding network according to the sample characteristics of each of the medical image samples and the corresponding restored samples; Adjusting parameters of the preset encoding network and parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network; Repeat the step of extracting the sample features of each of the medical image samples using the preset encoding network to the step of adjusting the parameters of the preset encoding network and the parameters of the preset decoding network according to the loss value of the preset encoding network and the loss value of the preset decoding network until a preset condition is met, or until the number of repetitions reaches a third threshold, to obtain the intermediate encoding and decoding combination network, wherein the preset condition is that the loss value of the preset encoding network is less than or equal to the loss threshold of the preset encoding network and the loss value of the preset decoding network is less than or equal to the loss threshold of the preset decoding network.

8. The method according to claim 7, characterized in that The preset coding network also includes a second linear layer; each convolution block in the preset coding network includes a convolution layer, a pooling layer, a normalization layer, and an activation layer connected in sequence; The extracting the sample features of each of the medical image samples by using the preset encoding network includes: Using each convolution block to perform convolution processing on each of the medical image samples in turn to obtain image features of each of the medical image samples; The first linear layer and the second linear layer are used to perform first linear mapping processing and second linear mapping processing on the image features of the medical image sample respectively, so as to obtain the core features of the sample disease and the non-core features of the sample disease.

9. The method according to claim 7 or 8, characterized in that: After obtaining the intermediate codec combination network, the method further includes: The intermediate coding network is used to extract the intermediate features of the disease of each of the medical image samples; the intermediate features include: intermediate disease core features and intermediate disease non-core features; Performing at least one noise addition process on each of the intermediate disease non-core features to obtain each of the intermediate disease non-core noisy features; Using the preset random sampling network to generate the restored features corresponding to the non-core features of each sample disease based on the non-core noisy features of each intermediate disease; Calculating the loss value of the preset random sampling network according to each of the intermediate disease non-core features and the corresponding restored features; Adjusting parameters of the preset random sampling network according to the loss value of the preset random sampling network; Repeat the step of using the preset random sampling network to generate the restored features corresponding to the non-core features of each of the sample diseases based on the non-core noisy features of each of the intermediate diseases, to the step of adjusting the parameters of the preset random sampling network according to the loss value of the preset random sampling network, until the loss value of the preset random sampling network is less than or equal to the preset random sampling network loss threshold, or until the number of repetitions reaches a fourth threshold, to obtain the intermediate random sampling network.

10. An electronic device, characterized in that: include: a memory, and at least one processor communicatively connected to the memory; The memory is used to store computer-executable instructions; At least one processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.

12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 9.