A medical organ image segmentation method and related apparatus
By cropping medical images into local organ and global images and fusing them, and applying a combination of image segmentation models and location labels, the problem of low segmentation quality in existing technologies is solved, and high-quality organ segmentation is achieved.
Patent Information
- Application Number
- CN202310305324.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2043-03-24
AI Technical Summary
Existing medical image segmentation methods struggle to preserve both global and detailed information in large-size 3D CT images, resulting in low segmentation quality.
The medical image is cropped into cropped images of local organs and fused with the global image. An image segmentation model is then applied for segmentation, and the local organ segmentation images are combined using location labels to obtain a complete segmented image of the organ.
It preserves the detailed information of the image and records the context information of the global image, which improves the quality of image segmentation and avoids the problem of misjudgment of position in traditional methods.
Smart Images

Figure CN116385721B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image segmentation technology, specifically to a method and related apparatus for segmenting medical organ images. Background Technology
[0002] Segmenting medical images containing only organ parts is the first step in modern clinical diagnosis. For example, segmenting the abdomen from an abdominal CT image reduces the time doctors spend on diagnosis and improves the efficiency of the clinical diagnostic process. However, traditional manual medical image segmentation is time-consuming and laborious, and the task becomes even more difficult when dealing with large abdominal CT images. In recent years, with the iterative development of artificial intelligence, deep learning-based pattern recognition models have shown great potential in image segmentation tasks. Automated medical image segmentation systems based on deep learning models and guided by large amounts of CT data can efficiently, quickly, and accurately segment abdominal images. Most excellent algorithms and models for image segmentation using deep learning are designed based on traditional RGB three-dimensional images, whose image size is usually between (224, 224) and (1024, 1024). However, for medical abdominal CT images, the three-dimensional image size is usually between (512, 512, 80) and (512, 512, 260). Meanwhile, in clinical practice, there are also ultra-large CT images, such as whole-body CT scans, that require segmentation. Due to hardware resource limitations, it is difficult to input a 3D CT image as a whole into a deep learning network to obtain the final segmentation result. Existing medical image segmentation methods include two types: The first type decomposes the entire CT image into multiple image blocks. Under controllable hardware resource usage, each image can be used as input to a deep neural network to obtain a separate segmentation result for each image block. Finally, all the obtained segmentation results are stitched together according to their respective positions to obtain the final segmentation result of the entire CT image. However, the practice of decomposing the entire CT image into image blocks and inputting them into the deep neural network individually results in the final prediction completely losing the global information of the original CT image, which easily leads to errors in the position of the segmentation result in the final segmentation result. The second type directly performs shape interpolation on the entire CT image, scaling the size of the CT image to a size that the neural network can accept. This method reduces the original CT image by a large scale to obtain a scaled global CT image. However, scaling the CT image to a very small size leads to the loss of detail information in the CT image, resulting in the loss of detail information in the organ segmentation images obtained from the CT image, ultimately making the segmented organ images unable to assist doctors in clinical judgment. As can be seen from the above analysis, both the first and second segmentation methods reduce the quality of the segmented organ images.
[0003] In summary, the organ images segmented by existing technologies are of low quality.
[0004] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a medical organ image segmentation method and related apparatus, which solves the problem of low-quality organ images segmented by existing technologies.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for medical organ image segmentation, comprising:
[0008] Each cropped image and each global image are merged separately to obtain a set of merged images. The size of each cropped image is matched with the size of each global image. The global image is a medical image containing the complete organ after being resized. The cropped image is an image cropped from the medical image that includes local organs.
[0009] The trained image segmentation model is applied to each group of fused images to obtain segmented images of local organs with location labels from each cropped image. The location labels are used to characterize the position of the segmented local organ image on the medical image.
[0010] Based on the segmented images of each local organ, a complete organ segmentation image of the whole organ on the medical image is generated.
[0011] In one implementation, the cropped image is a preprocessed image, and the preprocessing includes:
[0012] Determine the mean pixel value and median pixel interval of all images in the database containing medical images of organs;
[0013] Based on the average pixel value in the database, the number of pixels in the cropped image is reduced to obtain the cropped image after reduction.
[0014] Based on the median pixel spacing in the database, the pixel spacing of the cropped image after deletion is adjusted to obtain the cropped image with adjusted pixel spacing.
[0015] Image enhancement is performed on the cropped image after adjusting the pixel spacing to obtain the preprocessed cropped image.
[0016] In one implementation, the cropping method of each of the cropped images includes:
[0017] Set the movement step size of the sliding window, where the size of the movement step size is smaller than the length of the sliding window along the movement direction;
[0018] The sliding window is moved over the medical image by the specified movement step.
[0019] Each area covered by the sliding window in each movement on the medical image is used as a separate cropped image.
[0020] In one implementation, the process of fusing each cropped image and each global image to obtain sets of fused images, wherein the size of each cropped image is matched with the size of each global image, the global image is a resized medical image containing a complete organ, and the cropped image is an image cropped from the medical image including a local organ, comprising:
[0021] Each of the cropped images is treated as one layer of image, and the global image that matches the size of each of the cropped images is treated as another layer of image;
[0022] The image from one layer and the image from the other layer are overlaid together to obtain a fused image for each group.
[0023] In one implementation, the training methods for the trained image segmentation model include:
[0024] Determine the encoder and decoder that constitute the image segmentation model;
[0025] The fused sample image is input into the encoder to obtain the position training label output by the encoder;
[0026] Determine the location training labels and the location loss function of the location training labels, wherein the location sample labels are used to characterize the position of the cropped sample image on the medical sample image;
[0027] The encoder is trained based on the aforementioned position loss function;
[0028] After the encoder has been trained, the decoder is trained.
[0029] In one implementation, after training the encoder, training the decoder includes:
[0030] The fused sample image is input into the encoder after training is completed to obtain a preliminary segmentation training image with training location labels output by the encoder;
[0031] The preliminary segmentation training image with training location labels is input into the decoder to obtain the training segmentation image output by the decoder;
[0032] The decoder is trained based on the image loss function between the training segmented image and the real segmented image corresponding to the cropped sample image.
[0033] In one implementation, the step of combining the segmented images of each local organ to form a whole organ segmentation image of the complete organ in the medical image includes:
[0034] Based on the location labels corresponding to each of the local organ segmentation images, the local organ segmentation images are combined to obtain the overall organ segmentation image.
[0035] Secondly, embodiments of the present invention also provide a medical organ image segmentation apparatus, wherein the apparatus comprises the following components:
[0036] The image fusion module is used to fuse each cropped image and each global image separately to obtain each set of fused images. The size of each cropped image is matched with the size of each global image. The global image is a medical image containing a complete organ after being resized. The cropped image is an image cropped from the medical image that includes a local organ.
[0037] The image segmentation module is used to apply the trained image segmentation model to each group of fused images to obtain segmented images of local organs with location labels from each cropped image. The location labels are used to characterize the position of the segmented images of local organs on the medical image.
[0038] The image combination module is used to combine the segmented images of each local organ into a complete organ segmentation image of the medical image.
[0039] Thirdly, embodiments of the present invention also provide a terminal device, wherein the terminal device includes a memory, a processor, and a medical organ image segmentation program stored in the memory and executable on the processor, wherein when the processor executes the medical organ image segmentation program, it implements the steps of the medical organ image segmentation method described above.
[0040] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a medical organ image segmentation program, wherein when the medical organ image segmentation program is executed by a processor, the steps of the medical organ image segmentation method described above are implemented.
[0041] Beneficial Effects: This invention first crops a medical image containing a complete organ into individual cropped images containing local organs, while simultaneously reducing the medical image to a global image of the same size as the cropped images. Then, the cropped images and the global images are fused to obtain sets of fused images. Next, an image segmentation model is applied to each set of fused images, using the model to crop segmented images containing local organs from each cropped image, and these segmented images are labeled with their locations. Finally, the segmented images with location labels are combined to obtain a complete segmented image of the organ. From the above analysis, it is clear that the cropped images of this invention retain image detail information, and the scaled global image records the image's contextual information (i.e., the location information of each cropped image within the global image). Therefore, by combining the cropped images and the scaled global image, this invention can both ensure the extraction of detailed image information and record the contextual information of the segmented images within the global image, thereby guaranteeing the quality of the complete organ segmented image composed of the cropped images. Attached Figure Description
[0042] Figure 1 This is an overall flowchart of the present invention;
[0043] Figure 2 This is a structural diagram of the image segmentation model in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of a cropped image in an embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of image fusion in an embodiment of the present invention;
[0046] Figure 5 This is a flowchart of the training model and the application model in the embodiments of the present invention;
[0047] Figure 6 This is a block diagram illustrating the internal structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation
[0048] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0049] Research has shown that segmenting images containing only organs from medical images is the first step in modern clinical diagnosis. For example, segmenting abdominal images from abdominal CT images reduces the time doctors spend on diagnosis and improves the efficiency of the clinical diagnostic process. However, traditional manual methods of medical image segmentation are time-consuming and laborious, and the task becomes even more difficult when dealing with large abdominal CT images. In recent years, with the iterative development of artificial intelligence, deep learning-based pattern recognition models have shown great potential in image segmentation tasks. Automated medical image segmentation systems based on deep learning models and guided by large amounts of CT data can efficiently, quickly, and accurately segment abdominal images. Most excellent algorithms and models for image segmentation using deep learning are designed based on traditional RGB three-dimensional images, whose image size is usually between (224, 224) and (1024, 1024). However, for medical abdominal CT images, the three-dimensional image size is usually between (512, 512, 80) and (512, 512, 260). Meanwhile, in clinical practice, there are also ultra-large CT images, such as whole-body CT scans, that require segmentation. Due to hardware resource limitations, it is difficult to input a 3D CT image as a whole into a deep learning network to obtain the final segmentation result. Existing medical image segmentation methods include two types: The first type decomposes the entire CT image into multiple image blocks. Under controllable hardware resource usage, each image can be used as input to a deep neural network to obtain a separate segmentation result for each image block. Finally, all the obtained segmentation results are stitched together according to their respective positions to obtain the final segmentation result of the entire CT image. However, the practice of decomposing the entire CT image into image blocks and inputting them into the deep neural network individually results in the final prediction completely losing the global information of the original CT image, which easily leads to errors in the position of the segmentation result in the final segmentation result. The second type directly performs shape interpolation on the entire CT image, scaling the size of the CT image to a size that the neural network can accept. This method reduces the original CT image by a large scale to obtain a scaled global CT image. However, scaling the CT image to a very small size leads to the loss of detail information in the CT image, resulting in the loss of detail information in the organ segmentation images obtained from the CT image, ultimately making the segmented organ images unable to assist doctors in clinical judgment. As can be seen from the above analysis, both the first and second segmentation methods reduce the quality of the segmented organ images.
[0050] To address the aforementioned technical problems, this invention provides a method and related apparatus for medical organ image segmentation, solving the problem of low-quality organ images obtained from existing technologies. Specifically, the medical image containing the complete organ is first cropped into individual cropped images containing local organs, while simultaneously reducing the medical image to a global image of the same size as the cropped images. Then, the cropped images and the global images are fused to obtain sets of fused images. Next, an image segmentation model is applied to each set of fused images, using the model to crop segmented images containing local organs from each cropped image, and these segmented images are labeled with their locations. Finally, the segmented images with location labels are combined to obtain the overall segmented image of the organ. This invention improves the quality of the overall segmented image.
[0051] For example, given an abdominal medical image that includes the entire stomach and surrounding tissues, the goal is to segment the stomach from this image (whole organ segmentation). To address this issue, this embodiment first crops the abdominal medical image into three images, A, B, and C. Each of these three images contains only a portion of the stomach structure, effectively dividing the stomach into three parts. Figure 4 As shown, abdominal medical images are scaled to different sizes using interpolation scaling methods to obtain global images A, B, and C. Global image A has the same size as cropped image A, global image B has the same size as cropped image B, and global image C has the same size as cropped image C. Then, using... Figure 4 The stitching method in the image segmentation model stitches together the cropped image and the global image. For example, merging A and B results in the first fused image; merging B and B results in the second fused image; and merging C and C results in the third fused image. The first fused image is input into the image segmentation model to obtain a stomach segmentation image a (i.e., a local organ segmentation image) with location label 1; the second fused image is input into the image segmentation model to obtain a stomach segmentation image b (i.e., a local organ segmentation image) with location label 2; and the third fused image is input into the image segmentation model to obtain a stomach segmentation image c (i.e., a local organ segmentation image) with location label 3. Labels 1, 2, and 3 record the positions of a, b, and c on the abdominal medical image, respectively. Therefore, based on the positional order represented by these three labels, stomach segmentation images a, b, and c are stitched together according to their positions on the overall abdominal medical image to obtain the overall stomach segmentation image S. S represents the stomach region covered in the stomach medical image.
[0052] Exemplary methods
[0053] The medical organ image segmentation method of this embodiment can be applied to a terminal device, which can be a terminal product with image acquisition function, such as a CT scanner. In this embodiment, as... Figure 1 As shown, the medical organ image segmentation method specifically includes the following steps:
[0054] S100, training image segmentation model.
[0055] In one embodiment, the image segmentation model is as follows: Figure 2 As shown, the image includes an encoder (Encoder) connected sequentially on the left and a decoder (Dncoder) connected sequentially on the right. The encoder consists of a 3x3x3 downsampled convolution, a 3x3x3 convolution, and a ReLU activation function connected sequentially; it is used to extract organ feature maps. The decoder consists of a 3x3x3 transposed convolution, a 3x3x3 downsampled convolution, a 3x3x3 convolution, and a ReLU activation function connected sequentially. It is used to segment organ images from the cropped image based on the organ feature maps.
[0056] In another embodiment, each encoder includes two sets of encoding units, and each set of encoding units includes Conv3x3x3, IN, and LReLU connected in sequence, where IN is used to adjust the mean and variance of the input image, and LReLU is used to adjust the magnitude of the encoder output value.
[0057] In one embodiment, step S100 includes the following steps S101 to S106:
[0058] S101, the fused sample image is input into the encoder to obtain the position training label output by the encoder.
[0059] A medical sample image containing the overall structure of an organ is cropped into several pieces to obtain individual cropped sample images. The medical sample image is then scaled up to the same size as each cropped sample image to obtain a global sample image. Finally, the global sample image and the cropped sample images are fused to obtain a fused sample image.
[0060] The location training labels are used to characterize the location of the cropped sample image on the medical sample image.
[0061] S102, determine the location training label and the location loss function of the location training label, wherein the location sample label is used to characterize the position of the cropped sample image on the medical sample image.
[0062] S103, The encoder is trained according to the position loss function.
[0063] If the position loss function is greater than the set position loss threshold, the encoder parameters are adjusted until the position loss function is less than the threshold, at which point the encoder training is complete.
[0064] For example, the location sample label is represented by a three-dimensional vector (xρ, yρ, zρ). Here, xρ represents the offset of the x-coordinate of the cropped image's center point relative to the origin of the original image (medical image); yρ represents the offset of the y-coordinate of the cropped image's center point relative to the origin of the original image (medical image); and zρ represents the offset of the z-coordinate of the cropped image's center point relative to the origin of the original image (medical image). The origin coordinates are the starting point of the coordinate axes of the original image (medical image), i.e., (0, 0, 0). The generated vector here is the label automatically generated by the system during the training phase. The fused sample image is used as input and fed into the model's encoder. After obtaining the lowest-level feature map, it passes through a global pooling layer and a fully connected layer to obtain the predicted location vector. The predicted vector and label vector are used to calculate the regression loss and backpropagated for network parameter optimization. The loss function used is MSE (mean squared error). The training objective is to minimize the distance between the two vectors, improving the model's encoding of location information. An initial learning rate of 0.01 is set for 5000 epochs of iteration. Finally, the model weights that perform best on the validation set are retained.
[0065] The encoder outputs a position tag in this embodiment, which has the following technical effects:
[0066] The biggest problem with traditional sliding window-based segmentation strategies is their inability to effectively understand the positional information of each cropped image within the medical image. The positional labels in this embodiment prevent misjudgments of organ locations caused by segmenting each cropped image individually. Because the global image information carried by the fused image and the high-resolution information of the cropped image cleverly form an information pair, the fused image can be used as input to pre-train the model's encoder. During the pre-training phase, when each pre-fused image is generated, the position of the cropped image within the original image is recorded, facilitating the subsequent stitching of the segmented local organ images from the cropped image into a complete organ segmentation image.
[0067] S104, the fused sample image is input into the encoder after training is completed to obtain the preliminary segmentation training image with training location labels output by the encoder.
[0068] That is, inputting the fused sample image to Figure 2 The top encoder in the middle, Figure 2 The bottom encoder outputs the initial segmented training image. Simultaneously, each encoder also outputs a feature map of an organ, which serves as the input to the corresponding decoder.
[0069] S105, the preliminary segmentation training image with training location labels is input to the decoder to obtain the training segmentation image output by the decoder.
[0070] S106, the decoder is trained based on the image loss function between the training segmented image and the real segmented image corresponding to the cropped sample image.
[0071] Each decoder outputs a training segmented image. The loss function of each encoder's output training segmented image relative to the real segmented image is calculated. The encoder's parameters are adjusted based on its loss function to complete the training. The image loss functions used are Dice Loss and Cross Entropy Loss. Dice Loss is used to optimize large-scale segmentation, while Cross Entropy Loss is used to optimize pixel-level segmentation. An initial learning rate of 0.01 is set, and the iteration is performed for 3000 epochs. Finally, the weights of the model that performs best on the validation set are retained.
[0072] S200, each cropped image and each global image are fused to obtain each set of fused images. The size of each cropped image is matched with the size of each global image. The global image is a medical image containing a complete organ after being resized. The cropped image is an image cropped from the medical image that includes a local organ.
[0073] In one embodiment, a neighbor-to-neighbor interpolation method is used to obtain a cropped image from a medical image.
[0074] In one embodiment, cropping a plurality of cropped images from a medical image includes the following steps S201, S202, and S203:
[0075] S201, Set the movement step size of the sliding window, wherein the size of the movement step size is smaller than the length of the sliding window along the movement direction.
[0076] In one embodiment, the movement step size is 0.5 times the sliding window size.
[0077] S202, the sliding window is moved on the medical image by the movement step.
[0078] S203, the regions covered by each movement of the sliding window on the medical image are taken as individual cropped images.
[0079] When the model uses the sliding window method for inference, the images cropped by the slider each time originate from the same medical image. A globally interpolated and scaled copy of the image is retained to facilitate image fusion during sliding window prediction. During the inference phase, the sliding window predicts with a step size of 0.5 (the first half of the second cropped region overlaps with the second half of the first cropped region), improving the edge segmentation effect of the cropped image.
[0080] For example, such as Figure 3 As shown, the solid-line rectangles represent medical images, and the dashed-line rectangles represent sliding windows. The sliding window moves in a step smaller than its length each time. This ensures that adjacent cropped images have overlapping portions. This overlap between two cropped images allows subsequent segmented images of local organs to also have overlapping portions, facilitating the stitching of these local organ segmented images to obtain the overall organ segmented image.
[0081] In one embodiment, preprocessing is required for both the cropped image and the global image, wherein the preprocessing of the cropped image includes the following steps S204 to S207:
[0082] S204, determine the mean pixel value and median pixel spacing of all images in the database containing the medical images of the organ.
[0083] The database stores all medical images related to organs. The mean pixel value and median pixel spacing of all images in the database are calculated. The median pixel spacing is the distance between two adjacent pixels in an image.
[0084] S205, based on the average pixel value in the database, the number of pixels in the cropped image is reduced to obtain the cropped image after reduction.
[0085] The upper and lower limits of the cropping threshold are 99.5% and 0.05% of the dataset's pixel intensity (pixel mean), respectively. After cropping, the image pixel values need to be subtracted from the dataset's mean and divided by the dataset's variance.
[0086] S206, Based on the median pixel spacing in the database, adjust the pixel spacing of the cropped image after deletion to obtain the cropped image with adjusted pixel spacing.
[0087] To process the image voxel spacing, the voxel spacing of the image needs to be adjusted to the median size of the voxel spacing of the data, and the image size needs to be interpolated and scaled according to the adjustment of the voxel spacing.
[0088] S207, perform image enhancement on the cropped image after adjusting the pixel spacing to obtain the preprocessed cropped image.
[0089] The image is augmented with random data such as translation, scaling, symmetry, and rotation. This step requires processing both the cropped image and the global image simultaneously, randomly adjusting the size of the image pixels, and adding random noise.
[0090] In one embodiment, preprocessing the global image only requires steps S204 and S207 described above.
[0091] The preprocessing described above for cropped and global images also applies to the model training phase.
[0092] S300, the trained image segmentation model is applied to each group of fused images to obtain segmented images of local organs with location labels from each cropped image. The location labels are used to characterize the position of the segmented images of local organs on the medical image.
[0093] Input a set of fused images Figure 2 Image segmentation models in Figure 2 The decoder at the top right of the image outputs a segmented image of a local organ. The encoder of the model sets location labels on this segmented image of the local organ.
[0094] S400: Based on the segmented images of each local organ, combine them to form a complete organ segmentation image of the whole organ in the medical image.
[0095] The segmented images of each local organ are combined according to their location labels to obtain the overall organ segmentation image.
[0096] In another embodiment, as follows Figure 5 The process shown is for segmenting medical images, such as... Figure 5 As shown, firstly, pixel features such as pixel intensity are statistically analyzed in the dataset containing all organ medical images. Then, based on the pixel feature information, the cropped sample image and the global sample image are preprocessed. After that, the two preprocessed images are fused to obtain the training images required to train the image segmentation model (3D UNet model). The model is then trained, and the trained model can be used for actual image segmentation.
[0097] In summary, the cropped image of this invention retains image detail information, and the scaled global image of this invention records the context information of the image (i.e., records the position information of each cropped image on the global image). Therefore, by combining the cropped image and the scaled global image, this invention can both ensure the extraction of image detail information and record the context information of the segmented image on the global image, thereby ensuring the quality of the overall organ segmentation image composed of the various cropped images.
[0098] Furthermore, compared to traditional sliding window models for predicting medical image segmentation, this invention effectively addresses the limitation of previous models in not being able to see the global image and utilize global contextual information. It demonstrates significant improvement in segmentation sensitive to location information. For example, in segmenting the left and right pancreas, traditional methods often misidentify the pancreas's left and right positions; combining global information effectively avoids this. A novel image fusion method combines global and local information. The fused image can be used to pre-train the model for context-dependent specific tasks.
[0099] Exemplary device
[0100] This embodiment also provides a medical organ image segmentation device, which includes the following components:
[0101] The image fusion module is used to fuse each cropped image and each global image separately to obtain each set of fused images. The size of each cropped image is matched with the size of each global image. The global image is a medical image containing a complete organ after being resized. The cropped image is an image cropped from the medical image that includes a local organ.
[0102] The image segmentation module is used to apply the trained image segmentation model to each group of fused images to obtain segmented images of local organs with location labels from each cropped image. The location labels are used to characterize the position of the segmented images of local organs on the medical image.
[0103] The image combination module is used to combine the segmented images of each local organ into a complete organ segmentation image of the medical image.
[0104] Based on the above embodiments, the present invention also provides a terminal device, the principle block diagram of which can be as follows: Figure 6 As shown, the terminal device includes a processor, memory, network interface, display screen, and temperature sensor connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a medical organ image segmentation method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The temperature sensor is pre-installed inside the terminal device to detect the operating temperature of the internal components.
[0105] Those skilled in the art will understand that Figure 6 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal device to which the present invention is applied. The specific terminal device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0106] In one embodiment, a terminal device is provided, comprising a memory, a processor, and a medical organ image segmentation program stored in the memory and executable on the processor. When the processor executes the medical organ image segmentation program, it implements the following operation instructions:
[0107] Each cropped image and each global image are merged separately to obtain a set of merged images. The size of each cropped image is matched with the size of each global image. The global image is a medical image containing the complete organ after being resized. The cropped image is an image cropped from the medical image that includes local organs.
[0108] The trained image segmentation model is applied to each group of fused images to obtain segmented images of local organs with location labels from each cropped image. The location labels are used to characterize the position of the segmented local organ image on the medical image.
[0109] Based on the segmented images of each local organ, a complete organ segmentation image of the whole organ on the medical image is generated.
[0110] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A medical organ image segmentation method characterized by, The application relates to a method for training an image segmentation model and a method for segmenting an organ in a medical image. The method comprises the following steps: fusing each cropped image and each global image to obtain a group of fused images, wherein the size of each cropped image matches the size of each global image, the global image is an image obtained by adjusting the size of a medical image containing a complete organ, and the cropped image is an image containing a local organ cropped from the medical image; applying a trained image segmentation model to each group of fused images to obtain each local organ segmentation image segmented from each cropped image and having a position label, wherein the position label is used to represent the position of the local organ segmentation image on the medical image; combining each local organ segmentation image to obtain a whole organ segmentation image of the complete organ on the medical image; the cropped image is a preprocessed image, and the preprocessing comprises the following steps: determining the pixel mean value and the pixel interval median value of all images in a database where the medical image of the organ is located; reducing the pixel points of the cropped image according to the pixel mean value of the database to obtain the cropped image after reduction; adjusting the pixel interval of the cropped image after reduction according to the pixel interval median value of the database to obtain the cropped image after adjustment of the pixel interval; performing image enhancement on the cropped image after adjustment of the pixel interval to obtain the preprocessed cropped image; the training method of the trained image segmentation model comprises the following steps: determining an encoder and a decoder constituting the image segmentation model; inputting a fused sample image into the encoder to obtain a position training label output by the encoder; determining a position training label and a position loss function of the position training label, wherein the position sample label is used to represent the position of a cropped sample image on a medical sample image; completing the training of the encoder according to the position loss function; training the decoder after completing the training of the encoder; the training of the decoder after completing the training of the encoder comprises the following steps: inputting the fused sample image into the trained encoder to obtain a preliminary segmentation training image with a training position label output by the encoder; inputting the preliminary segmentation training image with the training position label into the decoder to obtain a training segmentation image output by the decoder; 2. The medical organ image segmentation method of claim 1, wherein, completing the training of the decoder according to an image loss function between the training segmentation image and a real segmentation image corresponding to the cropped sample image. the cropping method of each cropped image comprises the following steps: setting a moving step length of a sliding window, wherein the size of the moving step length is smaller than the length size of the sliding window in the moving direction; moving the sliding window on the medical image by the moving step length; covering each region moved by the sliding window on the medical image as each cropped image.
3. The medical organ image segmentation method of claim 1, wherein, The respective cropped images and the respective global images are fused respectively to obtain each group of fused images, the size of each of the cropped images is matched with the size of each of the global images, the global image is an image after size adjustment of a medical image containing a complete organ, and the cropped image is an image including a local organ cropped from the medical image. Each of the cropped images is taken as a layer of image, and the global image matched with the size of each of the cropped images is taken as another layer of image. The layer of image and the another layer of image are superimposed together to obtain the fused image of each group.
4. The medical organ image segmentation method of claim 1, wherein, The whole organ segmentation image of the complete organ on the medical image is combined according to each of the local organ segmentation images. The whole organ segmentation image is obtained by combining each of the local organ segmentation images according to each of the position labels corresponding to the local organ segmentation images.
5. A medical organ image segmentation apparatus characterized by comprising: The device comprises the following components: An image fusion module is configured to fuse each of the cropped images and each of the global images respectively to obtain each group of fused images, the size of each of the cropped images is matched with the size of each of the global images, the global image is an image after size adjustment of a medical image containing a complete organ, and the cropped image is an image including a local organ cropped from the medical image. An image segmentation module is configured to apply a trained image segmentation model to each of the fused images to obtain each of the local organ segmentation images with position labels segmented from each of the cropped images, and the position label is used to represent the position of the local organ segmentation image on the medical image. An image combination module is configured to combine a whole organ segmentation image of a complete organ on the medical image according to each of the local organ segmentation images. The cropped image is a preprocessed image, and the preprocessing comprises: Determining the pixel mean and the pixel interval median of all images in a database of organ medical images. According to the pixel mean of the database, the pixel points of the cropped image are reduced to obtain the cropped image after reduction. According to the pixel interval median of the database, the pixel interval of the cropped image after reduction is adjusted to obtain the cropped image after pixel interval adjustment. The cropped image after pixel interval adjustment is subjected to image enhancement to obtain the preprocessed cropped image. The training method of the trained image segmentation model comprises: Determining an encoder and a decoder constituting the image segmentation model. Inputting a fused sample image into the encoder to obtain a position training label output by the encoder. Determining a position training label and a position loss function of the position training label, and the position sample label is used to represent the position of the cropped sample image on the medical sample image. According to the position loss function, the training of the encoder is completed. After the training of the encoder is completed, the decoder is trained. After the training of the encoder is completed, the decoder is trained, comprising: inputting the fusion sample image into the encoder after training to obtain a preliminary segmentation training image with a training position label output by the encoder; inputting the preliminary segmentation training image with the training position label into the decoder to obtain a training segmentation image output by the decoder; completing training of the decoder according to an image loss function between the training segmentation image and a real segmentation image corresponding to the cropped sample image.
6. A terminal device, characterized by comprising: The terminal device comprises a memory, a processor, and a medical organ image segmentation program stored in the memory and executable on the processor. When the processor executes the medical organ image segmentation program, the steps of the medical organ image segmentation method according to any one of claims 1-4 are implemented.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a medical organ image segmentation program. When the processor executes the medical organ image segmentation program, the steps of the medical organ image segmentation method according to any one of claims 1-4 are implemented.
Citation Information
Patent Citations
Deep learning-based CT image endangered organ segmentation system
CN114219943A
Multi-scale inter-class tumor and peripheral organ segmentation method
CN115063435A