Method, device and storage medium for synthesizing lung CT images with tumor target region
By training an autoencoder through self-supervised reconstruction to synthesize CT images of tumor target areas, the problem of sample imbalance is solved, the accuracy of lung tumor target area delineation is improved, and the computational power requirement is reduced. It is suitable for deep learning model training and medical education.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
- Filing Date
- 2025-10-14
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies suffer from sample class imbalance in the automatic delineation of lung tumor target areas, resulting in low delineation accuracy. Furthermore, existing methods require high computing power, making them difficult to deploy widely.
By training an autoencoder through self-supervised reconstruction, a large number of tumor target area image blocks are generated using a CT image block synthesis model containing tumor target areas. These blocks are then copied into lung CT images without tumor target areas to construct lung CT images with tumor target areas.
It achieves positive sample amplification without data acquisition costs, improves the accuracy of automatic delineation of lung tumor target areas, reduces the demand for computing power, and is suitable for deep learning model training and validation, medical education, and experiments.
Smart Images

Figure CN121304846B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image synthesis technology, specifically relating to a method, device, and storage medium for synthesizing lung CT images with tumor target areas. Background Technology
[0002] Currently, deep learning-based methods for automatic delineation of lung tumor target areas have been developed to automatically delineate lung tumors with simple shapes. However, these methods have low accuracy in delineating complex lung tumors, making them difficult to apply in clinical practice.
[0003] The main factor affecting the accuracy of automatic delineation is the imbalance of classes in the training dataset. Typically, a patient's 3D lung CT sequence includes over a hundred 2D CT images, but only a few of these images contain the tumor target area, resulting in a large number of negative class samples and a very small number of positive class samples. In practice, due to the high cost of collection and annotation, it is difficult to collect a sufficient number of lung CT images with tumor target areas to address the class imbalance problem.
[0004] Some existing methods employ generative modeling training using generative adversarial networks and diffusion models to obtain CT images containing tumor target areas. However, these methods require a massive amount of CT images containing tumor target areas and have extremely high computational demands, making them unsuitable for widespread deployment and application. Summary of the Invention
[0005] The purpose of this invention is to provide a method, device and storage medium for synthesizing lung CT images with tumor target areas, so as to solve the problem that the scarcity of CT samples with tumor target areas affects the model training effect.
[0006] This invention is achieved through the following technical solution:
[0007] A method for synthesizing lung CT images with tumor target areas includes the following steps:
[0008] S02. Extract the first CT image block containing the complete tumor target area from the first lung CT image containing the tumor target area and the first target area delineation mask.
[0009] S04. The first neural network model is trained by self-supervised reconstruction using the first CT image block to obtain the synthetic model;
[0010] S06. By sampling the standard normal distribution, the sampling results are used as the input of the synthesis model. Multiple rounds of sampling are performed on the synthesis model to obtain multiple synthesized second CT image blocks.
[0011] S08. The merged second CT image block is used to obtain the third CT image block and the second target area delineation mask;
[0012] S010. Place the third CT image block into the lung organ region of the second lung CT image without a tumor target area to obtain a lung CT image with a tumor target area.
[0013] In some embodiments, step S02 includes:
[0014] S021. Obtain the minimum row index of the target area by drawing a mask based on the first target area. i 1. Maximum row index i 2. Minimum column index j 1 and the largest row index j 2;
[0015] S022. Construct a structure with length and width respectively... i 2- i 1+1 j 2- j A 1+1 two-dimensional image matrix, and initialize all elements of the two-dimensional image matrix to 0;
[0016] S023, the first lung CT image consisting of ( i 1, j 1) ( i 1, j 2), ( i 2, j 1) ( i 2, j 2) The elements within the rectangular region defined by the four coordinates are copied into the two-dimensional image matrix;
[0017] S024. Using bilinear interpolation, the size of the two-dimensional image matrix is scaled to a set size to obtain the first CT image block.
[0018] In some embodiments, in step S04, the first neural network model includes an autoencoder;
[0019] The autoencoder consists of an encoder and a decoder connected in series. The encoder consists of 5 coding blocks and 1 first fully connected layer connected in series. Each coding block includes 1 first two-dimensional convolutional layer, 1 first batch normalization layer, and 1 first LeakyReLU layer. The decoder consists of 1 second fully connected layer, 5 decoding blocks, 1 random deactivation layer, 1 second two-dimensional convolutional layer, and 1 Tanh activation layer connected in series. Each decoding block includes 1 two-dimensional transposed convolutional layer, 1 second batch normalization layer, and 1 second LeakyReLU layer.
[0020] In some embodiments, step S04 includes:
[0021] S041. Input the first CT image block into the first coding block of the encoder, use the output feature tensor of the first coding block as the input of the second coding block, process it sequentially through other coding blocks and the first fully connected layer, and use the feature tensor obtained by the first fully connected layer as the sampling code.
[0022] S042. Split the sampling code into a mean vector. Sum of variance vectors And calculate the input of the decoder. , represented as:
[0023] ;
[0024] S043, will The second fully connected layer of the input decoder takes the output feature tensor of the second fully connected layer as the input of the first decoding block, and then processes it sequentially through other decoding blocks, random deactivation layer, second two-dimensional convolutional layer and Tanh activation layer;
[0025] The feature tensor output of the fifth decoding block at the random deactivation layer The i Feature channels The following processing is performed, represented as:
[0026] ,in, , ;
[0027] The Tanh activation layer activates the tensor output by the second two-dimensional convolutional layer, restricting the element value range of the tensor to [-1, +1].
[0028] S044. Perform multiple rounds of self-supervised reconstruction training according to the objective function to train the decoder of the autoencoder and obtain the synthetic model; the objective function is expressed as:
[0029] ;
[0030] This represents the expectation operation; , These represent the samples and the set of samples input into the first neural network model, respectively. This is the final output of the first neural network model.
[0031] In some embodiments, a step of filtering the synthesized second CT image block is further included between step S06 and step S08.
[0032] In some embodiments, the step of filtering the synthesized second CT image block includes:
[0033] S071. Convert the pixel value of the m-th pixel of the second CT image block into a CT value with a window width of 1000HU and a window level of -450HU.
[0034] S072. Sort the m-th pixel of the second CT image block in ascending order according to the CT value to obtain the vector. n is the number of the second CT image blocks;
[0035] S073, Take The 4th pixel in the middle is used as the first quantile marker. The 15th pixel serves as the second quantile marker. Calculate the confidence window width , represented as:
[0036] ;
[0037] S074. Calculate the lower limit of non-outliers and upper limit , represented as:
[0038] ;
[0039] S075, Removal medium to small Greater than CT value.
[0040] In some embodiments, step S08 includes:
[0041] S081. Average each pixel of multiple second CT image blocks to obtain one third CT image block.
[0042] S082. Construct an all-zero matrix with the same size as the third CT image block, and construct a binarized second target area delineation mask.
[0043] In some embodiments, step S010 includes:
[0044] S0101. Obtain the binary mask for delineating lung organs in the second lung CT image to determine the location of lung organs in the second lung CT image.
[0045] S0102. Randomly select several coordinates in the binary mask, and determine the minimum distance of each coordinate from the boundary of the lung organ. When the minimum distance is greater than the preset value, select the corresponding coordinate as the starting point of the upper left corner of the tumor target area. Copy the third CT image block to the position of the lung organ in the second lung CT image according to the starting point to obtain the lung CT image with the tumor target area.
[0046] On the other hand, the present invention also provides an electronic device, comprising:
[0047] Processor; and,
[0048] Memory for storing the executable instructions of the processor;
[0049] The processor is configured to execute the lung CT image synthesis method with tumor target area by executing the executable instructions.
[0050] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the method for synthesizing lung CT images with tumor target areas.
[0051] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0052] This invention uses image patches with complete tumor target areas to train a synthesis model. The synthesis model synthesizes a large number of tumor target area image patches, and then copies the tumor target area image patches to the lung region of lung CT images without tumor target areas to synthesize a large number of lung CT images with tumor target areas. This realizes the amplification of positive class samples in the lung CT image dataset without data acquisition costs, and effectively solves the problem of imbalance between positive and negative class samples faced in the training of deep learning lung tumor target area automatic delineation models.
[0053] Compared with existing synthesis methods, the images obtained by this invention have better fidelity and lower computational requirements, and can be widely used in deep learning model training and validation, medical education, experiments and other fields. Attached Figure Description
[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a schematic diagram of the first CT image block in an embodiment of the present invention.
[0056] Figure 2 This is a schematic diagram of the synthetic model structure in an embodiment of the present invention.
[0057] Figure 3 This is a flowchart illustrating the synthesis of lung CT images with tumor target areas in an embodiment of the present invention.
[0058] Figure 4 This is a schematic diagram of a synthesized lung CT image with tumor target area obtained in an embodiment of the present invention. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0060] This invention uses image patches with complete tumor target areas to train a synthesis model. A large number of tumor target area image patches are synthesized through the synthesis model. The tumor target area image patches are copied to the lung region of lung CT images without tumor target areas to synthesize a large number of lung CT images with tumor target areas. This realizes the expansion of positive class samples in the lung CT image dataset without data acquisition costs, and effectively solves the problem of imbalance between positive and negative class samples faced in the training of deep learning lung tumor target area automatic delineation model.
[0061] This invention constructs a lightweight synthetic model of the lung tumor target region by probabilistically modeling the target region. Then, it generates a large number of synthetic tumor target region image patches through the synthetic model. Finally, the tumor target region image patches are fused with lung CT images without tumor targets to obtain lung CT images with tumor targets. Compared with existing synthesis methods, the images obtained by this invention have better fidelity and lower computational requirements, and can be widely used in deep learning model training and validation, medical education, experiments and other fields.
[0062] In some embodiments of the present invention, reference is made to Figure 3 A method for synthesizing lung CT images with tumor target areas includes the following steps:
[0063] S02. Extract the first CT image block containing the complete tumor target region from the first lung CT image containing the tumor target region and the first target region delineation mask, such as... Figure 1 As shown.
[0064] Specifically, step S02, which involves extracting the first CT image block, includes:
[0065] S021. Obtain the minimum row index of the target area by drawing a mask based on the first target area. i 1. Maximum row indexi 2. Minimum column index j 1 and the largest row index j 2;
[0066] S022. Construct a structure with length and width respectively... i 2- i 1+1 j 2- j A 1+1 two-dimensional image matrix, and initialize all elements of the two-dimensional image matrix to 0;
[0067] S023, the first lung CT image consisting of ( i 1, j 1) ( i 1, j 2), ( i 2, j 1) ( i 2, j 2) The elements within the rectangular region defined by the four coordinates are copied into the two-dimensional image matrix;
[0068] S024. Using bilinear interpolation, the size of the two-dimensional image matrix is scaled to 64×64 to obtain the first CT image block, represented as follows. ;
[0069] Set the window level to -450HU and the window width to 2000HU, and then select the first CT image block. Linear scaling to the range [-1, 1] based on a specified window width and window level is represented as:
[0070] .
[0071] S04. The first neural network model is trained by self-supervised reconstruction using the first CT image block to obtain the synthetic model;
[0072] The first neural network model includes an autoencoder. Self-encoder By encoder and decoder Composed of series connections;
[0073] encoder It consists of 5 coding blocks (namely, the first coding block, the second coding block, the third coding block, the fourth coding block, and the fifth coding block) and 1 first fully connected layer in series. Each coding block includes 1 first two-dimensional convolutional layer, 1 first batch normalization layer, and 1 first LeakyReLU layer.
[0074] The decoder consists of a second fully connected layer, five decoding blocks (namely, the first, second, third, fourth, and fifth decoding blocks), a random deactivation layer, a second two-dimensional convolutional layer, and a Tanh activation layer connected in series. Each decoding block includes a two-dimensional transposed convolutional layer, a second batch normalization layer, and a second LeakyReLU layer.
[0075] Among them, decoder The second two-dimensional convolutional layer is set with a kernel length of 3, a stride of 3, and a padding count of 1; in addition to the second two-dimensional convolutional layer, the autoencoder... The first two-dimensional convolutional layer and the two-dimensional transposed convolutional layer are set with a kernel length of 3, a stride of 2, and a padding number of 1.
[0076] The first CT image obtained in step S02 is used as a training sample for the autoencoder. The training process is as follows:
[0077] First encoding block → Second encoding block → Third encoding block → Fourth encoding block → Fifth encoding block → First fully connected layer → Second fully connected layer → First decoding block → Second decoding block → Third decoding block → Fourth decoding block → Fifth decoding block → Random deactivation layer → Second 2D convolutional layer → Tanh activation layer.
[0078] Specifically, the process of training the synthetic model in step S04 is as follows:
[0079] The first CT image block of 64×64 is input into the first coding block. The processing flow of the first coding block is the first two-dimensional convolutional layer → the first batch normalization layer → the first LeakyReLU layer, and the output is a feature tensor with a dimension of 32×32×32.
[0080] The input of the second coding block is the output feature tensor of the first coding block. The number of input feature channels is 32. The processing flow is the first two-dimensional convolutional layer → the first batch normalization layer → the first LeakyReLU layer. The output feature tensor has a dimension of 64×16×16.
[0081] The input of the third coding block is the output feature tensor of the second coding block. The number of input feature channels is 64. The processing flow is the first two-dimensional convolutional layer → the first batch normalization layer → the first LeakyReLU layer. The output feature tensor has a dimension of 128×8×8.
[0082] The input of the fourth coding block is the output feature tensor of the third coding block. The number of input feature channels is 128. The processing flow is the first two-dimensional convolutional layer → the first batch normalization layer → the first LeakyReLU layer. The output feature tensor has a dimension of 256×4×4.
[0083] The input of the fifth coding block is the output feature tensor of the fourth coding block. The number of input feature channels is 256. The processing flow is the first two-dimensional convolutional layer → the first batch normalization layer → the first LeakyReLU layer. The output feature tensor has a dimension of 512×2×2.
[0084] The output feature tensor of the fifth coding block is flattened to obtain a one-dimensional feature tensor of length 2048. Then, the one-dimensional feature tensor is input into the first fully connected layer, and the output feature tensor of dimension 128 is used as the sampling code.
[0085] The output sampled code is split into a mean vector. Sum of variance vectors And calculate the input of the decoder. , represented as:
[0086] ;
[0087] Will Input Decoder The second fully connected layer outputs a one-dimensional feature tensor of length 2048, and then transforms the output one-dimensional feature tensor into a three-dimensional feature tensor of 512×2×2 through a deformation operation.
[0088] The 512×2×2 three-dimensional feature tensor is input into the first decoding block. The number of input feature channels is 512. The processing flow is: two-dimensional transposed convolutional layer → second batch normalization layer → second LeakyReLU layer. The output feature tensor has a dimension of 256×4×4.
[0089] The 256×4×4 three-dimensional feature tensor output from the first decoding block is input into the second decoding block. The number of input feature channels is 256. The processing flow is: two-dimensional transposed convolutional layer → second batch normalization layer → second LeakyReLU layer. The output feature tensor has a dimension of 128×8×8.
[0090] The 128×8×8 three-dimensional feature tensor output from the second decoding block is input into the third decoding block. The number of input feature channels is 128. The processing flow is: two-dimensional transposed convolutional layer → second batch normalization layer → second LeakyReLU layer. The output feature tensor has a dimension of 64×16×16.
[0091] The 64×16×16 three-dimensional feature tensor output from the third decoding block is input into the fourth decoding block. The number of input feature channels is 64. The processing flow is a two-dimensional transposed convolutional layer → a second batch normalization layer → a second LeakyReLU layer, and the output feature tensor has a dimension of 32×32×32.
[0092] The 32×32×32 three-dimensional feature tensor output from the fourth decoding block is input into the fifth decoding block. The number of input feature channels is 32. The processing flow is: two-dimensional transposed convolutional layer → second batch normalization layer → second LeakyReLU layer. The output feature tensor has a dimension of 32×64×64.
[0093] The 32×64×64 three-dimensional feature tensor output by the fifth decoding block is represented as follows: Input random deactivation layer, random deactivation layer for The i Feature channels The following processing is performed, represented as:
[0094] ;
[0095] in, , .
[0096] The output of the randomly deactivated layer is used as the input to the second two-dimensional convolutional layer, which performs convolution processing to obtain a 64×64 output tensor. ;
[0097] Tanh activation layer's output tensor Perform activation processing on the tensor The range of element values is restricted to [-1, +1].
[0098] Multiple rounds of self-supervised reconstruction training are performed according to the objective function, which is expressed as follows:
[0099] ;
[0100] in, This represents the expectation operation; , These represent the samples and the set of samples input into the first neural network model, respectively. , All were obtained by splitting the sample code; This is the final output of the first neural network model;
[0101] After multiple rounds of self-supervised reconstruction training, the decoder of the autoencoder... The synthetic model is obtained through training.
[0102] S06. By sampling the standard normal distribution, the sampling results are used as the input of the synthesis model. Multiple rounds of sampling are performed on the synthesis model to obtain multiple synthesized second CT image blocks.
[0103] Specifically, a 64-dimensional standard normal distribution is sampled, and the sampling results are used as a fixed sampling code to perform 20 rounds of sampling on the synthetic model;
[0104] In each round of sampling, a fixed sampling code is first input into the synthesis model. Each layer of the synthesis model processes the fixed sampling code to obtain a 64×64 second CT image block.
[0105] The random deactivation layer in the synthetic model ensures that the sampling results differ in each round. Therefore, 20 rounds of sampling yield 20 different second CT image patches, denoted as... .
[0106] S07, For the synthesized second CT image block Filtering is performed to remove low-quality synthesis results;
[0107] Specifically, step S07 includes the following process:
[0108] S071, Transfer the second CT image block The pixel value of the m-th pixel is restored from [-1, +1] to the CT value with a window width of 1000 HU and a window level of -450 HU; represented as:
[0109] ; express The m-th pixel;
[0110] S072, Transfer the second CT image block The m-th pixel Sort by CT values in ascending order to obtain a vector. ;
[0111] S073, Take The 4th pixel in the middle is used as the first quantile marker. The 15th pixel serves as the second quantile marker. Calculate the confidence window width , represented as:
[0112] ;
[0113] S074. Calculate the lower limit of non-outliers and upper limit , represented as:
[0114] ;
[0115] S075, Removal medium to small Greater than The CT values will not be included in the calculation when merging the 20 second CT image blocks.
[0116] S08. The merged second CT image block is used to obtain the third CT image block and the second target area delineation mask;
[0117] Specifically, step S08 includes:
[0118] S081. Filtering multiple second CT image blocks The average of each pixel is calculated to obtain a third CT image block. , is represented as;
[0119] ;
[0120] in, ;
[0121] S082, Construct a block of third CT images All-zero matrix of uniform size And construct a binary target region delineation mask, which is represented as:
[0122] ;
[0123] in, express The m-th pixel, where t represents the threshold.
[0124] S010. Place the third CT image block into the lung organ region of the second lung CT image without a tumor target area to obtain a lung CT image with a tumor target area and a target area delineation mask.
[0125] Specifically, step S010 includes:
[0126] S0101. Using an nnU-Net pre-trained on a lung organ delineation dataset, acquire the second lung CT image. Lung organ delineation binary mask To determine the location of the lung organs in the second lung CT image;
[0127] S0102, in the binary mask 100 coordinates are randomly selected, and the minimum distance from each coordinate to the delineated boundary of the lung organ is determined one by one. If the minimum distance is greater than 64 pixels, the corresponding coordinate is selected as the starting point of the upper left corner of the tumor target area. The third CT image block is determined based on the starting point. Copy of second lung CT image The lung region was analyzed to obtain a CT image of the lung with the tumor target area; represented as:
[0128] .
[0129] The implementation process of the lung CT image synthesis method with tumor target area of the present invention will be described in detail below with reference to specific embodiments.
[0130] Step S1: Preprocess the first lung CT image containing one or more tumor target areas and the first target area delineation mask to obtain a first CT image block containing the complete tumor target area.
[0131] This step uses bilinear interpolation to scale the size of the extracted first CT image patch to 64×64, resulting in a first CT image patch containing the complete tumor target area. ,like Figure 1 As shown;
[0132] Set the window level to -450HU and the window width to 2000HU, and then select the first CT image block. Linearly scale to the range [-1, 1] based on the specified window width and window level.
[0133] The lung CT image dataset is traversed, and the first CT image block of each lung CT image containing the tumor target area is extracted and preprocessed to obtain the training dataset for subsequent model training.
[0134] Step S2: Use the training dataset of the first CT image block obtained in step S1 to... Figure 2 The self-encoder shown Self-supervised reconstruction training is performed to obtain a synthesis model for synthesizing CT image blocks of tumor target areas. By sampling the standard normal distribution, the sampling results are used as input to the synthesis model, which can then output high-fidelity CT image blocks with tumor target areas.
[0135] Step S3, as follows Figure 3 As shown, a 64-dimensional standard normal distribution is sampled, and the sampling results are used as a fixed sampling code to perform 20 rounds of sampling on the synthetic model.
[0136] Step S4: Process the 20 CT image blocks with tumor target areas obtained in step S3. Filtering is performed to exclude low-quality synthesis results, including:
[0137] Will The mth ( The pixel value is restored from [-1, +1] to the CT value with a window width of 1000 HU and a window level of -450 HU; expressed as:
[0138] ;
[0139] Will The m-th pixel Sort by CT values in ascending order to obtain a vector. ;
[0140] Pick The 4th pixel in the middle is used as the first quantile marker. The 15th pixel serves as the second quantile marker. Calculate the confidence window width ;
[0141] Calculate the lower limit of non-outliers and upper limit , medium to small Greater than The CT values are all outliers and are not included in the calculation when merging 20 composite CT image blocks.
[0142] Step S5: Extract the 20 CT image blocks output in step S. Perform pixel-by-pixel averaging to obtain a CT image patch. Then create a... All-zero matrix of uniform size And create a binary delineation mask.
[0143] Step S6: Record the lung CT image without tumor target area as follows. Its local parts are as follows Figure 4 As shown; including:
[0144] Get Mid-lung organ delineation binary mask ,Sure The location of the middle lung organs;
[0145] In binary mask Select the lung organ's coordinates (55, 320) according to the following formula:
[0146] ;
[0147] CT image blocks Copy to CT image The lung region was used to obtain CT images with the tumor target area, such as... Figure 4 As shown.
[0148] On the other hand, some embodiments of the present invention relate to an electronic device, including:
[0149] Processor; and,
[0150] Memory for storing the executable instructions of the processor;
[0151] The processor is configured to perform a lung CT image synthesis method with tumor target area by executing the executable instructions.
[0152] On the other hand, some embodiments of the present invention relate to a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements a method for synthesizing lung CT images with tumor target areas.
[0153] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications or equivalent changes made to the above embodiments based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for synthesizing lung CT images with tumor target area, characterized in that, Includes the following steps: S02. Extract the first CT image block containing the complete tumor target area from the first lung CT image containing the tumor target area and the first target area delineation mask. S04. The first neural network model is trained by self-supervised reconstruction using the first CT image block to obtain the synthetic model; S06. By sampling the standard normal distribution, the sampling results are used as the input of the synthesis model. Multiple rounds of sampling are performed on the synthesis model to obtain multiple synthesized second CT image blocks. S08. The merged second CT image block is used to obtain the third CT image block and the second target area delineation mask; S010. Place the third CT image block into the lung organ region of the second lung CT image without a tumor target area to obtain a lung CT image with a tumor target area. In step S04, the first neural network model includes an autoencoder; The autoencoder consists of an encoder and a decoder connected in series. The encoder consists of 5 coding blocks and 1 first fully connected layer connected in series. Each coding block includes 1 first two-dimensional convolutional layer, 1 first batch normalization layer, and 1 first LeakyReLU layer. The decoder consists of 1 second fully connected layer, 5 decoding blocks, 1 random deactivation layer, 1 second two-dimensional convolutional layer, and 1 Tanh activation layer connected in series. Each decoding block includes 1 two-dimensional transposed convolutional layer, 1 second batch normalization layer, and 1 second LeakyReLU layer. Step S04 includes: S041. Input the first CT image block into the first coding block of the encoder, use the output feature tensor of the first coding block as the input of the second coding block, process it sequentially through other coding blocks and the first fully connected layer, and use the feature tensor obtained by the first fully connected layer as the sampling code. S042. Split the sampling code into a mean vector. Sum of variance vectors And calculate the input of the decoder. , is represented as: ; S043, will The second fully connected layer of the input decoder takes the output feature tensor of the second fully connected layer as the input of the first decoding block, and then processes it sequentially through other decoding blocks, random deactivation layer, second two-dimensional convolutional layer and Tanh activation layer; The feature tensor output of the fifth decoding block at the random deactivation layer F The i Feature channels The following processing is performed, represented as: ,in, , ; The Tanh activation layer activates the tensor output by the second two-dimensional convolutional layer, restricting the element value range of the tensor to [-1, +1]. S044. Perform multiple rounds of self-supervised reconstruction training according to the objective function to train the decoder of the autoencoder and obtain the synthetic model; the objective function is expressed as: ; This represents the expectation operation; x , These represent the samples and the set of samples input into the first neural network model, respectively. u This is the final output of the first neural network model.
2. The method for synthesizing lung CT images with tumor target area according to claim 1, characterized in that, Step S02 includes: S021. Obtain the minimum row index of the target area by drawing a mask based on the first target area. i 1. Maximum row index i 2. Minimum column index j 1 and the largest row index j 2; S022. Construct a structure with length and width respectively... i 2- i 1+1 j 2- j A 1+1 two-dimensional image matrix, and initialize all elements of the two-dimensional image matrix to 0; S023, the first lung CT image consisting of ( i 1, j 1), ( i 1, j 2), ( i 2, j 1), ( i 2, j 2) The elements within the rectangular region defined by the four coordinates are copied into the two-dimensional image matrix; S024. Using bilinear interpolation, the size of the two-dimensional image matrix is scaled to a set size to obtain the first CT image block.
3. The method for synthesizing lung CT images with tumor target area according to claim 1, characterized in that, Between step S06 and step S08, there is also a step of filtering the synthesized second CT image block.
4. The method for synthesizing lung CT images with tumor target area according to claim 3, characterized in that, The steps for filtering the synthesized second CT image block include: S071. Convert the pixel value of the m-th pixel of the second CT image block into a CT value with a window width of 1000HU and a window level of -450HU. S072. Sort the m-th pixel of the second CT image block in ascending order according to the CT value to obtain the vector. n is the number of the second CT image blocks; S073, Take The 4th pixel in the middle is used as the first quantile marker. The 15th pixel serves as the second quantile marker. Calculate the confidence window width , is represented as: ; S074. Calculate the lower limit of non-outliers and upper limit ub , is represented as: ; S075, Removal medium to small Greater than ub CT value.
5. The method for synthesizing lung CT images with tumor target area according to any one of claims 1, 3, or 4, characterized in that, Step S08 includes: S081. Average each pixel of multiple second CT image blocks to obtain one third CT image block. S082. Construct an all-zero matrix with the same size as the third CT image block, and construct a binarized second target area delineation mask.
6. The method for synthesizing lung CT images with tumor target area according to claim 1, characterized in that, Step S010 includes: S0101. Obtain the binary mask for delineating lung organs in the second lung CT image to determine the location of lung organs in the second lung CT image. S0102. Randomly select several coordinates in the binary mask, and determine the minimum distance of each coordinate from the boundary of the lung organ. When the minimum distance is greater than the preset value, select the corresponding coordinate as the starting point of the upper left corner of the tumor target area. Copy the third CT image block to the position of the lung organ in the second lung CT image according to the starting point to obtain the lung CT image with the tumor target area.
7. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to perform the lung CT image synthesis method with tumor target area according to any one of claims 1-6 by executing the executable instructions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the lung CT image synthesis method with tumor target area as described in any one of claims 1-6.