Liver tumor image sample augmentation method based on generation of countermeasure network
Technical Field
The invention belongs to the field of medical image processing, and particularly relates to a liver tumor image sample augmentation method based on generation of an antagonistic network.
Background
With the progress of scientific technology, medical imaging technology has been developed greatly, image segmentation is an indispensable means for extracting quantitative information of special tissues in medical images, and in order to accurately distinguish normal tissue structures and abnormal lesions in medical images, medical images need to be segmented, which is a key step in medical image processing.
Since a large number of parameters need to be optimized in the training of the image segmentation model, the number of training samples is high. Therefore, data augmentation of training data becomes one of the main means for applying deep learning technology, and the method mainly performs transformation operations on images, such as translation or rotation, mirror image and the like, to increase the amount of training data. However, the sample image obtained by performing a simple transformation operation on the image has a large error from the actual image.
Disclosure of Invention
In order to solve the above problems in the prior art, the present invention provides a liver tumor image sample augmentation method based on generation of an antagonistic network, which can implement augmentation of a liver tumor data set by generating a random liver tumor image through generation of an antagonistic network model. The technical scheme of the invention is as follows:
a liver tumor image sample augmentation method based on generation of an antagonistic network comprises the following steps:
s1, constructing a pair training set;
the method comprises the steps of obtaining a CT slice containing the liver tumor, extracting a tumor image in the CT slice containing the liver tumor to obtain an original tumor image, and preprocessing the original tumor image to obtain a generated tumor image;
s2, constructing and generating a confrontation network model;
the generation of the confrontation network model comprises a generator and an arbiter;
s3, training a generative pair resistance network model;
performing iterative training on a generated countermeasure network model constructed by using the obtained original tumor image and the generated tumor image until the generated countermeasure network model is iterated to a preset number of times, completing training of the generated countermeasure network model, and obtaining the trained generated countermeasure network model;
s4, extracting a random liver tumor image from the CT slice data set of the liver tumor, preprocessing the random liver tumor image, and inputting the preprocessed random liver tumor image into the trained generation confrontation network model to obtain a liver tumor image set;
s5, the obtained liver tumor image set is implanted into a CT slice set not containing liver tumor, and a data set for liver tumor image segmentation is obtained.
Further, the tumor image in the CT slice containing the liver tumor is extracted, and the specific steps comprise adding a mask to the tumor area in the CT slice containing the liver tumor and extracting the mask.
Further, the preprocessing specifically includes modifying the shape, size, location and inner edge of the tumor image.
Further, the generation countermeasure network model includes a Pix2Pix network or a SPADE network.
The invention has the beneficial effects that: the method can generate random liver tumor images by generating an antagonistic network model to realize the amplification of the liver tumor data set, is beneficial to increasing the variability of liver tumors, and creates a rich real liver tumor section data set for liver sections.
Drawings
FIG. 1 is a schematic flow chart of a liver tumor image sample augmentation method based on generation of an antagonistic network according to the present invention;
FIG. 2 is a schematic diagram of the generation of a tumor image in an anti-challenge network model according to the present invention.
Detailed Description
The technical scheme of the invention is further described by combining the drawings and the embodiment:
the embodiment provides a liver tumor image sample augmentation method based on generation of an antagonistic network, as shown in fig. 1, including:
s1, constructing a pair training set;
the method comprises the steps of obtaining a CT slice containing the liver tumor, extracting a tumor image in the CT slice containing the liver tumor to obtain an original tumor image, and preprocessing the original tumor image to obtain a generated tumor image;
in the embodiment of the application, a CT slice with a liver tumor is obtained from a liver tumor segmentation challenge data set (LiTS) as an original tumor image, and a corresponding mask is set according to the size of the tumor in the CT slice, so as to ensure that the set mask can cover the tumor in the CT slice. And preprocessing the tumor mask image, i.e. the original tumor image, including modifying the shape, size, position and inner edge of the original tumor image, obtaining a pair of original tumor images and generating a tumor image.
S2, constructing and generating a confrontation network model;
in the embodiment of the invention, a countermeasure network model is generated by adopting Pix2Pix, and the countermeasure network model comprises a generator and an arbiter. The generator outputs a composite image for learning how to produce a more realistic image, and the discriminator determines whether the input image is a composite image or a realistic image.
S3, training a generative pair resistance network model;
and performing iterative training on the generated countermeasure network model constructed by using the obtained original tumor image and the generated tumor image until the generated countermeasure network model is iterated to a preset number of times, completing training on the generated countermeasure network model, and obtaining the trained generated countermeasure network model.
In the training process of the countermeasure generation network, the purpose of the generator is to generate a real image as much as possible to deceive the discriminator, the discriminator is to distinguish the image generated by the generator from the real image, the training generator and the discriminator form a dynamic game process by alternately training the generator and the discriminator, and finally the image generated by the trained generator is enough to be fake-fake, namely, infinitely close to the real image.
In the embodiment of the present invention, as shown in fig. 2, in the training process of the Pix2Pix to generate the confrontation network model, firstly, the real image (Target) is captured through a Mask (Mask) from a slice containing a liver tumor, an Input generated tumor synthetic image (Input) for generating the confrontation network model is obtained through preprocessing, and an image (Output) generated by the generator is obtained through the training of the Pix2Pix to generate the confrontation network model. The images generated by the generator are used together with the real images to train the discriminator, so that the discriminator learns to distinguish the real images from the composite images. The generator is trained using the results of the last trained discriminator and learns to synthesize a real image. At the end of several training periods, the generator may generate images that the discriminator cannot distinguish from the real images.
To train Pix2Pix to generate the antagonistic network model, 150 sessions were run using Adam optimizer with initial learning rate of 0.0002 and momentum of 0.5. The parameters of the generator loss function are set to GAN weight 1 and L1 weight 100.
S4, extracting a random liver tumor image from the CT slice data set of the liver tumor, preprocessing the random liver tumor image, and inputting the preprocessed random liver tumor image into the trained generation confrontation network model to obtain a liver tumor image set;
s5, the obtained liver tumor image set is implanted into a CT slice set not containing liver tumor, and a data set for liver tumor image segmentation is obtained.
A method for comprehensively implanting focus on CT liver slice to improve the network performance of liver lesion segmentation. By adjusting parameters such as the size, the shape, the position, the internal structure, the average strength and the like of the tumor image, the training set of the liver tumor image segmentation network can be enriched, and the performance of the liver tumor image segmentation network is improved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected therein by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.