Pulmonary nodule CT image segmentation, training method and device based on improved V-Net network
By improving the V-Net network structure and increasing the jump connection and joint loss function, the problem of low segmentation accuracy of CT images in the prior art is solved, and a higher detection rate and anti-interference ability are achieved.
Patent Information
- Application Number
- CN202210536515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2042-05-17
AI Technical Summary
The existing V-Net model has problems in insufficient utilization of feature information, disappearance of gradients, low detection rate and insufficient accuracy of boundaries in the segmentation of pulmonary nodules.
By improving the V-Net network structure, increasing the jump connection between the encoding layer and the decoding layer, fully splicing and fusing the low-level detail features and high-level semantic features, and a new joint loss function is proposed to improve segmentation accuracy.
The segmentation accuracy of the lesion area of the pulmonary nodules in CT images is improved, the detection rate of small nodules and the anti-interference ability to interfere with pixels are enhanced, and the segmentation effect of the hollow part and adhesion area is improved.
Smart Images

Figure CN114782402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lung nodule CT image segmentation, and in particular to a lung nodule CT image segmentation, training method and device based on an improved V-Net network. Background Art
[0002] Lung cancer is caused by uncontrollable abnormal cells that are not discovered by the immune system, which continuously replicate and divide to form lung lesions, which are called lung nodules. Early lung cancer exists in the form of lung nodules, which are spherical lesions in the lungs with a diameter of less than 4 cm. These nodules are usually of different sizes and locations. Early detection can greatly reduce the mortality rate of lung cancer. The detection of lung nodules is mainly through medical imaging technology. For the detection of lung nodules, CT scanning is usually used to consider factors such as easy acquisition and availability. The segmentation of lung nodule lesions in CT images can be achieved through the V-Net model.
[0003] See also Figure 1 , which is a schematic diagram of the network structure of the V-Net model. The left side of the model is the compression path, that is, the encoding part, and the right side of the model is the decoding part. The encoding part of the V-Net model includes multiple different convolutional layers, each layer corresponds to a scale of resolution. As the data moves along the compression path to different layers, its resolution decreases exponentially. Each layer of the V-Net model contains 1 to 3 convolution operations, and the size of the convolution kernel is 5x5x5. The output feature map resolution after 1 to 3 convolution operations in the same layer is the same. The V-Net model introduces a residual learning structure in each layer. The residual learning structure adds the output feature map obtained by the last convolution of the layer to the output feature map after downsampling in the previous layer. The V-Net model performs downsampling at the end of each layer to obtain a larger receptive field. After downsampling, the resolution of the feature map becomes half of the original, and the number of feature maps is twice the original. The V-Net model uses convolution to achieve downsampling. In image segmentation, downsampling can reduce the resolution of the feature map while retaining important features of the image. In addition, since the V-Net model uses a larger 5x5x5 convolution kernel and has a total of 21 convolution operations, it has a larger receptive field and a strong fitting ability.
[0004] However, the residual learning mechanism of the V-Net model does not fully utilize the information of the feature map, the continuity between the features is poor, and the relationship between the image itself and the target is ignored. The size of lung nodules varies too much, the semantic features of lung nodules are relatively sparse, and the detection rate of small nodules is low, which easily leads to missed detection of lung nodules. In addition, there is a lot of low-level information and the ability to process interfering pixels such as blood vessels is poor, resulting in inaccurate boundaries of lung nodule segmentation and low segmentation accuracy of lung nodule lesions in CT images. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and provide a lung nodule CT image segmentation method based on an improved V-Net network, which can make full use of feature details and improve the segmentation accuracy of lung nodule lesion areas in CT images.
[0006] The present invention is implemented by the following technical scheme: a lung nodule CT image segmentation method based on an improved V-Net network, comprising the steps of:
[0007] Acquire a CT image of a lung nodule to be segmented;
[0008] Inputting the pulmonary nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the pulmonary nodule CT image, and performing an addition connection operation on a feature map obtained by the first convolution operation of this layer and a feature map obtained by the last convolution operation, and performing a downsampling operation;
[0009] The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation;
[0010] The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform an upsampling operation;
[0011] The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation;
[0012] The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in sequence, and the decoding layer of the second layer to the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the corresponding level encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation;
[0013] The last decoding layer is used to concatenate the feature map output by the upsampling operation of the upper decoding layer with the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the concatenation operation, add and concatenate the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the segmentation result image.
[0014] Compared with the prior art, the present invention provides a lung nodule CT image segmentation method based on an improved V-Net network, which fully utilizes feature information, further alleviates gradient vanishing, can grasp feature details, has a high detection rate for small nodules, has strong anti-interference ability for interfering pixels such as blood vessels, and has high segmentation accuracy for cavity parts and adhesion areas.
[0015] Furthermore, the improved V-Net network model includes a first encoding layer, a second encoding layer, a third encoding layer, a fourth encoding layer, a fifth encoding layer, a first decoding layer, a second decoding layer, a third decoding layer and a fourth decoding layer, wherein the first encoding layer is used to perform two convolution operations on the lung nodule CT image; the second encoding layer is used to perform two convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the third encoding layer, the fourth encoding layer and the fifth encoding layer are used to perform three convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the first decoding layer, the second decoding layer, the third decoding layer and the fourth decoding layer are used to perform three convolution operations on the feature map output by the splicing operation of this layer.
[0016] Based on the same inventive concept, the present invention also provides a pulmonary nodule CT image segmentation device based on an improved V-Net network, comprising:
[0017] An image acquisition module, used for acquiring a CT image of a lung nodule to be segmented;
[0018] An image segmentation module is used to input the lung nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and perform an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and perform a downsampling operation;
[0019] The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation;
[0020] The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation;
[0021] The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation;
[0022] The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation;
[0023] The last decoding layer is used to concatenate the feature map output by the upsampling operation of the upper decoding layer with the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the concatenation operation, add and concatenate the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the segmentation result image.
[0024] Furthermore, the improved V-Net network model includes a first encoding layer, a second encoding layer, a third encoding layer, a fourth encoding layer, a fifth encoding layer, a first decoding layer, a second decoding layer, a third decoding layer and a fourth decoding layer, wherein the first encoding layer is used to perform two convolution operations on the lung nodule CT image; the second encoding layer is used to perform two convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the third encoding layer, the fourth encoding layer and the fifth encoding layer are used to perform three convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the first decoding layer, the second decoding layer, the third decoding layer and the fourth decoding layer are used to perform three convolution operations on the feature map output by the splicing operation of this layer.
[0025] Based on the same inventive concept, the present invention also provides a training method based on an improved V-Net network, comprising the steps of:
[0026] Acquire a pulmonary nodule CT image dataset for training and perform preprocessing, wherein the pulmonary nodule CT images in the pulmonary nodule CT image dataset are marked with pulmonary nodule mask labels;
[0027] Inputting the preprocessed lung nodule CT image data set into the constructed improved V-Net network model to obtain a prediction result; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and performing an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and performing a downsampling operation;
[0028] The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation;
[0029] The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation;
[0030] The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation;
[0031] The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation;
[0032] The last decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the prediction result;
[0033] The hyperparameters of the improved V-Net network model are adjusted by the loss function L according to the prediction results and the pulmonary nodule mask labels, wherein the expression of the loss function L is:
[0034]
[0035] Among them, Y b represents the pulmonary nodule mask label of the b-th pulmonary nodule CT image, represents the prediction result corresponding to the b-th pulmonary nodule CT image, and N represents the batch size.
[0036] Furthermore, a lung nodule CT image dataset for training is obtained and preprocessed, including the following steps:
[0037] Generate pulmonary nodule mask labels for pulmonary nodule CT images;
[0038] Resampling the pulmonary nodule CT image and the corresponding pulmonary nodule mask label to obtain a pulmonary nodule mask label image;
[0039] The pulmonary nodule CT image and its corresponding pulmonary nodule mask label image are cut into a plurality of three-dimensional patches.
[0040] Further, generating a pulmonary nodule mask label of a pulmonary nodule CT image comprises the steps of:
[0041] Obtaining the size information of the pulmonary nodule CT image and the three-dimensional center coordinates and diameter of the pulmonary nodule;
[0042] A three-dimensional all-0 matrix of the same size as the lung nodule CT image is generated according to the size information, and in the three-dimensional all-0 matrix, a cube is constructed with the three-dimensional center coordinates as the center and the diameter as the side length, and the cube is determined to be the lung nodule mask label of the lung nodule CT image.
[0043] Based on the same inventive concept, the present invention also provides a training device based on an improved V-Net network, characterized in that it includes:
[0044] A data set acquisition module, used to acquire a lung nodule CT image data set for training and perform preprocessing, wherein the lung nodule CT images in the lung nodule CT image data set are marked with lung nodule mask labels;
[0045] A prediction module is used to input the preprocessed lung nodule CT image data set into the constructed improved V-Net network model to obtain a prediction result; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and perform an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and perform a downsampling operation;
[0046] The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation;
[0047] The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation;
[0048] The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation;
[0049] The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation;
[0050] The last decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the prediction result;
[0051] A parameter adjustment module is used to adjust the hyperparameters of the improved V-Net network model through a loss function L according to the prediction result and the pulmonary nodule mask label, wherein the expression of the loss function L is:
[0052]
[0053] Among them, Y b represents the pulmonary nodule mask label of the b-th pulmonary nodule CT image, represents the prediction result corresponding to the b-th pulmonary nodule CT image, and N represents the batch size.
[0054] Furthermore, the data set acquisition module acquires a pulmonary nodule CT image data set for training and performs preprocessing, including the steps of:
[0055] Generate pulmonary nodule mask labels for pulmonary nodule CT images;
[0056] Resampling the pulmonary nodule CT image and the corresponding pulmonary nodule mask label to obtain a pulmonary nodule mask label image;
[0057] The pulmonary nodule CT image and its corresponding pulmonary nodule mask label image are cut into a plurality of three-dimensional patches.
[0058] Furthermore, when the data set acquisition module acquires the pulmonary nodule mask label for generating the pulmonary nodule CT image, the steps include:
[0059] Obtaining the size information of the pulmonary nodule CT image and the three-dimensional center coordinates and diameter of the pulmonary nodule;
[0060] A three-dimensional all-0 matrix of the same size as the lung nodule CT image is generated according to the size information, and in the three-dimensional all-0 matrix, a cube is constructed with the three-dimensional center coordinates as the center and the diameter as the side length, and the cube is determined to be the lung nodule mask label of the lung nodule CT image.
[0061] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A schematic diagram of the network structure of a V-Net model in the prior art;
[0063] Figure 2 Schematic diagram of the process of the lung nodule CT image segmentation method based on the improved V-Net network of the embodiment;
[0064] Figure 3 A schematic diagram of the network structure of an improved V-Net network model of an embodiment;
[0065] Figure 4 A flowchart of a training method for an improved V-Net network model of an embodiment;
[0066] Figure 5 Schematic diagram of the structure of a lung nodule CT image segmentation device based on an improved V-Net network in an embodiment;
[0067] Figure 6 It is a structural schematic diagram of a training device based on an improved V-Net network of an embodiment. DETAILED DESCRIPTION
[0068] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0069] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0071] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0072] The present invention improves the segmentation accuracy of the network model for the difficult-to-segment lung nodule lesion area in CT images by fully splicing and fusing low-level detail features and high-level semantic features, and proposes a new joint loss function so that the trained network model has higher segmentation accuracy. The following examples are used to illustrate this.
[0073] See also Figure 2 , which is a flow chart of the lung nodule CT image segmentation method based on the improved V-Net network of this embodiment, the method comprises the steps of:
[0074] S11: Acquire a CT image of the lung nodule to be segmented.
[0075] The pulmonary nodule CT image is a CT image containing the pulmonary nodule lesion area. In a specific implementation, the pulmonary nodule CT image can be collected by a CT scanning device, and the pulmonary nodule CT image can be obtained from the CT scanning device in a wired or wireless manner.
[0076] S12: Input the lung nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image.
[0077] Among them, see Figure 3 , which is a schematic diagram of the network structure of the improved V-Net network model of the present embodiment, the model includes an encoder and a decoder, the encoder is used to encode the input pulmonary nodule CT image to be segmented, the encoder includes multiple coding layers, wherein the first coding layer performs multiple convolution operations on the input pulmonary nodule CT image to be segmented, and performs an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and performs a downsampling operation; the second coding layer to the penultimate coding layer perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, and perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation; the last coding layer performs multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, and performs an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and performs an upsampling operation.
[0078] The decoder is used to decode the feature map output by the encoder and output the segmentation result image. The decoder includes multiple decoding layers corresponding to the encoding layer level, wherein the first decoding layer corresponds to the penultimate encoding layer level, the first decoding layer concatenates the feature map output by the upsampling operation of the last encoding layer with the feature map output by the addition and connection operation of the penultimate encoding layer, performs multiple convolution operations on the feature map output by the concatenation operation, performs addition and connection operations on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and performs upsampling operations; the second decoding layer to the penultimate decoding layer correspond to the third-to-last encoding layer to the second encoding layer one by one, and the second decoding layer to the penultimate decoding layer concatenates the feature map output by the upsampling operation of the upper decoding layer with the feature map output by the same level encoding layer. The feature maps output by the addition and connection operation are spliced, and multiple convolution operations are performed on the feature maps output by the splicing operation. The feature maps obtained by the first convolution operation of this layer, the feature maps obtained by the last convolution operation, and the feature maps output by the upsampling operation of the upper decoding layer are added and connected, and an upsampling operation is performed; the last decoding layer corresponds to the first encoding layer, and the last decoding layer splices the feature maps output by the upsampling operation of the upper decoding layer with the feature maps output by the connection operation of the first encoding layer, and multiple convolution operations are performed on the feature maps output by the splicing operation, and the feature maps obtained by the first convolution operation of this layer, the feature maps obtained by the last convolution operation, and the feature maps output by the upsampling operation of the upper decoding layer are added and connected, and a convolution operation is performed to obtain a segmentation result image.
[0079] In a specific embodiment, the encoder includes a first encoding layer, a second encoding layer, a third encoding layer, a fourth encoding layer and a fifth encoding layer, wherein the first encoding layer is used to perform two consecutive convolution operations on the input pulmonary nodule CT image to be segmented, and add and connect the feature map obtained by the first convolution operation and the feature map obtained by the second convolution operation to obtain a first connected feature map; and downsample the first connected feature map to obtain a first downsampled feature map.
[0080] The second encoding layer is used to perform two consecutive convolution operations on the first down-sampled feature map, and perform an add connection operation on the feature map obtained by the first convolution operation, the feature map obtained by the second convolution operation, and the first down-sampled feature map to obtain a second connection feature map; and perform a downsampling operation on the second connection feature map to obtain a second down-sampled feature map.
[0081] The third encoding layer is used to perform three consecutive convolution operations on the second down-sampled feature map, and add and connect the feature map obtained by the first convolution operation, the feature map obtained by the third convolution operation, and the second down-sampled feature map to obtain a third connected feature map; and down-sample the third connected feature map to obtain a third down-sampled feature map.
[0082] The fourth coding layer is used to perform three consecutive convolution operations on the third down-sampled feature map, and perform an add connection operation on the feature map obtained by the first convolution operation, the feature map obtained by the third convolution operation, and the third down-sampled feature map to obtain a fourth connected feature map; and perform a downsampling operation on the fourth connected feature map to obtain a fourth down-sampled feature map.
[0083] The fifth coding layer is used to perform three consecutive convolution operations on the fourth down-sampled feature map, and perform an add connection operation on the feature map obtained by the first convolution operation, the feature map obtained by the third convolution operation, and the fourth down-sampled feature map to obtain a fifth connection feature map; and perform an upsampling operation on the fifth connection feature map to obtain a first up-sampled feature map.
[0084] The decoder includes a first decoding layer, a second decoding layer, a third decoding layer and a fourth decoding layer, wherein the first decoding layer is used to perform a concat operation on the first up-sampled feature map and the fourth connected feature map; the feature map obtained by the concat operation is continuously convolved three times, the first convolution operation, the third convolution operation and the first up-sampled feature map are added and connected, and an upsampling operation is performed to obtain a second up-sampled feature map.
[0085] The second decoding layer is used to perform a concat operation on the second up-sampled feature map and the third connected feature map; the feature map obtained by the concat operation is subjected to three consecutive convolution operations, and the first convolution operation, the third convolution operation and the second up-sampled feature map are added and connected, and an upsampling operation is performed to obtain a third up-sampled feature map.
[0086] The third decoding layer is used to perform a concat operation on the third up-sampled feature map and the second connected feature map; the feature map obtained by the concat operation is subjected to three consecutive convolution operations, the first convolution operation, the third convolution operation and the third up-sampled feature map are added and connected, and an upsampling operation is performed to obtain a fourth up-sampled feature map.
[0087] The fourth decoding layer is used to perform a concat operation on the fourth up-sampled feature map and the first connected feature map; the feature map obtained by the concat operation is continuously convolved three times, the first convolution operation, the third convolution operation and the fourth up-sampled feature map are added and connected and convolved to obtain a segmentation result image.
[0088] Among them, the convolution kernel size of each continuous convolution operation of the encoding layer and the decoding layer is 3×3×3, the step size is 1+, the normalization is performed by group normalization (Group Normalization), the activation function is ReLU, and the feature map is processed through the Dropout layer to reduce overfitting. The convolution kernel size of each upsampling operation is 3×3×3, the step size is 2+, the normalization is performed by group normalization (Group Normalization), the activation function is ReLU, and the feature map is processed through the Dropout layer to reduce overfitting. The convolution kernel size of each downsampling operation is 3×3×3, the step size is 2+, and the activation function is ReLU. The convolution kernel size of the convolution operation of the fourth decoding layer outputting the segmentation result image is 1×1×1, the step size is 1+, and the activation function is the Sigmoid activation function.
[0089] The present invention also provides a training method for the improved V-Net network model. Figure 4 , which is a flow chart of the training method, the method comprises the steps of:
[0090] S21: Obtain a lung nodule CT image dataset for training and perform preprocessing.
[0091] The dataset used for training can be a public lung CT image dataset, or a dataset consisting of self-collected and labeled lung nodule CT images. In a specific implementation, the public LUNA16 (Lung Nodule Analysis16) dataset can be used, which includes 888 lung CT images, of which there are 1186 lung nodules, and the three-dimensional center coordinates and diameters of these lung nodules have been marked by experts.
[0092] The preprocessing of the lung nodule CT image dataset specifically includes the following steps:
[0093] S211: Generate a lung nodule mask label for the CT image.
[0094] Specifically, the size information of the CT image in the data set is obtained, the size information includes width, height and depth, and a three-dimensional all-zero matrix of the same size is generated according to the size information; the three-dimensional center coordinates and diameter of the lung nodule in the CT image are obtained, and in the corresponding three-dimensional all-zero matrix, a cube is constructed with the three-dimensional center coordinates of the lung nodule as the center and the diameter of the lung nodule as the side length. The cube is the lung nodule mask of the CT image.
[0095] S212: Resample the CT image and its corresponding pulmonary nodule mask label to obtain a pulmonary nodule mask label image.
[0096] Specifically, the lung parenchyma region of interest was extracted by thresholding, and the values of all pixels in the lung parenchyma were normalized; the CT images with a layer thickness greater than 1 mm and their corresponding pulmonary nodule mask labels were resampled by interpolation to obtain all CT images containing pulmonary nodules and their corresponding pulmonary nodule mask label images. After resampling, the voxel interval of all CT images and their corresponding pulmonary nodule mask labels in the z-axis direction was 1.
[0097] S213: Slice the CT image and its corresponding pulmonary nodule mask label image.
[0098] The CT image and its corresponding pulmonary nodule mask label image are cut into several three-dimensional patches, and each three-dimensional patch is used as the input data of the network model. This can avoid the imbalance of positive and negative samples caused by the pulmonary nodules occupying too small a volume in the CT image, and can improve the training efficiency.
[0099] S22: Input the preprocessed lung nodule CT image dataset into the constructed improved V-Net network model to obtain the prediction results.
[0100] Among them, the improved V-Net network model has the same network structure as the improved V-Net network model described in the above CT image segmentation method embodiment, which will not be repeated here.
[0101] S23: The hyperparameters of the improved V-Net network model are adjusted through the loss function L according to the prediction results and the lung nodule labels.
[0102] Among them, the loss function L of this embodiment is a fusion of the cross entropy loss function and the dice (DICE Cofficient) loss function. When the cross entropy loss function is used alone, if the number of positive samples is much smaller than the number of negative samples, the prediction result of the trained model will be biased towards the negative sample, and in the CT image of the lung nodule, the lesion area of the lung nodule is much smaller than the background of the CT image, then the cross entropy loss function is used alone to train the improved V-Net network model of this embodiment, and a model with a prediction result that is seriously biased towards the background will be obtained. The dice loss function is the opposite of the DICE coefficient. The DICE coefficient is a set similarity measurement function, which is usually used to calculate the similarity of two samples (the value range is [0,1]). The dice loss function is suitable for extremely unbalanced samples. However, in general, the use of the DICE loss function alone will have an adverse effect on back propagation and easily make the training unstable. Therefore, this embodiment fuses the cross entropy loss function and the dice (DICE Cofficient) loss function to propose a new joint loss function, and the expression of the loss function L is:
[0103]
[0104] Among them, Y b represents the pulmonary nodule mask label of the b-th CT image, represents the prediction result of the b-th CT image obtained by the improved V-Net network model, and N represents the batch size.
[0105] Compared with the prior art, the improved V-Net network model proposed in the present invention adds the jump connection of the first convolution operation of this layer in the encoding layer and the decoding layer. The low-level feature information can provide more information on the boundary contour of the lung nodules, fully splice and fuse the low-level detail features and the high-level semantic features, make full use of the feature information, further alleviate the gradient disappearance, and be able to grasp the feature details. It has a high detection rate for small nodules, strong anti-interference ability for interfering pixels such as blood vessels, and high segmentation accuracy for hollow parts and adhesion areas. Moreover, the added jump connection makes it possible to update the parameters of the previous convolution operation even if the gradient of the subsequent convolution operation is close to zero. At the same time, the jump connection operation is simple, the number of parameters and the amount of calculation required for training are small, and the training efficiency of the network model will not be affected. In addition, the new joint loss function can make the network training process more stable and improve the segmentation accuracy predicted by the model.
[0106] Based on the same inventive concept, the present invention also provides a lung nodule CT image segmentation device based on an improved V-Net network. Figure 5 , which is a structural schematic diagram of a lung nodule CT image segmentation device based on an improved V-Net network in this embodiment, the device includes an image acquisition module 31 and an image segmentation module 32, wherein the image acquisition module 31 is used to acquire the lung nodule CT image to be segmented; the image segmentation module 32 is used to input the lung nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image, wherein the trained improved V-Net network model is the same as the improved V-Net network model described in the above-mentioned lung nodule CT image segmentation method based on the improved V-Net network, and will not be repeated here.
[0107] Based on the same inventive concept, the present invention also provides a training device based on an improved V-Net network. Figure 6, which is a structural schematic diagram of a training device based on an improved V-Net network in this embodiment, the device includes a data set acquisition module 41, a prediction module 42 and a parameter adjustment module 43, wherein the data set acquisition module 41 is used to acquire a lung nodule CT image data set for training and perform preprocessing, wherein the lung nodule CT images in the lung nodule CT image data set are marked with lung nodule mask labels; the prediction module 42 is used to input the preprocessed lung nodule CT image data set into the constructed improved V-Net network model to obtain a prediction result, wherein the improved V-Net network model is the same as the improved V-Net network model described in the above-mentioned lung nodule CT image segmentation method embodiment based on the improved V-Net network, and will not be repeated here; the parameter adjustment module 43 is used to adjust the hyperparameters of the improved V-Net network model through the loss function L according to the prediction result and the lung nodule mask label, wherein the expression of the loss function L is:
[0108]
[0109] Among them, Y b represents the pulmonary nodule mask label of the b-th pulmonary nodule CT image, represents the prediction result corresponding to the b-th pulmonary nodule CT image, and N represents the batch size.
[0110] As for the device embodiment, since it basically corresponds to the method embodiment, please refer to the description of the method embodiment for relevant details.
[0111] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and the present invention is also intended to include these modifications and modifications.
Claims
1. A pulmonary nodule CT image segmentation method based on an improved V-Net network, characterized in that: Includes steps: Acquire a CT image of a lung nodule to be segmented; Inputting the pulmonary nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the pulmonary nodule CT image, and performing an addition connection operation on a feature map obtained by the first convolution operation of this layer and a feature map obtained by the last convolution operation, and performing a downsampling operation; The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation; The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform an upsampling operation; The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation; The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in sequence, and the decoding layer of the second layer to the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the corresponding level encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation; The last decoding layer is used to concatenate the feature map output by the upsampling operation of the upper decoding layer with the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the concatenation operation, add and concatenate the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the segmentation result image.
2. The method according to claim 1, characterized in that: The improved V-Net network model includes a first encoding layer, a second encoding layer, a third encoding layer, a fourth encoding layer, a fifth encoding layer, a first decoding layer, a second decoding layer, a third decoding layer and a fourth decoding layer, wherein the first encoding layer is used to perform two convolution operations on the lung nodule CT image; the second encoding layer is used to perform two convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the third encoding layer, the fourth encoding layer and the fifth encoding layer are used to perform three convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the first decoding layer, the second decoding layer, the third decoding layer and the fourth decoding layer are used to perform three convolution operations on the feature map output by the splicing operation of the current layer.
3. A pulmonary nodule CT image segmentation device based on an improved V-Net network, characterized in that: include: An image acquisition module, used for acquiring a CT image of a lung nodule to be segmented; An image segmentation module is used to input the lung nodule CT image into the trained improved V-Net network model for segmentation to obtain a segmentation result image; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and perform an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and perform a downsampling operation; The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation; The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation; The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation; The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation; The last decoding layer is used to concatenate the feature map output by the upsampling operation of the upper decoding layer with the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the concatenation operation, add and concatenate the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the segmentation result image.
4. The device according to claim 3, characterized in that: The improved V-Net network model includes a first encoding layer, a second encoding layer, a third encoding layer, a fourth encoding layer, a fifth encoding layer, a first decoding layer, a second decoding layer, a third decoding layer and a fourth decoding layer, wherein the first encoding layer is used to perform two convolution operations on the lung nodule CT image; the second encoding layer is used to perform two convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the third encoding layer, the fourth encoding layer and the fifth encoding layer are used to perform three convolution operations on the feature map output by the downsampling operation of the upper encoding layer; the first decoding layer, the second decoding layer, the third decoding layer and the fourth decoding layer are used to perform three convolution operations on the feature map output by the splicing operation of the current layer.
5. A training method based on an improved V-Net network, characterized in that: Includes steps: Acquire a pulmonary nodule CT image dataset for training and perform preprocessing, wherein the pulmonary nodule CT images in the pulmonary nodule CT image dataset are marked with pulmonary nodule mask labels; Inputting the preprocessed lung nodule CT image data set into the constructed improved V-Net network model to obtain a prediction result; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and performing an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and performing a downsampling operation; The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation; The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation; The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation; The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation; The last decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the prediction result; The hyperparameters of the improved V-Net network model are adjusted by the loss function L according to the prediction results and the pulmonary nodule mask labels, wherein the expression of the loss function L is: Among them, Y b represents the pulmonary nodule mask label of the b-th pulmonary nodule CT image, represents the prediction result corresponding to the b-th pulmonary nodule CT image, and N represents the batch size.
6. The method according to claim 5, characterized in that Obtain a lung nodule CT image dataset for training and perform preprocessing, including the following steps: Generate pulmonary nodule mask labels for pulmonary nodule CT images; Resampling the pulmonary nodule CT image and the corresponding pulmonary nodule mask label to obtain a pulmonary nodule mask label image; The pulmonary nodule CT image and its corresponding pulmonary nodule mask label image are cut into a plurality of three-dimensional patches.
7. The method according to claim 5, characterized in that Generating a pulmonary nodule mask label for a pulmonary nodule CT image includes the following steps: Obtaining the size information of the pulmonary nodule CT image and the three-dimensional center coordinates and diameter of the pulmonary nodule; A three-dimensional all-0 matrix of the same size as the lung nodule CT image is generated according to the size information, and in the three-dimensional all-0 matrix, a cube is constructed with the three-dimensional center coordinates as the center and the diameter as the side length, and the cube is determined to be the lung nodule mask label of the lung nodule CT image.
8. A training device based on an improved V-Net network, characterized in that: include: A data set acquisition module, used to acquire a lung nodule CT image data set for training and perform preprocessing, wherein the lung nodule CT images in the lung nodule CT image data set are marked with lung nodule mask labels; A prediction module is used to input the preprocessed lung nodule CT image data set into the constructed improved V-Net network model to obtain a prediction result; the improved V-Net network model includes multiple encoding layers and multiple decoding layers, wherein the first encoding layer is used to perform multiple convolution operations on the lung nodule CT image, and perform an addition connection operation on the feature map obtained by the first convolution operation of this layer and the feature map obtained by the last convolution operation, and perform a downsampling operation; The second coding layer to the penultimate coding layer are used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform a downsampling operation; The last coding layer is used to perform multiple convolution operations on the feature map output by the downsampling operation of the upper coding layer, add and connect the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the downsampling operation of the upper coding layer, and perform upsampling operation; The first decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the last encoding layer and the feature map output by the addition connection operation of the penultimate encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the last encoding layer, and perform an upsampling operation; The decoding layer of the second layer to the decoding layer of the second-to-last layer correspond to the encoding layer of the third-to-last layer to the encoding layer of the second layer in a one-by-one manner. The decoding layer of the second layer to the decoding layer of the second-to-last layer are used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the addition connection operation of the encoding layer of the same layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform an upsampling operation; The last decoding layer is used to perform a splicing operation on the feature map output by the upsampling operation of the upper decoding layer and the feature map output by the connection operation of the first encoding layer, perform multiple convolution operations on the feature map output by the splicing operation, perform an addition connection operation on the feature map obtained by the first convolution operation of this layer, the feature map obtained by the last convolution operation, and the feature map output by the upsampling operation of the upper decoding layer, and perform a convolution operation to obtain the prediction result; A parameter adjustment module is used to adjust the hyperparameters of the improved V-Net network model through a loss function L according to the prediction result and the pulmonary nodule mask label, wherein the expression of the loss function L is: Among them, Y b represents the pulmonary nodule mask label of the b-th pulmonary nodule CT image, represents the prediction result corresponding to the b-th pulmonary nodule CT image, and N represents the batch size.
9. The device according to claim 8, characterized in that: The data set acquisition module acquires a pulmonary nodule CT image data set for training and performs preprocessing, including the following steps: Generate pulmonary nodule mask labels for pulmonary nodule CT images; Resampling the pulmonary nodule CT image and the corresponding pulmonary nodule mask label to obtain a pulmonary nodule mask label image; The pulmonary nodule CT image and its corresponding pulmonary nodule mask label image are cut into a plurality of three-dimensional patches.
10. The device according to claim 8, characterized in that: When the data set acquisition module acquires the pulmonary nodule mask label for generating the pulmonary nodule CT image, the steps include: Obtaining the size information of the pulmonary nodule CT image and the three-dimensional center coordinates and diameter of the pulmonary nodule; A three-dimensional all-0 matrix of the same size as the lung nodule CT image is generated according to the size information, and in the three-dimensional all-0 matrix, a cube is constructed with the three-dimensional center coordinates as the center and the diameter as the side length, and the cube is determined to be the lung nodule mask label of the lung nodule CT image.