CN111476760B - Medical image generation method and device, electronic equipment and medium - Google Patents
Medical image generation method and device, electronic equipment and medium Download PDFInfo
- Publication number
- CN111476760B CN111476760B CN202010186679.3A CN202010186679A CN111476760B CN 111476760 B CN111476760 B CN 111476760B CN 202010186679 A CN202010186679 A CN 202010186679A CN 111476760 B CN111476760 B CN 111476760B
- Authority
- CN
- China
- Prior art keywords
- image
- medical image
- sample
- standard
- discrimination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000007781 pre-processing Methods 0.000 claims abstract description 18
- 230000006870 function Effects 0.000 claims description 92
- 230000009466 transformation Effects 0.000 claims description 28
- 238000012545 processing Methods 0.000 claims description 26
- 238000004364 calculation method Methods 0.000 claims description 22
- 230000009467 reduction Effects 0.000 claims description 22
- 238000006243 chemical reaction Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 5
- 230000001172 regenerating effect Effects 0.000 claims description 4
- 238000012549 training Methods 0.000 abstract description 7
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000013473 artificial intelligence Methods 0.000 abstract description 2
- 238000001914 filtration Methods 0.000 description 6
- 238000013527 convolutional neural network Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 238000012216 screening Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 230000001174 ascending effect Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 201000010099 disease Diseases 0.000 description 2
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000000452 restraining effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009897 systematic effect Effects 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 230000017105 transposition Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
The invention relates to an artificial intelligence technology, and discloses a medical image generation method, which comprises the following steps: acquiring an original medical image and preprocessing the original medical image to obtain a standard medical image; generating a first sample image set from the standard medical image using a medical image generation model; and calculating the effective information quantity of the first sample image set, selecting first sample images corresponding to K effective information quantities to obtain an effective image set, inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to discriminate, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result to obtain a standard image generation model, and inputting the original medical image into the standard image generation model to generate a final medical image. The invention can solve the problem that the training of the medical image model consumes a great deal of human resources.
Description
Technical Field
The present invention relates to the field of artificial intelligence, and in particular, to a method and apparatus for generating a medical image, an electronic device, and a computer readable storage medium.
Background
Along with the development of technology, the medical level is higher and higher, and in the field of medical health, medical images have great significance for researching disease conditions, predicting diseases and developing medical technology. However, the number of medical images containing enough medical information is small, and the demand is large, so it is increasingly important how to train a high-efficiency and accurate medical image generation model to generate more medical images.
At present, generation of medical images is dependent on medical professionals with high professional knowledge level to manually screen a large number of samples, and then the samples are input into a pre-constructed model for training, so that a large amount of human resources are wasted.
Disclosure of Invention
The invention provides a medical image generation method, a device, electronic equipment and a computer readable storage medium, and mainly aims to solve the problem that a great deal of human resources are wasted in training of a medical image generation model.
In order to achieve the above object, the present invention provides a method for generating a medical image, including:
acquiring an original medical image, and performing conversion processing on the original medical image to obtain an original medical image;
performing cell enhancement treatment on the initial medical image to obtain a standard medical image;
Acquiring distribution data of each pixel information in the standard medical image, and generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data to obtain a first sample image set;
Calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting first sample images corresponding to K effective information quantities from the first sample image set according to the arrangement sequence of the effective information quantities to obtain an effective image set;
Inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, obtaining parameters of the image discrimination model at the moment, and obtaining a standard image generation model according to the parameters;
inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image.
Optionally, the converting the original medical image to obtain an initial medical image includes:
Converting the gray value of the original medical image to obtain an original gray image;
Carrying out noise reduction treatment on the original gray level image to obtain a noise reduction gray level image;
Performing geometric transformation on the noise reduction gray level map to obtain a transformation gray level map;
And carrying out contrast enhancement on the transformation gray level image to obtain the initial medical image.
Optionally, the performing cell enhancement processing on the initial medical image to obtain a standard medical image includes:
and calculating convolution of the initial medical image and a second-order Gaussian function by using the following calculation formula to obtain a scale space derivative I abc of the initial medical image:
Wherein I is the initial medical image; g (x, y, z) is a Gaussian function; x, y and z are parameters of the Gaussian function; sigma is the standard offset of the gaussian function; symbol/>, for calculating partial reciprocal For calculating the sign of convolution;
And performing cell enhancement on the initial medical image according to the scale space derivative I abc to obtain the standard medical image.
Optionally, the acquiring distribution data of each pixel information in the standard medical image, generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data, and obtaining a first sample image set includes:
Constructing a sample to generate a loss function F;
Inputting the distribution data of each pixel information in the standard medical image to the image generation model to generate an initial first sample image set;
inputting the initial first sample image set and the standard medical image into the sample generation loss function F for loss calculation to obtain a loss function value p;
when the loss function value p is greater than or equal to a preset loss threshold value m, adjusting parameters of the image generation model, and regenerating a first sample image;
When the loss function value p is smaller than the loss threshold value m, the first sample image set is obtained.
Optionally, the sample generation loss function F includes:
F=Lc-Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
Optionally, the inputting the effective image set and the standard medical image into an image discrimination model having a mutually constrained relationship with the image generation model to perform image discrimination, to obtain a discrimination result, and adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, to obtain parameters of the image discrimination model at the moment, including:
Constructing a discrimination loss function Y;
Inputting the standard medical image and the effective image set to the image discrimination model to generate the final medical image set;
Inputting the final medical image set and the effective image set into the discrimination loss function Y to perform loss calculation to obtain a loss function value q;
When the loss function value q is greater than or equal to a preset loss threshold value n, adjusting parameters of the image discrimination model, and reconstructing the final medical image;
and when the loss function value q is smaller than the loss threshold value n, obtaining the parameters of the image discrimination model at the moment.
Optionally, the discriminant loss function Y includes:
Y=Lc+Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
In order to solve the above problems, the present invention further provides a method and apparatus for generating a medical image, the apparatus comprising:
The image preprocessing module is used for acquiring an original medical image, converting the original medical image to obtain an initial medical image, and performing cell enhancement on the initial medical image to obtain a standard medical image;
the first sample image generation module is used for acquiring distribution data of each pixel information in the standard medical image, generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data, and obtaining a first sample image set;
The effective information calculation module is used for calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting the first sample images corresponding to K effective information quantities from the first sample image set according to the arrangement sequence of the effective information quantities to obtain an effective image set;
The image discrimination module is used for inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to carry out image discrimination, so as to obtain a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, obtaining parameters of the image discrimination model at the moment, and obtaining a standard image generation model according to the parameters; inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
a memory storing at least one instruction; and
A processor executing instructions stored in the memory to implement the method of generating a medical image as described in any one of the above.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one instruction that is executed by a processor in an electronic device to implement the method of generating a medical image according to any one of the above-mentioned.
According to the embodiment of the invention, according to the distribution data of each pixel information in the standard medical image, a plurality of first sample images similar to the standard medical image are generated by using the image generation model, so that the preliminary training of the image generation model is realized, and the first sample images can be generated for subsequent use; further, effective information quantity calculation is carried out on the first sample image set, K first sample images corresponding to the effective information quantity are selected from the first sample image set according to the arrangement sequence of the effective information quantity, so that an effective image set is obtained, medical images with more effective information are screened out, the generation quality of subsequent images is further ensured, and meanwhile, manual screening of samples one by one is avoided; inputting the effective image set and the standard medical image into an image discrimination model with a mutual constraint relation with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result, and further adjusting parameters of the image generation model by utilizing the constraint relation between the image discrimination model and the image generation model, thereby realizing retraining of the image generation model and ensuring the accuracy of the image generation model in image generation. Therefore, the medical image generation method, the medical image generation device and the computer readable storage medium can automatically screen the first sample images in batches, automatically train an accurate medical image model, generate a final medical image and save a large amount of human resources.
Drawings
FIG. 1 is a flowchart of a method for generating a medical image according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of a method for generating a medical image according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device according to a method for generating a medical image according to an embodiment of the present invention;
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The invention provides a method for generating medical images. Referring to fig. 1, a flowchart of a method for generating a medical image according to an embodiment of the present invention is shown. The method may be performed by an apparatus, which may be implemented in software and/or hardware.
In this embodiment, the method for generating a medical image includes:
s1, acquiring an original medical image, and performing conversion processing on the original medical image to obtain an initial medical image.
In the embodiment of the invention, the original medical image can be a b-mode image, a color ultrasonic image and the like stored in a hospital.
In the embodiment of the present invention, the converting the original medical image to obtain an initial medical image includes:
Converting the gray value of the original medical image to obtain an original gray image;
Carrying out noise reduction treatment on the original gray level image to obtain a noise reduction gray level image;
Performing geometric transformation on the noise reduction gray level map to obtain a transformation gray level map;
And carrying out contrast enhancement on the transformation gray level image to obtain the initial medical image.
The step of converting the gray value of the original medical image to obtain an original gray image comprises the following steps:
And inputting all pixels in the original medical image into a gray value conversion formula to perform gray value conversion, and generating the original gray image according to the converted gray value.
The gray value conversion formula is as follows:
Gray=0.30*R+0.59*G+0.11*B
Wherein R, G, B are three components of pixels in the package original medical image, and Gray is a converted Gray value.
Further, in an embodiment of the present invention, the performing the noise reduction processing on the original gray scale image to obtain a noise reduction gray scale image includes:
And replacing the pixel value of any pixel point in the original gray level image with the median value of the pixel values of all the pixel points in a neighborhood of the pixel point, and enabling the pixel values around the any pixel point to be close to the true value, so that isolated noise points are eliminated.
In detail, the neighborhood may be a preset two-dimensional sliding template with a circular structure, and pixels in the two-dimensional sliding template are ordered according to the size of the pixel values, so as to generate a monotonically ascending (or descending) two-dimensional data sequence, so as to find the median value of the pixel values of all the pixel points in the neighborhood.
In detail, the embodiment of the invention performs noise reduction processing on the original gray-scale image by using the following calculation formula to obtain the noise-reduced gray-scale image:
g(x,y)=med{f(x-j,y-k),(j,k∈W)}
Wherein f (x, y) is the original gray scale map; g (x, y) is the noise reduction gray scale image, and W is a two-dimensional sliding template; j. k is the coordinates of the pixel points on the boundary of the two-dimensional sliding template; med is a noise reduction processing operation.
Further, the performing geometric transformation processing on the noise reduction gray scale map to obtain a transformation gray scale map includes:
Correcting systematic errors and random errors generated by instrument positions generated in the original medical image acquisition process by performing geometric transformation processing such as translation, transposition, mirroring, rotation, scaling and the like on the noise-reduction gray level map; and after the geometric transformation processing is completed, obtaining the transformation gray scale image.
The contrast refers to the contrast between the maximum and minimum values of the pixel lighting brightness in the image.
The embodiment of the invention can carry out contrast enhancement on the transformation gray scale image by adopting a contrast stretching method.
The contrast stretching method is also called gray stretching. According to the embodiment of the invention, the piecewise linear transformation function in the contrast stretching method is used for carrying out gray stretching on a specific area in the original gray map according to actual requirements, so that the contrast of the transformed gray map is enhanced, and an initial medical image is obtained. In detail, the contrast enhancement of the transformed gray scale image to obtain an initial medical image includes:
And carrying out contrast enhancement on the transformation gray level map by using the following piecewise linear transformation function formula to obtain the initial medical image:
Db=f(Da)=a*Da+b
Where a is the linear slope, b is the intercept of D b on the Y-axis, D a represents the gray value of the input transformed gray map, and D b represents the gray value of the output of the initial medical image.
S2, performing cell enhancement treatment on the initial medical image to obtain a standard medical image.
Considering that cells are in linear shapes, the embodiment of the invention can obtain the linear enhancement filtering applicable to the cells under different standard deviation values of the standard medical image by different values of the standard deviation values of the preset Gaussian function.
The linear enhancement filtering may be used to perform cell enhancement on the initial medical image.
According to the convolution property of the Gaussian function, the embodiment of the invention calculates the convolution of the initial medical image and the second-order Gaussian function to obtain the scale space derivative I abc of the standard medical image:
Wherein I is the initial medical image; g (x, y, z) is a Gaussian function; x, y and z are parameters of the Gaussian function; sigma is the standard offset of the gaussian function; symbol/>, for calculating partial reciprocal For convolving the operation symbols.
Further, according to the embodiment of the invention, the matrix H is obtained by taking different values of the standard offset of the Gaussian function:
Wherein the elements in the matrix are values of the scale space derivative I abc at different standard offset values.
From the linear nature of the gaussian function, it can be seen that an optimal linear enhancement filter can be obtained if and only if the magnitude of the standard offset σ of the gaussian function is exactly equal to the actual width of the cell, and the initial medical image is cell enhanced with the optimal linear enhancement filter.
In summary, in the embodiment of the present invention, the initial medical image is calculated as described above, and the size of the standard offset is adjusted to be equal to the actual width of the cells in the initial medical image, so as to obtain the optimal linear enhancement filtering, thereby implementing cell enhancement on the initial medical image, and obtaining the standard medical image.
S3, acquiring distribution data of pixel information in the standard medical image, and generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data to obtain a first sample image set.
The embodiment of the invention can acquire the distribution data of each pixel information in the standard medical image by using the existing munpy (digital Python) method and the like.
In the embodiment of the invention, the image generation model is a sample convolutional neural network constructed by noise subjected to specific distribution.
The image generation model can generate a plurality of first sample images of the standard medical image by using a preset image generation model according to the distribution data, so as to obtain a first sample image set.
In detail, the S3 includes:
Constructing a sample to generate a loss function F;
Inputting the distribution data of each pixel information in the standard medical image to the image generation model to generate an initial first sample image set;
inputting the initial first sample image set and the standard medical image into the sample generation loss function F for loss calculation to obtain a loss function value p;
when the loss function value p is greater than or equal to a preset loss threshold value m, adjusting parameters of the image generation model, and regenerating a first sample image;
When the loss function value p is smaller than the loss threshold value m, the first sample image set is obtained.
Wherein the sample generation loss function F includes:
F=Lc-Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
The embodiment of the invention utilizes the image generation model to generate a plurality of first sample images so as to obtain the first sample image set.
In detail, only a part of each pixel information of the standard medical image contains effective information useful for medical treatment, so that only a part of each pixel information of the generated first sample image also contains the effective information. Therefore, the effective information contained in the first sample image set generated by S3 is still insufficient to meet the medical research requirements, and further S4 described below is required to perform screening.
S4, calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting the first sample images corresponding to the K effective information quantities from the first sample image set according to the arrangement sequence of the effective information quantities to obtain the effective image set.
In detail, in the embodiment of the present invention, the effective information amount R of each first sample image in the first sample image set is calculated using the following effective information amount calculation formula:
B is the number of pixels containing effective information in the first sample image; a is the total number of pixels in the first sample image.
The number of pixels containing effective information in the first sample image can be identified and acquired by using the existing image identification technology.
Further, when the calculation is completed, the embodiment of the invention arranges the effective information amounts in the first sample images in order from more to less, and selects k first sample images with the largest effective information amounts from the arrangement to obtain the effective image set.
S5, inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, obtaining parameters of the image discrimination model at the moment, and obtaining a standard image generation model according to the parameters; inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image.
In detail, the image discrimination model is a convolutional neural network for image discrimination.
The mutually constrained relationship means that the parameters in the loss functions of the image generation model and the image discrimination model are the same, and the synchronous change, for example, one of the parameters of the image discrimination model becomes "a", and the corresponding parameter of the image generation model also becomes "a".
In detail, the inputting the effective image set and the standard medical image into an image discrimination model having a mutually constrained relation with the image generation model to perform image discrimination to obtain a discrimination result, and adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, to obtain parameters of the image discrimination model at the moment, including:
constructing a discrimination loss function Y, and restraining the image discrimination model by using the discrimination loss function Y;
Inputting the standard medical image and the effective image set to the image discrimination model to generate the final medical image set;
Inputting the final medical image set and the effective image set into the discrimination loss function Y to perform loss calculation to obtain a loss function value q;
When the loss function value q is larger than or equal to a preset loss threshold value n, the fact that a final medical image set generated by the image discrimination model is dissimilar to an effective image set is indicated, and parameters of the image discrimination model are adjusted, and the final medical image is regenerated;
And when the loss function value q is smaller than the loss threshold value n, the final medical image set generated by the image discrimination model is similar to the effective image set, and training is completed, so that the image discrimination model parameters are obtained.
Wherein, the discrimination loss function Y is as follows:
Y=Lc+Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
Further, the original medical image is input to the standard image generation model, a second sample image set is generated, and a final medical image is generated according to the second sample image. According to the embodiment of the invention, according to the distribution data of the pixel information in the standard medical image, the image generation model is utilized to generate a plurality of first sample images similar to the standard medical image, so that the preliminary training of the image generation model is realized, and the first sample images can be generated for subsequent use; further, effective information quantity calculation is carried out on the first sample image set, K first sample images corresponding to the effective information quantity are selected from the first sample image set according to the arrangement sequence of the effective information quantity, so that an effective image set is obtained, medical images with more effective information are screened out, the generation quality of subsequent images is further ensured, and meanwhile, manual screening of samples one by one is avoided; inputting the effective image set and the standard medical image into an image discrimination model with a mutual constraint relation with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result, and further adjusting parameters of the image generation model by utilizing the constraint relation between the image discrimination model and the image generation model, thereby realizing retraining of the image generation model and ensuring the accuracy of the image generation model in image generation. Therefore, the medical image generation method, the medical image generation device and the computer readable storage medium can automatically screen the first sample images in batches, automatically train an accurate medical image model, generate a final medical image and save a large amount of human resources.
As shown in fig. 2, a functional block diagram of the medical image generating method and apparatus according to the present invention is shown.
The medical image generation method 100 of the present invention may be installed in an electronic device. The medical image generating method and apparatus may include an image preprocessing module 101, a first sample image generating module 102, a valid information calculating module 103, and an image discriminating module 104 according to the implemented functions. The module of the present invention may also be referred to as a unit, meaning a series of computer program segments capable of being executed by the processor of the electronic device and of performing fixed functions, stored in the memory of the electronic device.
In the present embodiment, the functions concerning the respective modules/units are as follows:
The image preprocessing module 101 is configured to obtain an original medical image, perform conversion processing on the original medical image to obtain an initial medical image, and perform cell enhancement processing on the initial medical image to obtain a standard medical image;
the first sample image generating module 102 is configured to obtain distribution data of each pixel information in the standard medical image, generate a plurality of first sample images similar to the standard medical image by using an image generating model according to the distribution data, and obtain a first sample image set;
The effective information calculating module 103 is configured to perform effective information amount calculation on the first sample image set to obtain an effective information amount of each first sample image in the first sample image set, and select, according to an arrangement order of the effective information amounts, first sample images corresponding to K effective information amounts from the first sample image set to obtain an effective image set;
The image discriminating module 104 is configured to input the effective image set and the standard medical image into an image discriminating model having a mutually constrained relationship with the image generating model, perform image discrimination to obtain a discriminating result, adjust parameters of the image discriminating model according to the discriminating result until the discriminating result meets a preset requirement, obtain parameters of the image discriminating model at this time, and obtain the standard image generating model according to the parameters.
In detail, the specific implementation steps of each module of the medical image generation method device are as follows:
The image preprocessing module 101 acquires an original medical image, performs conversion processing on the original medical image to obtain an initial medical image, and performs cell enhancement processing on the initial medical image to obtain a standard medical image.
In the embodiment of the invention, the original medical image can be a b-mode image, a color ultrasonic image and the like stored in a hospital.
In the embodiment of the present invention, the image preprocessing module 101 performs conversion processing on the original medical image to obtain an initial medical image, including:
Converting the gray value of the original medical image to obtain an original gray image;
Carrying out noise reduction treatment on the original gray level image to obtain a noise reduction gray level image;
Performing geometric transformation on the noise reduction gray level map to obtain a transformation gray level map;
And carrying out contrast enhancement on the transformation gray level image to obtain the initial medical image.
The image preprocessing module 101 performs gray value conversion on the original medical image to obtain an original gray image, which includes:
And inputting all pixels in the original medical image into a gray value conversion formula to perform gray value conversion, and generating the original gray image according to the converted gray value.
The gray value conversion formula is as follows:
Gray=0.30*R+0.59*G+0.11*B
Wherein R, G, B are three components of pixels in the package original medical image, and Gray is a converted Gray value.
Further, in the embodiment of the present invention, the image preprocessing module 101 performs noise reduction processing on the original gray scale image to obtain a noise-reduced gray scale image, including:
And replacing the pixel value of any pixel point in the original gray level image with the median value of the pixel values of all the pixel points in a neighborhood of the pixel point, and enabling the pixel values around the any pixel point to be close to the true value, so that isolated noise points are eliminated.
In detail, the neighborhood may be a preset two-dimensional sliding template with a circular structure, and pixels in the two-dimensional sliding template are ordered according to the size of the pixel values, so as to generate a monotonically ascending (or descending) two-dimensional data sequence, so as to find the median value of the pixel values of all the pixel points in the neighborhood.
In detail, the image preprocessing module 101 performs a noise reduction process on the original gray-scale image by using the following calculation formula, to obtain the noise-reduced gray-scale image:
g(x,y)=med{f(x-j,y-k),(j,k∈W)}
Wherein f (x, y) is the original gray scale map; g (x, y) is the noise reduction gray scale image, and W is a two-dimensional sliding template; j. k is the coordinates of the pixel points on the boundary of the two-dimensional sliding template; med is a noise reduction processing operation.
Further, the image preprocessing module 101 performs geometric transformation processing on the noise reduction gray scale map to obtain a transformation gray scale map, which includes:
Correcting systematic errors and random errors generated by instrument positions generated in the original medical image acquisition process by performing geometric transformation processing such as translation, transposition, mirroring, rotation, scaling and the like on the noise-reduction gray level map; and after the geometric transformation processing is completed, obtaining the transformation gray scale image.
The contrast refers to the contrast between the maximum and minimum values of the pixel lighting brightness in the image.
The image preprocessing module 101 may use a contrast stretching method to contrast-enhance the transformed gray scale map.
The contrast stretching method is also called gray stretching. According to the embodiment of the invention, the image preprocessing module 101 performs gray scale stretching on a specific area in the original gray scale image according to actual requirements by using a piecewise linear transformation function in a contrast stretching method, so that the contrast of the transformed gray scale image is enhanced, and an initial medical image is obtained. In detail, the contrast enhancement of the transformed gray scale image to obtain an initial medical image includes:
The image preprocessing module 101 performs contrast enhancement on the transformed gray-scale image by using the following piecewise linear transformation function formula to obtain the initial medical image:
Db=f(Da)=a*Da+b
Where a is the linear slope, b is the intercept of D b on the Y-axis, D a represents the gray value of the input transformed gray map, and D b represents the gray value of the output of the initial medical image.
Considering that cells are all in a linear form, the image preprocessing module 101 according to the embodiment of the present invention can obtain the linear enhancement filtering applicable to the cells under different standard deviation values of the standard medical image by different standard deviation values of the preset gaussian function.
The linear enhancement filtering may be used to perform cell enhancement on the initial medical image.
According to the embodiment of the invention, the image preprocessing module 101 calculates the convolution of the initial medical image and the second-order Gaussian function according to the convolution property of the Gaussian function to obtain the scale space derivative I abc of the standard medical image:
Wherein I is the initial medical image; g (x, y, z) is a Gaussian function; x, y and z are parameters of the Gaussian function; sigma is the standard offset of the gaussian function; symbol/>, for calculating partial reciprocal For convolving the operation symbols.
Further, in the embodiment of the present invention, the image preprocessing module 101 obtains the matrix H by taking different values of the standard offset of the gaussian function:
Wherein the elements in the matrix are values of the scale space derivative I abc at different standard offset values.
From the linear nature of the gaussian function, it can be seen that an optimal linear enhancement filter can be obtained if and only if the magnitude of the standard offset σ of the gaussian function is exactly equal to the actual width of the cell, and the initial medical image is cell enhanced with the optimal linear enhancement filter.
In summary, in the embodiment of the present invention, the image preprocessing module 101 performs the above calculation on the initial medical image, adjusts the standard offset to be equal to the actual width of the cells in the initial medical image, so as to obtain the optimal linear enhancement filtering, and further performs cell enhancement on the initial medical image, so as to obtain the standard medical image.
The first sample image generating module 102 acquires distribution data of each pixel information in the standard medical image, and generates a plurality of first sample images similar to the standard medical image by using an image generating model according to the distribution data to obtain a first sample image set.
The first sample image generating module 102 according to the embodiment of the present invention may acquire the distribution data of each pixel information in the standard medical image by using an existing munpy (digital Python) method.
In the embodiment of the invention, the image generation model is a sample convolutional neural network constructed by noise subjected to specific distribution.
The image generation model can generate a plurality of first sample images of the standard medical image by using a preset image generation model according to the distribution data, so as to obtain a first sample image set.
In detail, the first sample image generating module 102 obtains distribution data of each pixel information in the standard medical image, generates a plurality of first sample images similar to the standard medical image according to the distribution data by using an image generating model, and obtaining a first sample image set includes:
Constructing a sample to generate a loss function F;
Inputting the distribution data of each pixel information in the standard medical image to the image generation model to generate an initial first sample image set;
inputting the initial first sample image set and the standard medical image into the sample generation loss function F for loss calculation to obtain a loss function value p;
when the loss function value p is greater than or equal to a preset loss threshold value m, adjusting parameters of the image generation model, and regenerating a first sample image;
When the loss function value p is smaller than the loss threshold value m, the first sample image set is obtained.
Wherein the sample generation loss function F includes:
F=Lc-Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
The embodiment of the invention utilizes the image generation model to generate a plurality of first sample images so as to obtain the first sample image set.
In detail, only a part of each pixel information of the standard medical image contains effective information useful for medical treatment, so that only a part of each pixel information of the generated first sample image also contains the effective information. Therefore, the effective information contained in the first sample image set is still insufficient to meet the medical research requirements, and further screening is required.
The effective information calculating module 103 calculates the effective information amount of the first sample image set to obtain the effective information amount of each first sample image in the first sample image set, and selects the first sample images corresponding to the K effective information amounts from the first sample image set according to the arrangement sequence of the effective information amounts to obtain the effective image set.
In detail, the effective information calculating module 103 according to the embodiment of the present invention calculates the effective information amount R of each first sample image in the first sample image set using the following effective information amount calculation formula:
B is the number of pixels containing effective information in the first sample image; a is the total number of pixels in the first sample image.
The number of pixels containing effective information in the first sample image can be identified and acquired by using the existing image identification technology.
Further, when the calculation is completed, the effective information calculating module 103 according to the embodiment of the present invention arranges the effective information amounts in the first sample images in order from more to less, and selects k first sample images with the largest effective information amounts from the arrangement, so as to obtain the effective image set.
The image discriminating module 104 inputs the effective image set and the standard medical image into an image discriminating model which has a mutually constrained relation with the image generating model to carry out image discrimination, a discriminating result is obtained, parameters of the image discriminating model are adjusted according to the discriminating result until the discriminating result meets a preset requirement, parameters of the image discriminating model at the moment are obtained, and a standard image generating model is obtained according to the parameters; inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image.
In detail, the image discrimination model is a convolutional neural network for image discrimination.
The mutually constrained relationship means that the parameters in the loss functions of the image generation model and the image discrimination model are the same, and the synchronous change, for example, one of the parameters of the image discrimination model becomes "a", and the corresponding parameter of the image generation model also becomes "a".
In detail, the image discriminating module 104 inputs the effective image set and the standard medical image into an image discriminating model having a mutually constrained relationship with the image generating model to perform image discrimination, so as to obtain a discriminating result, adjusts parameters of the image discriminating model according to the discriminating result, and obtains the parameters of the image discriminating model at this time until the discriminating result meets a preset requirement, including:
constructing a discrimination loss function Y, and restraining the image discrimination model by using the discrimination loss function Y;
Inputting the standard medical image and the effective image set to the image discrimination model to generate the final medical image set;
Inputting the final medical image set and the effective image set into the discrimination loss function Y to perform loss calculation to obtain a loss function value q;
When the loss function value q is larger than or equal to a preset loss threshold value n, the fact that a final medical image set generated by the image discrimination model is dissimilar to an effective image set is indicated, and parameters of the image discrimination model are adjusted, and the final medical image is regenerated;
And when the loss function value q is smaller than the loss threshold value n, the final medical image set generated by the image discrimination model is similar to the effective image set, and training is completed, so that the image discrimination model parameters are obtained.
Wherein, the discrimination loss function Y is as follows:
Y=Lc+Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
Further, the original medical image is input to the standard image generation model, a second sample image set is generated, and a final medical image is generated according to the second sample image.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the method for generating a medical image according to the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a training program 12 of the medical image model.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of a training program 12 of a medical image model, etc., but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects the respective components of the entire electronic device using various interfaces and lines, executes programs or modules stored in the memory 11 (for example, executes a medical image generation program 12 or the like), and invokes data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
The bus may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 3 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
Further, the electronic device 1 may also comprise a network interface, optionally the network interface may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the electronic device 1 and other electronic devices.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The medical image generation method program 12 stored in the memory 11 in the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
acquiring an original medical image, and performing conversion processing on the original medical image to obtain an original medical image;
performing cell enhancement treatment on the initial medical image to obtain a standard medical image;
Acquiring distribution data of pixel information in the standard medical image, and generating a plurality of first sample images similar to the standard medical image by using a preset image generation model according to the distribution data to obtain a first sample image set;
Calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting first sample images corresponding to K effective information quantities from the first sample image set to obtain an effective image set;
and inputting the effective image set and the standard medical image into a preset image discrimination model which has a mutual constraint relation with the image generation model to perform image discrimination, obtaining a discrimination result, inputting the discrimination result into a loss function to obtain a loss function value, and obtaining the image discrimination model parameters at the moment when the loss function value of the image discrimination model is smaller than a preset loss threshold value, and obtaining a final image generation model and an image discrimination model according to the parameters.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of fig. 2, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.
Claims (9)
1. A method of generating a medical image, the method comprising:
acquiring an original medical image, and performing conversion processing on the original medical image to obtain an original medical image;
performing cell enhancement treatment on the initial medical image to obtain a standard medical image;
acquiring distribution data of each pixel information in the standard medical image, and generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data to obtain a first sample image set;
Calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting first sample images corresponding to K effective information quantities from the first sample image set according to the arrangement sequence of the effective information quantities to obtain an effective image set;
Inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, obtaining parameters of the image discrimination model at the moment, and obtaining a standard image generation model according to the parameters;
Inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image;
The cell enhancement processing is performed on the initial medical image to obtain a standard medical image, which comprises the following steps:
And calculating convolution of the initial medical image and a second-order Gaussian function by using the following calculation formula to obtain a scale space derivative I xyz of the initial medical image:
Wherein I is the initial medical image; g (x, y, z) is a Gaussian function; x, y and z are parameters of the Gaussian function; sigma is the standard offset of the gaussian function; Calculating a symbol for calculating the offset reciprocal; /(I) For calculating the sign of convolution;
And performing cell enhancement on the initial medical image according to the scale space derivative I xyz to obtain the standard medical image.
2. The method for generating a medical image according to claim 1, wherein the converting the original medical image to obtain an initial medical image includes:
Converting the gray value of the original medical image to obtain an original gray image;
Carrying out noise reduction treatment on the original gray level image to obtain a noise reduction gray level image;
Performing geometric transformation on the noise reduction gray level map to obtain a transformation gray level map;
And carrying out contrast enhancement on the transformation gray level image to obtain the initial medical image.
3. The method for generating a medical image according to claim 1, wherein the acquiring distribution data of each pixel information in the standard medical image, generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data, and obtaining a first sample image set includes:
Constructing a sample to generate a loss function F;
Inputting the distribution data of each pixel information in the standard medical image to the image generation model to generate an initial first sample image set; inputting the initial first sample image set and the standard medical image into the sample generation loss function F for loss calculation to obtain a loss function value p;
when the loss function value p is greater than or equal to a preset loss threshold value m, adjusting parameters of the image generation model, and regenerating a first sample image;
When the loss function value p is smaller than the loss threshold value m, the first sample image set is obtained.
4. A method of generating a medical image according to claim 3, wherein the sample generation loss function F comprises:
F=Lc-Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
5. The method for generating a medical image according to claim 1, wherein inputting the valid image set and the standard medical image into an image discrimination model having a mutually constrained relationship with the image generation model to perform image discrimination, obtaining a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result satisfies a preset requirement, obtaining parameters of the image discrimination model at this time, comprising:
Constructing a discrimination loss function Y;
Inputting the standard medical image and the effective image set into the image discrimination model to generate a final medical image set;
Inputting the final medical image set and the effective image set into the discrimination loss function Y to perform loss calculation to obtain a loss function value q;
When the loss function value q is greater than or equal to a preset loss threshold value n, adjusting parameters of the image discrimination model, and reconstructing the final medical image;
and when the loss function value q is smaller than the loss threshold value n, obtaining the parameters of the image discrimination model at the moment.
6. The method of generating a medical image according to claim 5, wherein the discriminating loss function Y includes:
Y=Lc+Ls
Lc=E[logP(C|Xreal)]+E[logP(C|Xfake)]
Ls=E[logP(S|Xreal)]+E[logP(S|Xfake)]
Wherein E is the operation of obtaining the expected value; lc is an expected value of the similarity of the first sample image to the standard medical image; ls is the expected value of the effective information amount in the standard medical image; xreal is the standard medical image; xfake is the first sample image; c is the effective information amount in the first sample image; s is the effective information amount in the standard medical image.
7. A medical image generation apparatus for implementing the medical image generation method according to any one of claims 1 to 6, characterized in that the apparatus comprises:
The image preprocessing module is used for acquiring an original medical image, converting the original medical image to obtain an initial medical image, and performing cell enhancement on the initial medical image to obtain a standard medical image;
the first sample image generation module is used for acquiring distribution data of each pixel information in the standard medical image, generating a plurality of first sample images similar to the standard medical image by using an image generation model according to the distribution data, and obtaining a first sample image set;
The effective information calculation module is used for calculating the effective information quantity of the first sample image set to obtain the effective information quantity of each first sample image in the first sample image set, and selecting the first sample images corresponding to K effective information quantities from the first sample image set according to the arrangement sequence of the effective information quantities to obtain an effective image set;
The image discrimination module is used for inputting the effective image set and the standard medical image into an image discrimination model which has a mutually constrained relation with the image generation model to carry out image discrimination, so as to obtain a discrimination result, adjusting parameters of the image discrimination model according to the discrimination result until the discrimination result meets a preset requirement, obtaining parameters of the image discrimination model at the moment, and obtaining a standard image generation model according to the parameters; inputting the original medical image into the standard image generation model, generating a second sample image set, and generating a final medical image according to the second sample image.
8. An electronic device, the electronic device comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of generating a medical image according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of generating a medical image according to any one of claims 1 to 6.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010186679.3A CN111476760B (en) | 2020-03-17 | 2020-03-17 | Medical image generation method and device, electronic equipment and medium |
PCT/CN2020/098947 WO2021184576A1 (en) | 2020-03-17 | 2020-06-29 | Medical image generation method and apparatus, electronic device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010186679.3A CN111476760B (en) | 2020-03-17 | 2020-03-17 | Medical image generation method and device, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111476760A CN111476760A (en) | 2020-07-31 |
CN111476760B true CN111476760B (en) | 2024-05-10 |
Family
ID=71748220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010186679.3A Active CN111476760B (en) | 2020-03-17 | 2020-03-17 | Medical image generation method and device, electronic equipment and medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111476760B (en) |
WO (1) | WO2021184576A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112233194B (en) * | 2020-10-15 | 2023-06-02 | 平安科技(深圳)有限公司 | Medical picture optimization method, device, equipment and computer readable storage medium |
CN113989548B (en) * | 2021-10-20 | 2024-07-02 | 平安银行股份有限公司 | Certificate classification model training method and device, electronic equipment and storage medium |
CN114820357B (en) * | 2022-04-11 | 2023-05-05 | 深圳明锐理想科技有限公司 | X-ray image processing method and device, electronic equipment and storage medium |
CN114463602B (en) * | 2022-04-12 | 2022-07-08 | 北京云恒科技研究院有限公司 | Target identification data processing method based on big data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106295682A (en) * | 2016-08-02 | 2017-01-04 | 厦门美图之家科技有限公司 | A kind of judge the method for the picture quality factor, device and calculating equipment |
CN109948707A (en) * | 2019-03-20 | 2019-06-28 | 腾讯科技(深圳)有限公司 | Model training method, device, terminal and storage medium |
CN110070540A (en) * | 2019-04-28 | 2019-07-30 | 腾讯科技(深圳)有限公司 | Image generating method, device, computer equipment and storage medium |
CN110147699A (en) * | 2018-04-12 | 2019-08-20 | 北京大学 | A kind of image-recognizing method, device and relevant device |
CN110853047A (en) * | 2019-10-12 | 2020-02-28 | 平安科技(深圳)有限公司 | Intelligent image segmentation and classification method and device and computer readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9036044B1 (en) * | 2013-07-22 | 2015-05-19 | Google Inc. | Adjusting camera parameters associated with a plurality of images |
US10740866B2 (en) * | 2018-06-26 | 2020-08-11 | International Business Machines Corporation | Determining appropriate medical image processing pipeline based on machine learning |
-
2020
- 2020-03-17 CN CN202010186679.3A patent/CN111476760B/en active Active
- 2020-06-29 WO PCT/CN2020/098947 patent/WO2021184576A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106295682A (en) * | 2016-08-02 | 2017-01-04 | 厦门美图之家科技有限公司 | A kind of judge the method for the picture quality factor, device and calculating equipment |
CN110147699A (en) * | 2018-04-12 | 2019-08-20 | 北京大学 | A kind of image-recognizing method, device and relevant device |
CN109948707A (en) * | 2019-03-20 | 2019-06-28 | 腾讯科技(深圳)有限公司 | Model training method, device, terminal and storage medium |
CN110070540A (en) * | 2019-04-28 | 2019-07-30 | 腾讯科技(深圳)有限公司 | Image generating method, device, computer equipment and storage medium |
CN110853047A (en) * | 2019-10-12 | 2020-02-28 | 平安科技(深圳)有限公司 | Intelligent image segmentation and classification method and device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2021184576A1 (en) | 2021-09-23 |
CN111476760A (en) | 2020-07-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111476760B (en) | Medical image generation method and device, electronic equipment and medium | |
CN111652845B (en) | Automatic labeling method and device for abnormal cells, electronic equipment and storage medium | |
CN112446839B (en) | Image enhancement method, image enhancement device, electronic equipment and computer readable storage medium | |
WO2022121156A1 (en) | Method and apparatus for detecting target object in image, electronic device and readable storage medium | |
CN112233125B (en) | Image segmentation method, device, electronic equipment and computer readable storage medium | |
CN111932547B (en) | Method and device for segmenting target object in image, electronic device and storage medium | |
CN111932564B (en) | Picture identification method and device, electronic equipment and computer readable storage medium | |
CN113283446B (en) | Method and device for identifying object in image, electronic equipment and storage medium | |
CN111932482A (en) | Method and device for detecting target object in image, electronic equipment and storage medium | |
CN111932534B (en) | Medical image picture analysis method and device, electronic equipment and readable storage medium | |
CN111696084B (en) | Cell image segmentation method, device, electronic equipment and readable storage medium | |
CN111783982B (en) | Method, device, equipment and medium for acquiring attack sample | |
CN111933274B (en) | Disease classification diagnosis method, device, electronic equipment and storage medium | |
CN112990374B (en) | Image classification method, device, electronic equipment and medium | |
CN112016560B (en) | Method and device for identifying coverage text, electronic equipment and storage medium | |
CN112132812A (en) | Certificate checking method and device, electronic equipment and medium | |
CN111695615A (en) | Vehicle damage assessment method and device based on artificial intelligence, electronic equipment and medium | |
CN113627394B (en) | Face extraction method and device, electronic equipment and readable storage medium | |
CN111932563B (en) | Picture region segmentation method and device, electronic equipment and storage medium | |
CN111915615B (en) | Image segmentation method, device, electronic equipment and computer readable storage medium | |
CN112862703A (en) | Image correction method and device based on mobile photographing, electronic equipment and medium | |
CN113705686B (en) | Image classification method, device, electronic equipment and readable storage medium | |
CN114511569B (en) | Tumor marker-based medical image identification method, device, equipment and medium | |
CN115908175A (en) | Low-illumination image multi-level enhancement method and device, electronic equipment and storage medium | |
CN112233194B (en) | Medical picture optimization method, device, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40031433 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |