Method and device for processing ct image, computer device and storage medium
By using a combined model of generator, discriminator and auxiliary network to process CT images, the artifact problem caused by traditional interpolation and scaling methods is solved, and high-quality CT image restoration and accuracy improvement are achieved.
Patent Information
- Application Number
- CN202310443883.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2043-04-23
AI Technical Summary
In existing technologies, traditional interpolation scaling methods for processing CT images can easily lead to severe artifacts, reducing the accuracy of CT images.
A combined model of generator, discriminator and auxiliary network is used to preprocess, stitch, calculate loss function and train the original CT images to generate the final CT images, including normalization, standardization and data augmentation processing, and the U-Net network, MobileNet v2 network and DeepLab v3 network are used for training.
It effectively improves the fidelity of CT images, reduces the occurrence of artifacts, ensures that the original CT image content information is not lost, and improves the doctor's viewing experience.
Smart Images

Figure CN116452561B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer multimedia technology, and in particular to a method, apparatus, computer device, and storage medium for processing CT images. Background Technology
[0002] Image processing technology for CT (Computed Tomography) images has long been a key research focus at the intersection of artificial intelligence and medicine. Doctors and AI (Artificial Intelligence) are more efficient at processing thicker CT images. Furthermore, higher quality CT images can better standardize their quality for various downstream learning tasks based on CT images. Therefore, improving the accuracy of CT images is a pressing issue.
[0003] Currently, most existing technologies use traditional interpolation scaling methods to stretch CT images, but this method leads to severe artifacts and significantly reduces the accuracy of CT images. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to overcome the shortcomings of the prior art and provide a method, apparatus, computer device and storage medium for processing CT images.
[0005] This invention provides the following technical solution:
[0006] In a first aspect, this disclosure provides a method for processing CT images, the method comprising:
[0007] A preset number of original CT images are preprocessed to obtain a preset number of enhanced CT images, and the preset number of enhanced CT images are stitched together to obtain a CT image matrix;
[0008] The CT image matrix is input into the generator, the generator is controlled to output intermediate CT images, and a first loss function between the intermediate CT images and the CT image matrix is calculated to obtain the first loss.
[0009] A preset number of enhanced CT images and intermediate CT images are input to a discriminator, which is then controlled to output the original confidence score corresponding to the enhanced CT image and the generated confidence score corresponding to the intermediate CT image, respectively. A second loss function is calculated between the original confidence score and the generated confidence score and a preset value, respectively, to obtain the second loss.
[0010] A preset number of enhanced CT images and intermediate CT images are input into an auxiliary network. The auxiliary network is controlled to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image, respectively. The first loss function of the original blood vessel mask and the generated blood vessel mask is calculated to obtain the third loss.
[0011] The generator and the discriminator are trained based on the first loss, the second loss and the third loss, and a preset number of enhanced CT images are input into the trained generator to control the trained generator to output the final CT image.
[0012] Furthermore, the preprocessing of the preset number of original CT images includes:
[0013] The preset number of original CT images are normalized to obtain the preset number of normalized original CT images.
[0014] The preset number of normalized original CT images are standardized according to preset standardization parameters to obtain the preset number of standardized original CT images.
[0015] The preset number of standardized original CT images are subjected to data augmentation processing to obtain the preset number of augmented CT images.
[0016] Further, the second loss includes a first intermediate loss, a second intermediate loss, and a third intermediate loss; the preset value includes a first value and a second value; and the calculation of the second loss function, which modifies the original confidence level and the generated confidence level by the preset value, to obtain the second loss, includes:
[0017] The first intermediate loss is obtained by calculating the second loss function between the original confidence level and the second value;
[0018] Calculate the second loss function between the generated confidence level and the first value to obtain the second intermediate loss;
[0019] The third intermediate loss is obtained by calculating the second loss function between the generated confidence level and the second value.
[0020] Further, training the generator and the discriminator based on the first loss, the second loss, and the third loss includes:
[0021] The weights of the generator are updated based on the first loss, the third intermediate loss, and the third loss;
[0022] The weights of the discriminator are updated based on the first intermediate loss and the second intermediate loss.
[0023] Furthermore, the generator uses a U-Net network, the discriminator uses a Mobilenet v2 network, and the auxiliary network uses a DeepLab v3 network.
[0024] Furthermore, the first loss function is the SmoothL1 Loss loss function, and the calculation formula for the SmoothL1 Loss loss function is as follows:
[0025]
[0026] Where SmoothL1Loss(a,b) represents the first loss and the third loss, and b i Given the CT image matrix input to the generator for the i-th time and the original blood vessel mask input to the auxiliary network, f(a i ) represents the intermediate CT image output by the generator in the i-th iteration and the generated blood vessel mask output by the auxiliary network.
[0027] Furthermore, the second loss function is the L2Loss loss function, and the calculation formula for the L2Loss loss function is as follows:
[0028]
[0029] Where L2LOSS(x,y) is the second loss, and y i f(x) is the preset value for the discriminator input for the i-th time. i ) represents the original confidence score and generated confidence score output by the discriminator in the i-th iteration.
[0030] Secondly, this disclosure provides a CT image processing apparatus, the apparatus comprising:
[0031] The stitching module is used to preprocess a preset number of original CT images to obtain a preset number of enhanced CT images, and stitch the preset number of enhanced CT images to obtain a CT image matrix.
[0032] The first calculation module is used to input the CT image matrix into the generator, control the generator to output an intermediate CT image, calculate a first loss function between the intermediate CT image and the CT image matrix, and obtain a first loss.
[0033] The second calculation module is used to input a preset number of enhanced CT images and intermediate CT images to the discriminator, control the discriminator to output the original confidence level corresponding to the enhanced CT image and the generated confidence level corresponding to the intermediate CT image respectively, and calculate the second loss function of the original confidence level and the generated confidence level with a preset value respectively to obtain the second loss;
[0034] The third calculation module is used to input a preset number of enhanced CT images and intermediate CT images into the auxiliary network, control the auxiliary network to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image respectively, calculate the first loss function of the original blood vessel mask and the generated blood vessel mask, and obtain the third loss.
[0035] The training module is used to train the generator and the discriminator based on the first loss, the second loss and the third loss, and to input a preset number of enhanced CT images into the trained generator, and to control the trained generator to output the final CT image.
[0036] Thirdly, this disclosure provides a computer device including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the CT image processing method described in the first aspect.
[0037] Fourthly, this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the CT image processing method described in the first aspect.
[0038] The embodiments of this application have the following advantages:
[0039] The CT image processing method provided in this application includes: preprocessing a preset number of original CT images to obtain a preset number of enhanced CT images, and stitching the preset number of enhanced CT images to obtain a CT image matrix; inputting the CT image matrix into a generator, controlling the generator to output intermediate CT images, calculating a first loss function between the intermediate CT images and the CT image matrix to obtain a first loss; inputting the preset number of enhanced CT images and intermediate CT images into a discriminator, controlling the discriminator to output the original confidence score corresponding to the enhanced CT images and the generated confidence score corresponding to the intermediate CT images, and calculating the original confidence score. The confidence level and the generated confidence level are respectively compared with a second loss function of a preset value to obtain a second loss. A preset number of enhanced CT images and intermediate CT images are input into an auxiliary network, which is then controlled to output the original vessel mask corresponding to the enhanced CT image and the generated vessel mask corresponding to the intermediate CT image, respectively. A first loss function is calculated for the original vessel mask and the generated vessel mask to obtain a third loss. The generator and the discriminator are trained based on the first loss, the second loss, and the third loss. A preset number of enhanced CT images are then input into the trained generator, which is then controlled to output the final CT image. This method ensures that the original CT image content information is not lost, significantly improves the restoration accuracy of the original CT image, and, after extensive training, greatly reduces the occurrence of artifacts.
[0040] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used 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. In the various drawings, similar components are numbered similarly.
[0042] Figure 1 A flowchart illustrating a CT image processing method provided in an embodiment of this application is shown;
[0043] Figure 2 A schematic diagram of a CT image generator provided in an embodiment of this application is shown;
[0044] Figure 3 A schematic diagram of a CT image discriminator provided in an embodiment of this application is shown;
[0045] Figure 4 This illustration shows a schematic diagram of an auxiliary network for CT images provided in an embodiment of this application;
[0046] Figure 5 This illustration shows a schematic diagram of a CT image result provided in an embodiment of this application;
[0047] Figure 6 This illustration shows a schematic diagram of another CT image result provided in an embodiment of this application;
[0048] Figure 7 A schematic diagram of a CT image processing apparatus provided in an embodiment of this application is shown. Detailed Implementation
[0049] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0050] It should be noted that when an element is said to be "fixed" to another element, it can be directly on the other element or there may be an intervening element. When an element is said to be "connected" to another element, it can be directly connected to the other element or there may be an intervening element. Conversely, when an element is said to be "directly" on another element, there is no intervening element. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.
[0051] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0052] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the template description is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0054] Example 1
[0055] like Figure 1 The diagram shown is a flowchart of a CT image processing method according to an embodiment of this application. The CT image processing method provided in this embodiment can be executed by an electronic device and includes the following steps:
[0056] Step S110: Preprocess a preset number of original CT images to obtain a preset number of enhanced CT images, and stitch the preset number of enhanced CT images together to obtain a CT image matrix.
[0057] Specifically, the CT images used in this application are derived from 400 high-quality 1mm CT images (200 normal CT images and 200 lung cancer CT images). A predetermined number of consecutive original CT images are divided into a dataset, and each dataset is preprocessed to obtain a predetermined number of enhanced CT images. These enhanced CT images are then stitched together to obtain a CT image matrix.
[0058] The data preprocessing process is as follows: First, the original CT image is normalized, that is: original CT image / 255, and the normalized original CT image is obtained after calculation.
[0059] Furthermore, in this embodiment, the preset standardization parameters include mean and std. The normalized original CT image is standardized according to the preset standardization parameters, that is: (normalized original CT image - mean) / std, and the standardized original CT image is obtained after calculation.
[0060] Finally, the standardized original CT images are randomly subjected to data enhancement processing such as inversion and rotation that do not affect the quality of the original images, resulting in enhanced CT images.
[0061] It should be noted that in this embodiment, the preset quantity is set to three sheets (the following description will use three sheets as an example), and the preset standardization parameters are set to mean = [0.373, 0.373, 0.373] and std = [0.641, 0.641, 0.641]. The specific preset quantity and preset standardization parameters can be set according to the actual situation, and this embodiment does not limit them.
[0062] Preprocessing the original CT images can yield a more robust model, which facilitates subsequent model training and learning.
[0063] Step S120: Input the CT image matrix into the generator, control the generator to output intermediate CT images, calculate the first loss function between the intermediate CT images and the CT image matrix, and obtain the first loss.
[0064] Furthermore, such as Figure 2 As shown, the CT image matrix is input into the generator, which then outputs the intermediate CT image and calculates the first loss function between the intermediate CT image and the CT image matrix to obtain the first loss.
[0065] In this embodiment, the first loss function is the SmoothL1 Loss loss function, and the calculation formula of the SmoothL1 Loss loss function is as follows:
[0066]
[0067] Where SmoothL1Loss(a,b) is the first loss, and b i Let f(a) be the CT image matrix input to the generator for the i-th time. i ) represents the intermediate CT image output by the generator in the i-th iteration.
[0068] It is understood that in this embodiment, the generator uses a U-Net network. The specific network used by the generator can be set according to the actual situation, and this application embodiment does not limit it.
[0069] Step S130: Input a preset number of enhanced CT images and intermediate CT images into the discriminator, control the discriminator to output the original confidence level corresponding to the enhanced CT image and the generated confidence level corresponding to the intermediate CT image respectively, and calculate the second loss function of the original confidence level and the generated confidence level with a preset value respectively to obtain the second loss.
[0070] Furthermore, such as Figure 3 As shown, three consecutive enhanced CT images and an intermediate CT image are input into the discriminator. The discriminator then outputs the original confidence score corresponding to the enhanced CT image and the generated confidence score corresponding to the intermediate CT image, respectively. A second loss function is then calculated, comparing the original confidence score and the generated confidence score with preset values, to obtain the second loss.
[0071] It should be noted that the second loss also includes a first intermediate loss, a second intermediate loss, and a third intermediate loss, with preset values including a first value and a second value. The first intermediate loss is obtained by calculating the second loss function between the original confidence level and the second value; the second intermediate loss is obtained by calculating the second loss function between the generated confidence level and the first value; and the third intermediate loss is obtained by calculating the second loss function between the generated confidence level and the second value. Here, the first value is 0, and the second value is 1.
[0072] In this embodiment, the second loss function is the L2Loss loss function, and the calculation formula of the L2Loss loss function is as follows:
[0073]
[0074] Where L2LOSS(x,y) is the second loss, and y i f(x) is the preset value for the discriminator input for the i-th time. i ) represents the original confidence score and generated confidence score output by the discriminator in the i-th iteration.
[0075] It is understood that in this embodiment, the discriminator uses a Mobilenet v2 network. The specific network used by the discriminator can be set according to the actual situation, and this application embodiment does not limit it.
[0076] Step S140: Input a preset number of enhanced CT images and intermediate CT images into the auxiliary network, control the auxiliary network to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image respectively, calculate the first loss function of the original blood vessel mask and the generated blood vessel mask, and obtain the third loss.
[0077] Furthermore, such as Figure 4 As shown, three consecutive enhanced CT images and an intermediate CT image are input into an auxiliary network. The auxiliary network then outputs the original vessel mask corresponding to the enhanced CT image and the generated vessel mask corresponding to the intermediate CT image, respectively. A first loss function is calculated for the original vessel mask and the generated vessel mask, resulting in a third loss.
[0078] In this embodiment, the first loss function is the SmoothL1 Loss loss function, and the calculation formula of the SmoothL1 Loss loss function is as follows:
[0079]
[0080] Where SmoothL1Loss(a,b) is the first loss, and b i For the i-th input of the auxiliary network, f(a) is the original blood vessel mask. i) is the generated blood vessel mask output by the i-th auxiliary network.
[0081] It is understood that in this embodiment, the auxiliary network adopts the DeepLab v3 network that has completed the CT image blood vessel segmentation task training. The specific network adopted by the auxiliary network can be set according to the actual situation, and this application embodiment does not limit it.
[0082] With the addition of the auxiliary network, the blood vessels in the final generated CT image are made as close as possible to those in the original image. This loss better limits the generation of the final CT image, and compared with traditional algorithms, it has a significant improvement in restoring the original CT image.
[0083] Step S150: Train the generator and the discriminator based on the first loss, the second loss and the third loss, and input a preset number of enhanced CT images into the trained generator, and control the trained generator to output the final CT image.
[0084] Specifically, the generator weights are updated based on the first loss, the third intermediate loss, and the third intermediate loss; the discriminator model parameters are updated based on the first intermediate loss and the second intermediate loss, ultimately yielding the trained generator and the trained discriminator.
[0085] Furthermore, after inputting three consecutive enhanced CT images into the trained generator, the trained generator will output the final CT image, which is the processed CT image.
[0086] like Figure 5 and Figure 6 As shown, compared with traditional algorithms, for a 4mm CT image, a final 1mm CT image can be output through frame interpolation, ensuring that the true information within the original CT image layers remains unchanged. Furthermore, training with a large number of original CT images can significantly reduce the occurrence of artifacts.
[0087] The above method greatly improves the doctor's viewing experience when reading CT images. In addition, the method of this application can also be applied to CT image reading software. While ensuring that the information in the original CT image remains unchanged, it helps doctors to characterize the information in the intermediate layers of the CT image, which can effectively assist doctors in reading images.
[0088] The CT image processing method provided in this application preprocesses a preset number of original CT images to obtain a preset number of enhanced CT images, and stitches the preset number of enhanced CT images to obtain a CT image matrix; the CT image matrix is input to a generator, which outputs intermediate CT images, and a first loss function is calculated between the intermediate CT images and the CT image matrix to obtain a first loss; the preset number of enhanced CT images and intermediate CT images are input to a discriminator, which outputs the original confidence score corresponding to the enhanced CT images and the generated confidence score corresponding to the intermediate CT images, respectively, and calculates the original confidence score. The confidence level and the generated confidence level are respectively compared with a second loss function of a preset value to obtain a second loss. A preset number of enhanced CT images and intermediate CT images are input into an auxiliary network, which is then controlled to output the original vessel mask corresponding to the enhanced CT image and the generated vessel mask corresponding to the intermediate CT image, respectively. A first loss function is calculated for the original vessel mask and the generated vessel mask to obtain a third loss. The generator and the discriminator are trained based on the first loss, the second loss, and the third loss. A preset number of enhanced CT images are then input into the trained generator, which is then controlled to output the final CT image. Through the above method, the content information of the original CT image can be guaranteed not to be lost, the restoration accuracy of the original CT image is significantly improved, and after extensive training, the occurrence of artifacts can be greatly reduced.
[0089] Example 2
[0090] like Figure 7 The diagram shown is a structural schematic of a CT image processing apparatus 700 according to an embodiment of this application. The apparatus includes:
[0091] The stitching module 710 is used to preprocess a preset number of original CT images to obtain a preset number of enhanced CT images, and stitch the preset number of enhanced CT images to obtain a CT image matrix.
[0092] The first calculation module 720 is used to input the CT image matrix into the generator, control the generator to output an intermediate CT image, calculate a first loss function between the intermediate CT image and the CT image matrix, and obtain a first loss.
[0093] The second calculation module 730 is used to input a preset number of enhanced CT images and intermediate CT images to a discriminator, control the discriminator to output the original confidence level corresponding to the enhanced CT image and the generated confidence level corresponding to the intermediate CT image respectively, and calculate the second loss function of the original confidence level and the generated confidence level with a preset value respectively to obtain the second loss;
[0094] The third calculation module 740 is used to input a preset number of enhanced CT images and intermediate CT images into an auxiliary network, control the auxiliary network to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image respectively, calculate the first loss function of the original blood vessel mask and the generated blood vessel mask, and obtain the third loss.
[0095] The training module 750 is used to train the generator and the discriminator based on the first loss, the second loss and the third loss, and to input a preset number of enhanced CT images into the trained generator, and to control the trained generator to output the final CT image.
[0096] Optionally, the CT image processing apparatus 700 further includes:
[0097] The normalization module is used to normalize the preset number of original CT images to obtain the preset number of normalized original CT images.
[0098] The standardization module is used to standardize the preset number of normalized original CT images according to preset standardization parameters to obtain the preset number of standardized original CT images.
[0099] An enhancement module is used to perform data enhancement processing on the standardized preset number of original CT images to obtain the preset number of enhanced CT images.
[0100] Optionally, the CT image processing apparatus 700 further includes:
[0101] The first intermediate calculation module is used to calculate the second loss function of the original confidence level and the second value to obtain the first intermediate loss;
[0102] The second intermediate calculation module is used to calculate the second loss function of the generated confidence level and the first value to obtain the second intermediate loss;
[0103] The third intermediate calculation module is used to calculate the second loss function of the generated confidence level and the second value to obtain the third intermediate loss.
[0104] Optionally, the CT image processing apparatus 700 further includes:
[0105] The first update module is used to update the weights of the generator based on the first loss, the third intermediate loss, and the third loss;
[0106] The second update module is used to update the weights of the discriminator based on the first intermediate loss and the second intermediate loss.
[0107] The CT image processing apparatus provided in this application embodiment can ensure that the content information of the original CT image is not lost, significantly improve the restoration of the original CT image, and greatly reduce the occurrence of artifacts after extensive training.
[0108] This disclosure provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the CT image processing method described in Embodiment 1.
[0109] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the CT image processing method described in Embodiment 1.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0111] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0112] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0113] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for processing CT images, characterized in that, The method includes: A preset number of original CT images are preprocessed to obtain a preset number of enhanced CT images, and the preset number of enhanced CT images are stitched together to obtain a CT image matrix; The CT image matrix is input into the generator, the generator is controlled to output intermediate CT images, and a first loss function between the intermediate CT images and the CT image matrix is calculated to obtain the first loss. A preset number of enhanced CT images and intermediate CT images are input to a discriminator, which is then controlled to output the original confidence score corresponding to the enhanced CT image and the generated confidence score corresponding to the intermediate CT image, respectively. A second loss function is calculated between the original confidence score and the generated confidence score and a preset value, respectively, to obtain the second loss. A preset number of enhanced CT images and intermediate CT images are input into an auxiliary network. The auxiliary network is controlled to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image, respectively. The first loss function of the original blood vessel mask and the generated blood vessel mask is calculated to obtain the third loss. The generator and the discriminator are trained based on the first loss, the second loss and the third loss, and a preset number of enhanced CT images are input into the trained generator to control the trained generator to output the final CT image. The second loss includes a first intermediate loss, a second intermediate loss, and a third intermediate loss; the preset value includes a first value and a second value; and the calculation of the second loss function by relating the original confidence level and the generated confidence level to the preset value to obtain the second loss includes: The first intermediate loss is obtained by calculating the second loss function between the original confidence level and the second value; Calculate the second loss function between the generated confidence level and the first value to obtain the second intermediate loss; The third intermediate loss is obtained by calculating the second loss function between the generated confidence level and the second value; The step of training the generator and the discriminator based on the first loss, the second loss, and the third loss includes: The weights of the generator are updated based on the first loss, the third intermediate loss, and the third loss; The weights of the discriminator are updated based on the first intermediate loss and the second intermediate loss.
2. The CT image processing method according to claim 1, characterized in that, The preprocessing of a preset number of original CT images includes: The preset number of original CT images are normalized to obtain the preset number of normalized original CT images. The preset number of normalized original CT images are standardized according to preset standardization parameters to obtain the preset number of standardized original CT images. The preset number of standardized original CT images are subjected to data augmentation processing to obtain the preset number of augmented CT images.
3. The CT image processing method according to claim 1, characterized in that, The generator uses a U-Net network, the discriminator uses a Mobilenet v2 network, and the auxiliary network uses a DeepLab v3 network.
4. The CT image processing method according to claim 1, characterized in that, The first loss function is the SmoothL1 Loss function, and the formula for calculating the SmoothL1 Loss function is as follows: in, For the first loss and the third loss, The CT image matrix input to the generator for the i-th iteration and the original blood vessel mask input to the auxiliary network are given. The intermediate CT image output by the generator in the i-th iteration and the generated blood vessel mask output by the auxiliary network.
5. The CT image processing method according to claim 4, characterized in that, The second loss function is the L2Loss loss function, and the calculation formula for the L2Loss loss function is as follows: in, For the second loss, The preset value is input to the discriminator for the i-th time. The original confidence score and the generated confidence score are the output of the discriminator for the i-th iteration.
6. A CT image processing apparatus, characterized in that, The device includes: The stitching module is used to preprocess a preset number of original CT images to obtain a preset number of enhanced CT images, and stitch the preset number of enhanced CT images to obtain a CT image matrix. The first calculation module is used to input the CT image matrix into the generator, control the generator to output an intermediate CT image, calculate a first loss function between the intermediate CT image and the CT image matrix, and obtain a first loss. The second calculation module is used to input a preset number of enhanced CT images and intermediate CT images to the discriminator, control the discriminator to output the original confidence level corresponding to the enhanced CT image and the generated confidence level corresponding to the intermediate CT image respectively, and calculate the second loss function of the original confidence level and the generated confidence level with a preset value respectively to obtain the second loss; The third calculation module is used to input a preset number of enhanced CT images and intermediate CT images into the auxiliary network, control the auxiliary network to output the original blood vessel mask corresponding to the enhanced CT image and the generated blood vessel mask corresponding to the intermediate CT image respectively, calculate the first loss function of the original blood vessel mask and the generated blood vessel mask, and obtain the third loss. The training module is used to train the generator and the discriminator based on the first loss, the second loss and the third loss, and to input a preset number of enhanced CT images into the trained generator, and control the trained generator to output the final CT image; The second loss includes a first intermediate loss, a second intermediate loss, and a third intermediate loss; the preset value includes a first value and a second value; and the second calculation module further includes: A first intermediate calculation module is used to calculate a second loss function between the original confidence level and the second value to obtain the first intermediate loss; a second intermediate calculation module is used to calculate a second loss function between the generated confidence level and the first value to obtain the second intermediate loss; a third intermediate calculation module is used to calculate a second loss function between the generated confidence level and the second value to obtain the third intermediate loss. The training module further includes: The first update module is used to update the weights of the generator based on the first loss, the third intermediate loss, and the third loss; the second update module is used to update the weights of the discriminator based on the first intermediate loss and the second intermediate loss.
7. A computer device, characterized in that, The device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the CT image processing method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the CT image processing method according to any one of claims 1-5.
Citation Information
Patent Citations
Classification method and device based on CT image, equipment and storage medium
CN115294401A
Blood vessel mask image generation method and device, electronic equipment and storage medium
CN115761024A