Image segmentation method, image segmentation model training method and computer equipment

By preprocessing, spatial cropping, and multiple masking of three-dimensional lesion images, interfering organs and redundant structures are removed, solving the problem of high computational load in image segmentation models, improving segmentation efficiency and accuracy, and reducing computational consumption.

CN121600259APending Publication Date: 2026-03-03BEIJING TSINGHUA CHANGGUNG HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511661254.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing image segmentation models require a large amount of computation and consume a lot of computing power when processing medical images, resulting in high processing power requirements.

Method used

After preprocessing the three-dimensional lesion image, spatial cropping and multiple masking are performed to remove interfering organs and redundant structural regions, generating a mask image of the remaining region, and then image segmentation is performed using an image segmentation model.

Benefits of technology

This reduces the computational overhead of the image segmentation model for the background region, improves the efficiency and accuracy of the segmentation model, and reduces computational power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600259A_ABST
    Figure CN121600259A_ABST
Patent Text Reader

Abstract

The invention relates to an image segmentation method, an image segmentation model training method and computer equipment. The method comprises the following steps: acquiring a three-dimensional focus image corresponding to a target focus, and preprocessing the three-dimensional focus image to obtain a preprocessed three-dimensional focus image; performing space clipping on the preprocessed three-dimensional focus image to obtain a candidate mask image; determining an interfering organ category corresponding to the three-dimensional focus image, and generating an organ mask graph corresponding to the interfering organ category; identifying a redundant structure region corresponding to the three-dimensional lesion image, and generating a redundant structure mask graph corresponding to a redundant structure; removing an area corresponding to the organ mask image and the redundant structure mask image from the candidate mask image to obtain a residual area mask image; and carrying out image segmentation by using the image segmentation model according to the residual region mask graph to obtain an image segmentation result. By adopting the method provided by the invention, the computing power required when the image segmentation model performs image segmentation on the medical image can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to image segmentation methods, image segmentation model training methods, and computer equipment. Background Technology

[0002] With the development of computer technology, image segmentation technology has emerged. Image segmentation technology can be applied to medical image segmentation tasks. In medical image segmentation tasks, dense voxel-level annotation of three-dimensional image data (such as CT or MRI) is required to identify organs, lesions or structures.

[0003] In related technologies, image segmentation of medical images is usually achieved using image segmentation models, such as 3D-U-Net. 3D-U-Net can learn dense volumetric segmentation end-to-end and can still generate complete 3D segmentation predictions even with sparse annotations.

[0004] However, when using image segmentation models to segment medical images, the amount of data processed is very large, which places high demands on the processing power of GPUs, resulting in a high consumption of computing power. Summary of the Invention

[0005] Therefore, it is necessary to address the aforementioned technical problems by providing an image segmentation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce the computational power required by image segmentation models when segmenting medical images.

[0006] In a first aspect, this application provides an image segmentation method, including:

[0007] A three-dimensional lesion image corresponding to the target lesion is obtained, and the three-dimensional lesion image is preprocessed to obtain a preprocessed three-dimensional lesion image.

[0008] Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image;

[0009] Determine the category of interfering organs corresponding to the three-dimensional lesion image, and generate an organ mask image corresponding to the category of interfering organs;

[0010] Identify the redundant structure regions corresponding to the three-dimensional lesion image, and generate a redundant structure mask map corresponding to the redundant structure.

[0011] The remaining region mask is obtained by removing the region corresponding to the organ mask and the redundant structure mask from the candidate mask image;

[0012] Image segmentation results are obtained by performing image segmentation based on the remaining region mask map and the image segmentation model.

[0013] In one embodiment, the step of performing image segmentation based on the remaining region mask map and using the image segmentation model to obtain the image segmentation result includes:

[0014] The remaining area mask image is cleaned to obtain a clean mask image;

[0015] The region of interest is cropped from the preprocessed three-dimensional lesion image using the clean mask image to obtain a region of interest image.

[0016] The region of interest image is input into an image segmentation model, and the image is segmented using the image segmentation model. The final segmentation result corresponding to the three-dimensional lesion image is determined based on the image segmentation result output by the image segmentation model.

[0017] In one embodiment, the step of cropping the region of interest from the preprocessed three-dimensional lesion image using the clean mask image to obtain a target mask image includes:

[0018] Calculate the minimum bounding box for the clean mask image, and add an edge buffer area of ​​a preset size in each direction of the minimum bounding box to obtain the outer bounding box;

[0019] The region of interest image is obtained by cropping a local sub-volume from the preprocessed 3D lesion image using the bounding box.

[0020] In one embodiment, determining the interfering organ category corresponding to the three-dimensional lesion image and generating an organ mask image corresponding to the interfering organ category includes:

[0021] Obtain the set of interfering organ categories corresponding to the target lesion, and identify at least one organ category corresponding to the three-dimensional lesion image;

[0022] Determine the interfering organ category that matches the at least one organ category from the set of interfering organ categories, and determine the successfully matched interfering organ category as the interfering organ category corresponding to the three-dimensional lesion image;

[0023] Generate organ mask images corresponding to each of the said interfering organ categories and merge them.

[0024] In one embodiment, the target lesion is a pseudomyxoma peritoneum, and the step of identifying redundant structures corresponding to the three-dimensional lesion image and generating a redundant structure mask map corresponding to the redundant structure region includes:

[0025] Identify the redundant structural regions corresponding to the three-dimensional lesion image to obtain an initial structural mask image;

[0026] A morphological dilation operation is performed on the initial structural mask to expand the connectivity between the spine and back muscles, thereby obtaining the seed region;

[0027] Within the effective propagation region, a three-dimensional connectivity propagation algorithm is executed to identify all redundant regions connected to the spinal back muscles, thereby obtaining a redundant structure mask map corresponding to the redundant structure regions.

[0028] Secondly, this application also provides an image segmentation apparatus, comprising:

[0029] The preprocessing module is used to acquire a three-dimensional lesion image corresponding to the target lesion, and to preprocess the three-dimensional lesion image to obtain a preprocessed three-dimensional lesion image.

[0030] The spatial cropping module is used to perform spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image.

[0031] An organ mask generation module is used to determine the interfering organ category corresponding to the three-dimensional lesion image and generate an organ mask corresponding to the interfering organ category.

[0032] A redundant structure mask generation module is used to identify the redundant structure regions corresponding to the three-dimensional lesion image and generate a redundant structure mask corresponding to the redundant structure.

[0033] The region removal module is used to remove the region corresponding to the organ mask and the redundant structure mask from the candidate mask image to obtain the remaining region mask image;

[0034] The image segmentation module is used to perform image segmentation based on the remaining region mask map and the image segmentation model to obtain the image segmentation result.

[0035] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described image segmentation method.

[0036] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described image segmentation method.

[0037] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described image segmentation method.

[0038] The aforementioned image segmentation method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire a three-dimensional lesion image corresponding to the target lesion, preprocess the three-dimensional lesion image to obtain a preprocessed three-dimensional lesion image, spatially crop the preprocessed three-dimensional lesion image to obtain a candidate mask image, determine the interfering organ category corresponding to the three-dimensional lesion image, generate an organ mask image corresponding to the interfering organ category, identify redundant structural regions corresponding to the three-dimensional lesion image, generate a redundant structure mask image corresponding to the redundant structure, remove the region corresponding to the organ mask image and the redundant structure mask image from the candidate mask image to obtain a remaining region mask image, and perform image segmentation based on the remaining region mask image and using an image segmentation model to obtain the image segmentation result. Since multiple masking processes can be performed on the three-dimensional lesion image to obtain a mask image, and the regions corresponding to these mask images can be removed from the candidate mask image to obtain a more accurate candidate region, it can not only improve the efficiency and accuracy of the image segmentation model, but also reduce the computational overhead of the model for background regions, thereby reducing the computational power required by the model when performing image segmentation on medical images.

[0039] Sixthly, this application provides a method for training an image segmentation model, including:

[0040] Obtain a three-dimensional lesion image sample corresponding to the target lesion, and preprocess the three-dimensional lesion image sample to obtain a preprocessed three-dimensional lesion image;

[0041] Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image;

[0042] Determine the category of interfering organs corresponding to the three-dimensional lesion image, and generate an organ mask image corresponding to the category of interfering organs;

[0043] Identify the redundant structural regions corresponding to the three-dimensional lesion image and generate a redundant structural mask map corresponding to the redundant structural regions.

[0044] The remaining region mask is obtained by removing the region corresponding to the organ mask and the redundant structure mask from the candidate mask image;

[0045] Training samples are generated based on the remaining region mask image, and an image segmentation model is trained based on the training samples.

[0046] Seventhly, this application also provides an image segmentation model training apparatus, comprising:

[0047] The preprocessing module is used to acquire three-dimensional lesion image samples corresponding to the target lesion, preprocess the three-dimensional lesion image samples, and obtain preprocessed three-dimensional lesion images.

[0048] The spatial cropping module is used to perform spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image.

[0049] An organ mask generation module is used to determine the interfering organ category corresponding to the three-dimensional lesion image and generate an organ mask corresponding to the interfering organ category.

[0050] A redundant structure mask generation module is used to identify the redundant structure regions corresponding to the three-dimensional lesion image and generate a redundant structure mask corresponding to the redundant structure regions.

[0051] The region removal module is used to remove the region corresponding to the organ mask and the redundant structure mask from the candidate mask image to obtain the remaining region mask image;

[0052] The model training module is used to generate training samples based on the remaining region mask image, and to train the image segmentation model based on the training samples.

[0053] Eighthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described steps of training the image segmentation model.

[0054] Ninthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described steps of training the image segmentation model.

[0055] In a tenth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described steps of training the image segmentation model.

[0056] The aforementioned image segmentation model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire three-dimensional lesion image samples corresponding to the target lesion, preprocess the three-dimensional lesion image samples to obtain preprocessed three-dimensional lesion images, spatially crop the preprocessed three-dimensional lesion images to obtain candidate mask images, determine the interfering organ categories corresponding to the three-dimensional lesion images, generate organ mask images corresponding to the interfering organ categories, identify redundant structural regions corresponding to the three-dimensional lesion images, generate redundant structural mask images corresponding to the redundant structural regions, remove the regions corresponding to the organ mask images and the redundant structural mask images from the candidate mask images to obtain the remaining region mask images, generate training samples based on the remaining region mask images, and train the image segmentation model based on the training samples. Since multiple masking processes can be performed on the three-dimensional lesion images to obtain mask images, and the regions corresponding to these mask images can be removed from the candidate mask images to obtain more accurate candidate regions, the computational overhead of the model for background regions can be reduced, greatly reducing the model training time and computational power consumed. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is an application environment diagram of the image segmentation method and the image segmentation model training method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating an image segmentation method in one embodiment;

[0060] Figure 3 This is a flowchart illustrating the image segmentation steps in one embodiment;

[0061] Figure 4 This is a schematic diagram of the steps for generating an organ mask image in one embodiment;

[0062] Figure 5 This is a flowchart illustrating an image segmentation model training method in one embodiment;

[0063] Figure 6 This is a structural block diagram of an image segmentation device in one embodiment;

[0064] Figure 7 This is a structural block diagram of an image segmentation model processing device in one embodiment;

[0065] Figure 8This is an internal structural diagram of a computer device in one embodiment;

[0066] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0068] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0069] The image segmentation method and image segmentation model processing method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0070] The image segmentation method and image segmentation model processing method provided in this application can be executed by a computer device, which refers to an electronic device with data computing, processing, and storage capabilities. Figure 1Taking the application environment shown as an example, the image segmentation method and the image segmentation model processing method can be executed by the terminal 102 alone, or by the server 104 alone, or by the terminal 102 and the server 104 interacting and cooperating to execute them. This application does not limit this.

[0071] Taking server 104 running alone as an example, the server can obtain three-dimensional lesion image samples corresponding to the target lesion, preprocess the three-dimensional lesion image samples to obtain preprocessed three-dimensional lesion images, perform spatial cropping on the preprocessed three-dimensional lesion images to obtain candidate mask images, determine the interfering organ categories corresponding to the three-dimensional lesion images, generate organ mask images corresponding to the interfering organ categories, identify redundant structural regions corresponding to the three-dimensional lesion images, generate redundant structural mask images corresponding to the redundant structural regions, remove the regions corresponding to the organ mask images and the redundant structural mask images from the candidate mask images to obtain the remaining region mask images, generate training samples based on the remaining region mask images, and train the image segmentation model based on the training samples.

[0072] After training and obtaining a well-trained image segmentation model, the server can deploy the model locally. Upon receiving an image segmentation request from a terminal, the server can acquire the 3D lesion image corresponding to the target lesion indicated in the request, preprocess the 3D lesion image to obtain a preprocessed 3D lesion image, spatially crop the preprocessed 3D lesion image to obtain a candidate mask image, determine the interfering organ category corresponding to the 3D lesion image, generate an organ mask image corresponding to the interfering organ category, identify redundant structural regions corresponding to the 3D lesion image, generate a redundant structure mask image corresponding to the redundant structure, remove the regions corresponding to the organ mask image and the redundant structure mask image from the candidate mask image to obtain the remaining region mask image, and perform image segmentation based on the remaining region mask image and the image segmentation model to obtain the image segmentation result.

[0073] In one exemplary embodiment, such as Figure 2 As shown, an image segmentation method is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 202 to 206. Wherein:

[0074] Step 202: Obtain the three-dimensional lesion image corresponding to the target lesion, preprocess the three-dimensional lesion image, and obtain the preprocessed three-dimensional lesion image.

[0075] The target lesion refers to the lesion that requires medical imaging segmentation, such as pseudomyxoma peritonei (PMP), liver cancer, or glioma in the brain.

[0076] Three-dimensional lesion images refer to three-dimensional medical imaging data containing the target lesion. For example, three-dimensional lesion images can be in CT or MRI format, and can be composed of three-dimensional spatial structures in units of voxels. For example, they can be DICOM sequence data of abdominal CT.

[0077] Specifically, the server can obtain the three-dimensional lesion image corresponding to the target lesion, preprocess the three-dimensional lesion image, and obtain the preprocessed three-dimensional lesion image.

[0078] For example, the server can export the DICOM format three-dimensional image sequence corresponding to the target lesion from medical imaging equipment or medical image archiving and communication system, and then preprocess the three-dimensional lesion image. On the one hand, the DICOM sequence can be converted into HU body data by tools such as SimpleITK to achieve standardized quantization of CT values. On the other hand, the TotalSegmentator pre-trained model can be called to generate organ label maps, and the HU body data and organ label maps can be aligned in the spatial coordinate system by rigid registration algorithms such as affine transformation, and finally the preprocessed three-dimensional lesion image can be obtained.

[0079] Step 204: Spatial cropping is performed on the preprocessed 3D lesion image to obtain a candidate mask image.

[0080] Spatial clipping refers to defining the effective area to be retained in the spatial dimension of a three-dimensional lesion image based on anatomical priors or the spatial distribution characteristics of the lesion, and eliminating the spatial range that is irrelevant to the lesion.

[0081] The candidate mask image is a binary mask with the same size as the preprocessed 3D lesion image, where "1" represents the valid area retained after spatial cropping and "0" represents the invalid area that is removed.

[0082] For example, the server can determine the boundaries of the longitudinal range to be preserved in three-dimensional space based on the anatomical distribution pattern of the target lesion. In the same spatial coordinate system as the preprocessed three-dimensional lesion image, voxels within the preserved range are marked as "1", and voxels outside the range are marked as "0", thus generating a candidate mask image.

[0083] In practical applications, with the target lesion being peritoneal pseudomyxoma, the server can combine abdominal anatomy knowledge to determine the three-dimensional spatial region to be preserved between the "upper border plane of the lung" and the "lower border plane of the femoral head". Using the SimpleITK tool, in the spatial coordinate system corresponding to the preprocessed abdominal CTHU body data of PMP patients, all voxels within the range of "upper border of the lung to lower border of the femoral head" are marked as "1", and voxels outside this range are marked as "0", generating a candidate mask map.

[0084] Step 206: Determine the category of interfering organs corresponding to the three-dimensional lesion image and generate an organ mask map corresponding to the category of interfering organs.

[0085] Interfering organ categories refer to organ types that are not anatomically related to the target lesion and whose imaging information may interfere with the segmentation accuracy of the lesion. These categories need to be selected and determined in conjunction with the anatomical distribution characteristics of the lesion to avoid the voxel signals of irrelevant organs affecting the accurate localization of the lesion.

[0086] An organ mask is a binary mask that is completely identical in size to the three-dimensional lesion image. For example, in an organ mask, "1" marks the voxel region corresponding to the interfering organ, and "0" marks the region of the non-interfering organ.

[0087] Specifically, the server can determine the category of interfering organs corresponding to the three-dimensional lesion image and generate an organ mask map corresponding to the category of interfering organs.

[0088] For example, the server can obtain a set of interfering organ categories corresponding to the target lesion, identify at least one organ category corresponding to the three-dimensional lesion image, determine the interfering organ category that matches at least one organ category from the set of interfering organ categories, determine the successfully matched interfering organ category as the interfering organ category corresponding to the three-dimensional lesion image, generate an organ mask image corresponding to each interfering organ category and merge them to obtain the final organ mask image.

[0089] Step 208: Identify the redundant structure regions corresponding to the three-dimensional lesion image and generate a redundant structure mask map corresponding to the redundant structure.

[0090] Redundant structural regions refer to non-organ structural regions in a 3D lesion image that have no direct anatomical connection to the target lesion but may interfere with segmentation accuracy. They are usually adjacent to the anatomical space where the lesion is located and need to be identified by specific algorithms. For example, the redundant structural region of a pseudomyxoma peritonei (PMP) lesion is located in the abdominal cavity. Its redundant structural region is the area connected to the spine and back muscles adjacent to the abdominal cavity. Although this region is not an organ, it will consume computational resources and may confuse lesion features.

[0091] A redundant structure mask is a binary mask whose spatial dimensions are completely identical to those of a three-dimensional lesion image. For example, in a redundant structure mask, "1" marks voxels representing redundant structural regions, and "0" marks non-redundant structural regions. It is a core tool for subsequent removal of redundant structures. For instance, the redundant structure mask corresponding to a PMP lesion can accurately mark the voxel positions of the connected regions of the spine and back muscles.

[0092] For example, the type of redundant structure to be identified can be determined first based on the anatomical distribution characteristics of the target lesion. Then, a pre-trained anatomical structure segmentation model can be called to extract the initial label of the redundant structure. The initial label is subjected to morphological dilation to determine the seed region. In the effective space after spatial clipping and organ subtraction, a three-dimensional connectivity propagation algorithm is used to identify all regions connected to the redundant structure starting from the seed region. The voxels of the identified connected regions are marked as "1", and the remaining voxels are marked as "0". Finally, a redundant structure mask map corresponding to the redundant structure is generated.

[0093] Taking pseudomyxoma peritoneum (PMP) lesions as an example, the redundant structure type is first determined to be the spine and back muscle region based on the abdominal anatomical features. Then, the TotalSegmentator model is called to extract the initial labels of the spine and back muscles from the abdominal CTHU body data of PMP patients. The labels are subjected to morphological expansion to enhance the seed region. In the effective space generated by spatial clipping and after organ subtraction, a 26-neighbor flooding filling algorithm is used to identify all regions connected to the spine or back muscles starting from the seed region. All voxels of the connected region are marked as "1", and the remaining voxels are marked as "0", generating the redundant structure mask map corresponding to the PMP lesion.

[0094] Step 210: Remove the regions corresponding to the organ mask images and redundant structure mask images from the candidate mask images to obtain the remaining region mask images.

[0095] The remaining region mask refers to the binary mask that is most likely to contain lesions after organs and redundant structures have been removed. For example, in the remaining region mask, "1" represents the effective candidate region after screening, and "0" represents the interference region that has been removed.

[0096] Specifically, the server can invert the organ mask image and the redundant structure mask image respectively (~organ mask image, ~redundant structure mask image), and then perform a "AND operation (∧)" on the candidate mask image and the two inverted mask images in sequence to obtain the remaining region mask image.

[0097] Taking PMP lesion segmentation as an example, first determine each mask image: the candidate mask image is mask_z (the voxels from the upper border of the lung to the lower border of the femoral head are marked as 1), the organ mask image is the combined mask of "heart + major blood vessels + liver" (marked as mask_org_combined), and the redundant structure mask image is connected_to_spine (the connected regions of the spine and back muscles are marked as 1); perform the elimination operation: first calculate ~mask_org_combined (non-interfering organ regions are marked as 1) and ~connected_to_spine (non-spine and back muscle regions are marked as 1), and then obtain the remaining region mask image by Residual=mask_z∧(~mask_org_combined)∧(~connected_to_spine).

[0098] Step 212: Perform image segmentation based on the remaining region mask and using an image segmentation model to obtain the image segmentation result.

[0099] Among them, the image segmentation model is a machine learning model used for segmentation, such as the 3D-U-Net network.

[0100] Specifically, the server can perform image segmentation based on the remaining region mask map and an image segmentation model to obtain the image segmentation result.

[0101] For example, the server can use the remaining region mask image to crop the region of interest in the preprocessed 3D lesion image to obtain the region of interest image. The region of interest image is then input into the image segmentation model, and the image segmentation model is used to perform image segmentation. The final segmentation result corresponding to the 3D lesion image can then be determined based on the output of the model.

[0102] It is understood that in some embodiments, after generating the organ mask image, the server may first remove the organ mask image from the candidate mask image, then perform the step of generating a redundant structure mask image, then generate the redundant structure mask image, and then continue to remove redundant structure masks from the candidate mask image after removing the organ mask image.

[0103] In the aforementioned image segmentation method, a three-dimensional lesion image corresponding to the target lesion is acquired. This three-dimensional lesion image is then preprocessed to obtain a preprocessed three-dimensional lesion image. Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image. The interfering organ category corresponding to the three-dimensional lesion image is determined, and an organ mask image corresponding to the interfering organ category is generated. Redundant structural regions corresponding to the three-dimensional lesion image are identified, and a redundant structure mask image corresponding to the redundant structure is generated. Regions corresponding to the organ mask image and redundant structure masks are removed from the candidate mask image to obtain a remaining region mask image. Image segmentation is then performed based on the remaining region mask image using an image segmentation model to obtain the image segmentation result. Since multiple masking processes can be performed on the three-dimensional lesion image to obtain mask images, and regions corresponding to these mask images are removed from the candidate mask image to obtain more accurate candidate regions, this method not only improves the efficiency and accuracy of the image segmentation model but also reduces the computational overhead of the model for background regions, thereby reducing the computational power required for image segmentation of medical images.

[0104] In one exemplary embodiment, reference is made to Figure 3 Image segmentation is performed based on the remaining region mask image and using an image segmentation model to obtain the image segmentation results, including:

[0105] Step 302: Clean up the remaining mask image to obtain a clean mask image.

[0106] Step 304: Use a clean mask image to crop the region of interest in the preprocessed 3D lesion image to obtain the region of interest image.

[0107] Step 306: Input the region of interest image into the image segmentation model, perform image segmentation using the image segmentation model, and determine the final segmentation result corresponding to the three-dimensional lesion image based on the image segmentation result output by the image segmentation model.

[0108] Specifically, the server can perform small connected component removal and morphological smoothing on the remaining region mask image to obtain a clean mask image. Continuing with the PMP lesion as an example, the server can remove small connected components smaller than 500 voxels from the remaining region mask image and smooth the edges through morphological opening and closing operations to obtain the remaining region mask image corresponding to the PMP lesion.

[0109] The server can further use a clean mask image to crop the region of interest from the preprocessed 3D lesion image to obtain the region of interest image.

[0110] The server can further input the region of interest image into the image segmentation model, and then use the image segmentation model to perform image segmentation. Based on the image segmentation results output by the image segmentation model, the final segmentation result corresponding to the three-dimensional lesion image can be determined.

[0111] For example, the server can input the region of interest image into a 3D-UNet segmentation network and use sliding window inference and probabilistic fusion to obtain the corresponding image segmentation result.

[0112] For example, the server can further map the image segmentation result back to the original volume and export it in the NIfTI format commonly used in medical imaging to obtain the final segmentation result.

[0113] In the above embodiments, since the remaining region mask image can be cleaned and the obtained clean mask image can be used to crop the region of interest in the preprocessed three-dimensional lesion image to obtain the region of interest image, and then the region of interest image is combined with the image segmentation model to perform image segmentation, the accuracy of the obtained image segmentation results is further improved.

[0114] In an exemplary embodiment, a target mask image is obtained by cropping the region of interest (ROI) of the preprocessed 3D lesion image using a clean mask image, including:

[0115] The minimum bounding box is calculated for the clean mask image. An edge buffer region of a preset size is added to each direction of the minimum bounding box to obtain the outer bounding box. The region of interest image is obtained by cropping the local sub-volume from the preprocessed 3D lesion image using the outer bounding box.

[0116] The minimum bounding box (bbox) is the smallest three-dimensional rectangle that can completely enclose the region with a value of "1" in the clean mask image. Its boundary is determined by the maximum and minimum voxel coordinates of the region in the x, y, and z spatial dimensions, which can accurately define the potential range of the lesion. For example, if the clean mask image of a PMP lesion has a range of 100-300 voxels on the x-axis, 80-280 voxels on the y-axis, and 50-150 voxels on the z-axis, then the coordinate boundary of its minimum bounding box corresponds to the above range.

[0117] The margin refers to the extra voxel width added in the x, y, and z directions of the minimum bounding box. It is used to prevent the loss of lesion information during clipping because the bounding box is too close to the edge of the lesion. For example, the preset margin size can be 10 to 20 voxels.

[0118] The circumbound box refers to the three-dimensional rectangular frame formed by superimposing the minimum bounding box with the edge buffer area; it is the final bounding box used for clipping. For example, after adding 15 voxel margins to the x, y, and z axes of the minimum bounding box of a PMP lesion, the new x-axis range is 85-315 voxels, the y-axis range is 65-295 voxels, and the z-axis range is 35-165 voxels. This bounding box is the circumbound box.

[0119] A region of interest (ROI) image refers to a local sub-volume cropped from a preprocessed 3D lesion image using an outer bounding box, containing only the lesion and a small amount of surrounding effective background. For example, the ROI image of a PMP lesion is a sub-volume cropped from abdominal CTHU body data using the aforementioned outer bounding box.

[0120] Specifically, the server can, based on a clean mask image, calculate the minimum voxel coordinates (x_min, y_min, z_min) and maximum voxel coordinates (x_max, y_max, z_max) of the "1" value region in the x, y, and z dimensions in a three-dimensional spatial coordinate system. These two sets of coordinates determine the minimum bounding box that can completely enclose the "1" value region. Furthermore, based on the size characteristics of the target lesion and the edge reserve requirements, a preset-sized edge buffer region is set, and this edge buffer is superimposed on the minimum bounding box in the x, y, and z directions. The region, i.e., the x-axis range is expanded to (x_min-margin) ~ (x_max+margin), the y-axis range is expanded to (y_min-margin) ~ (y_max+margin), and the z-axis range is expanded to (z_min-margin) ~ (z_max+margin), thus obtaining the bounding box. Further, the server can read the preprocessed 3D lesion image and, based on the coordinate range of the bounding box, crop out the local sub-volume of the corresponding voxel range from the 3D image. This sub-volume is the region of interest image.

[0121] Continuing with the example of pseudomyxoma peritoneum (PMP) lesion segmentation, firstly, based on a clean mask image, the minimum coordinates of the "1" value regions are determined as follows: x_min = 120, x_max = 280; y_min = 90, y_max = 270; z_min = 60, z_max = 140. Based on this, the coordinate boundaries of the minimum bounding box are determined as x: 120~280, y: 90~270, z: 60~140. Secondly, a margin of 15 voxels is preset, and this margin is superimposed in all directions of the minimum bounding box. The coordinate range of the bounding box is obtained by gin: x: 105~295 (120-15=105, 280+15=295), y: 75~285 (90-15=75, 270+15=285), z: 45~155 (60-15=45, 140+15=155). Finally, from the preprocessed abdominal CTHU body data of PMP patients, voxels are cropped according to the coordinate range of the bounding box to obtain a local sub-volume containing only PMP lesions and a small amount of surrounding effective background. This sub-volume is the region of interest image corresponding to the PMP lesion.

[0122] In the above embodiments, since the edge buffer region can be superimposed, the loss of edge voxels caused by the minimum bounding box being close to the lesion can be avoided, ensuring that the region of interest image contains complete lesion information, reducing cropping errors. Moreover, since the image is a local sub-volume, the processing range of the image segmentation model is greatly reduced, alleviating its computing power and memory pressure, reducing training and inference costs. Furthermore, since irrelevant backgrounds are removed, the model can focus on lesion features, improving segmentation accuracy.

[0123] In one embodiment, reference Figure 4 Determine the interfering organ category corresponding to the 3D lesion image, and generate an organ mask map corresponding to the interfering organ category, including:

[0124] Step 402: Obtain the set of interfering organ categories corresponding to the target lesion, and identify at least one organ category corresponding to the three-dimensional lesion image.

[0125] Step 404: Determine the interfering organ category that matches at least one organ category from the set of interfering organ categories, and determine the successfully matched interfering organ category as the interfering organ category corresponding to the three-dimensional lesion image.

[0126] Step 406: Generate organ mask images corresponding to each interfering organ category and merge them.

[0127] The interfering organ category set refers to a predefined set of organ types that may interfere with the segmentation of the target lesion, based on its anatomical distribution characteristics. Organs unrelated to the lesion must be excluded to reduce segmentation noise. For example, a pseudomyxoma peritonei (PMP) lesion is located in the abdominal cavity, and its interfering organ category set can be set as {heart, major blood vessels, liver, spleen}. These organs are not directly related to the peritoneal lesion and need to be removed before segmentation.

[0128] At least one organ category corresponding to a three-dimensional lesion image refers to all anatomical organ types identified from the three-dimensional lesion image. For example, the organ categories obtained by identifying abdominal CT images of PMP patients using the TotalSegmentator tool may include {heart, major blood vessels, liver, spleen, stomach, small intestine}.

[0129] Matching the interfering organ category refers to selecting organ types from the identified organ categories that overlap with the "interfering organ category set," which are the target interfering organs to be removed. For example, from the above identification results, {heart, major blood vessels, liver, spleen} are matched and identified as the interfering organ categories corresponding to PMP lesions.

[0130] For example, the server can determine the set of interfering organ categories based on the anatomical location of the target lesion and clinical segmentation requirements. Then, it can call a pre-trained multi-organ segmentation model to automatically segment the pre-processed 3D lesion image and output all organ categories contained in the image. Furthermore, the server can use set intersection operations to filter out the categories that overlap with the "interfering organ category set" from the identified organ categories and determine them as the interfering organ categories corresponding to the current 3D lesion image. Then, for each determined interfering organ category, the server can extract its unique binary mask from the segmentation label output by the model and merge all masks into a single overall organ mask image through an "OR operation (∨)" to complete the unified generation of the interfering organ mask.

[0131] Taking PMP lesion segmentation as an example, firstly, based on the anatomical features of the abdominal cavity, the set of interfering organ categories is set as {heart, great vessels, liver, spleen}. Secondly, the TotalSegmentator tool is used to segment the preprocessed abdominal CTHU body data of PMP patients, identifying the organ categories contained in the image as {heart, great vessels, liver, spleen, stomach, small intestine, pancreas}. Next, {heart, great vessels, liver, spleen} is matched through intersection operation to determine the interfering organ categories corresponding to the three-dimensional lesion image. Finally, from the label image output by TotalSegmentator, the binary masks of the heart, great vessels, liver, and spleen are extracted respectively, and the four masks are merged into a whole organ mask image through "OR operation"—in this mask image, the voxels of the above four interfering organs are all marked as "1", and the remaining areas are marked as "0", which is used for subsequent batch removal of interfering organs from the candidate mask image.

[0132] In the above embodiments, by using a predefined set and matching filtering, organs related to lesions can be avoided from being mistakenly removed, while interfering organs that need to be removed can be accurately located, reducing the interference of image features of irrelevant organs on lesion segmentation. This provides a reliable data foundation for the image segmentation model to focus on lesion features.

[0133] In one embodiment, the target lesion is a pseudomyxoma peritoneum. The process involves identifying redundant structures corresponding to the three-dimensional lesion image and generating a redundant structure mask map corresponding to the redundant structure regions. This includes: identifying redundant structure regions corresponding to the three-dimensional lesion image to obtain an initial structure mask map; performing a morphological dilation operation on the initial structure mask map to expand the connectivity between the spine and back muscles to obtain a seed region; and executing a three-dimensional connectivity propagation algorithm within the effective propagation region to identify all redundant regions connected to the spine and back muscles, thereby obtaining a redundant structure mask map corresponding to the redundant structure regions.

[0134] The initial structure mask refers to a binary mask extracted from a 3D lesion image by a pre-trained model, which only marks the initial range of redundant structures. For example, in the initial structure mask, "1" represents the initial region of redundant structures and "0" represents the region of non-redundant structures.

[0135] Morphological dilation refers to an image processing operation that uses preset 3D structuring elements to expand the neighborhood of "1" value regions in the initial structural mask image. The purpose is to expand the connectivity of redundant structures and ensure that subsequent connectivity propagation can cover all associated redundant regions. Continuing with PMP segmentation as an example, the initial mask of the spine and back muscles can be morphologically dilated 1-2 times using a (3,3,3) cube kernel to fill the small holes in the initial mask and connect adjacent fragments.

[0136] The effective propagation region refers to the space that limits the operational scope of the 3D connected propagation algorithm. Specifically, it can be the intersection of the candidate mask image after spatial clipping and the non-organ region after organ removal, preventing the propagation algorithm from exceeding the potential range of the lesion. For example, the effective propagation region of a PMP lesion is the remaining space in the candidate mask image after removing interfering organs such as the heart and major blood vessels.

[0137] The 3D connectivity propagation algorithm refers to an algorithm that, starting from a seed region in 3D space, identifies all voxels connected to the seed region according to a preset adjacency rule and marks them as belonging to the same region. For example, starting from the expanded spinal dorsal muscle seed region, all voxels connected to it within the effective propagation area are identified and marked as redundant regions of the spinal dorsal muscle.

[0138] For example, the server can call a pre-trained anatomical structure segmentation model to segment the pre-processed 3D lesion image, extract initial labels corresponding to redundant structures unrelated to the target lesion, generate an initial structure mask map that only marks the initial range of the redundant structure, then select 3D structural elements, perform morphological dilation operation on the initial structure mask map, fill the small holes in the mask, connect adjacent redundant structure fragments, expand the connectivity range of the redundant structure, and obtain a seed region for subsequent propagation. The server can further determine the effective propagation region as the intersection of the candidate mask map after spatial cropping and the non-organ region after organ removal. In this region, a 26-adjacency flooding filling algorithm is used to identify all voxels connected to the redundant structure starting from the seed region, mark these voxels as "1" and the rest as "0", and generate a redundant structure mask map corresponding to the redundant structure region.

[0139] In the above embodiments, through initial mask extraction, morphological dilation, and three-dimensional connectivity propagation, redundant regions of spinal back muscles can be completely identified, avoiding segmentation noise. Since the computational range can be limited by the effective propagation region, it can also alleviate computational pressure.

[0140] In one embodiment, reference Figure 5 This application also provides a method for training an image segmentation model, comprising the following steps:

[0141] Step 502: Obtain a three-dimensional lesion image sample corresponding to the target lesion, preprocess the three-dimensional lesion image sample, and obtain a preprocessed three-dimensional lesion image.

[0142] Among them, the three-dimensional lesion image sample refers to the image that has been segmented and labeled. For example, the segmentation labeling can be done manually or by other pre-trained image segmentation models.

[0143] Step 504: Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image.

[0144] Step 506: Determine the category of interfering organs corresponding to the three-dimensional lesion image and generate an organ mask map corresponding to the category of interfering organs.

[0145] Step 508: Identify the redundant structural regions corresponding to the three-dimensional lesion image and generate a redundant structural mask map corresponding to the redundant structural regions.

[0146] Step 510: Remove the regions corresponding to the organ mask images and redundant structure mask images from the candidate mask images to obtain the remaining region mask images.

[0147] Step 512: Generate training samples based on the remaining region mask image, and train the image segmentation model based on the training samples.

[0148] For example, the server can perform region cleaning on the remaining region mask image to obtain a clean mask image, use the clean mask image as input for training samples, and use the corresponding labeled segmentation results as labels to generate training samples.

[0149] For example, the server can further use a clean mask image to crop the region of interest in the preprocessed 3D lesion image to obtain a region of interest image. The region of interest image is used as the input of the training samples, and the corresponding labeled segmentation results are used as labels to generate training samples.

[0150] For example, the server can perform multiple rounds of iterative training on the image segmentation model based on training samples until the training stopping condition is met, thus obtaining a trained image segmentation model that can be applied to the image segmentation method described above. The training stopping condition can be any one of the following: reaching a preset number of training iterations, reaching a preset training duration, or performing multiple training iterations.

[0151] It is understood that the explanation of this embodiment can be referred to the embodiments of the image segmentation method above. Steps in the image segmentation method above that are similar to the image segmentation model training method provided in this embodiment can be similarly applied to the image segmentation model training method of this application. This application will not repeat them here.

[0152] The above-described image segmentation model training method involves acquiring three-dimensional lesion image samples corresponding to the target lesion, preprocessing the three-dimensional lesion image samples to obtain preprocessed three-dimensional lesion images, spatially cropping the preprocessed three-dimensional lesion images to obtain candidate mask images, determining the interfering organ categories corresponding to the three-dimensional lesion images, generating organ mask images corresponding to the interfering organ categories, identifying redundant structural regions corresponding to the three-dimensional lesion images, generating redundant structural mask images corresponding to the redundant structural regions, removing the regions corresponding to the organ mask images and the redundant structural mask images from the candidate mask images to obtain the remaining region mask images, generating training samples based on the remaining region mask images, and training the image segmentation model based on the training samples. Since multiple masking processes can be performed on the three-dimensional lesion images to obtain mask images, and the regions corresponding to these mask images can be removed from the candidate mask images to obtain more accurate candidate regions, the computational overhead of the model for background regions can be reduced, greatly reducing the model training time and computational power consumed.

[0153] In one specific embodiment, this application also provides an image segmentation model processing method, which specifically includes the following steps:

[0154] 1. Medical image data preprocessing: Convert the input DICOM format medical images into Hounsfield Unit (HU) volume data, and spatially align the HU volume data with the organ segmentation labels output by the TotalSegmentator tool to ensure that both are in the same grid coordinate system.

[0155] 2. Spatial cropping: Based on the CT scan, voxel regions above the upper border of the lungs and below the lower border of the femoral head are removed to obtain a limited candidate region mask, mask_z.

[0156] 3. Organ subtraction: Using an existing pre-trained model, such as TotalSegmentator, the organ segmentation masks that need to be removed are merged to obtain the organ mask mask_org, and then subtracted from mask_z.

[0157] 4. Connectivity propagation removal of the spine and back muscles: Extract the mask of the spine and back muscles. First, use image processing algorithm to find a center point on the spine. Set the allowed propagation space to mask_z∧(~mask_org). Use the nine-square grid neighborhood filling algorithm to perform connectivity propagation from the seed region to obtain the region connected to the spine, and remove it from the candidate region.

[0158] 5. Cleaning up remaining regions: The remaining candidate regions Residual = mask_z∧(~mask_org)∧(~connected_to_spine) are obtained through set operations, and small connected component removal and morphological smoothing are performed on the region to obtain the clean candidate region Residual_clean.

[0159] 6. Candidate Region Clipping and Segmentation: Calculate the minimum bounding box based on Residual_clean and add margins in each direction to prevent over-clipping. Use this bounding box to clip the target sub-volume I_ROI from the HU volume data.

[0160] 7. 3D-Unet Training: Input the I_ROI into the 3D-UNet segmentation network, and use sliding window inference and probability fusion to obtain the corresponding segmentation results.

[0161] 8. Results Export: Map the segmentation results within the ROI area back to the original volume and export them in the NIfTI format commonly used in medical imaging, while calculating the corresponding evaluation metrics.

[0162] In this embodiment, the upper and lower bound clipping method based on anatomical boundaries is combined with organ subtraction to significantly narrow down the candidate region; the connected propagation elimination method based on the spine and back muscle mask effectively removes redundant regions related to the skeleton; through multiple mask Boolean operations and subsequent connected component and morphological cleaning, a more accurate candidate region Residual_clean is obtained, thereby improving the efficiency and accuracy of the 3D-UNet segmentation model.

[0163] In another embodiment, this application also provides another image segmentation method, including the following steps;

[0164] 1. Data preparation:

[0165] The input data consists of 3D CT scan images in DICOM format. These images are then converted into HU volumetric data using a standard DICOM reader interface.

[0166] Simultaneously, the TotalSegmentator tool is invoked to segment the original image into multiple organs of the whole body, obtaining labeled maps of various anatomical structures.

[0167] To ensure data consistency, the HU body data and label map are rigidly registered and interpolated and resampled in the same grid space.

[0168] 2. Cutting the top and bottom boundaries:

[0169] Based on anatomical priors, the cutting range is set: voxels above the upper border of the lung and below the lower border of the femoral head are removed.

[0170] Output mask_z, which limits the vertical range of the candidate region.

[0171] 3. Organ deduction:

[0172] Based on the output category table of TotalSegmentator, select the organs to be removed (such as heart, major blood vessels, liver, etc.) and merge their corresponding masks into a whole organ mask mask_org.

[0173] The organ mask is removed from mask_z to avoid these organ regions interfering with subsequent segmentation.

[0174] 4. Elimination of the connection and transmission of the spine and back muscles:

[0175] Tags of the spine and back muscles were extracted, morphologically expanded, and used as seed regions.

[0176] Set the allowed propagation space to mask_z∧(~mask_org).

[0177] In three-dimensional space, a 26-adjacency floodfill algorithm is used to propagate connectivity from the seed region to obtain the connected domain connected_to_spine that is connected to the spine or back muscles.

[0178] Remove the connected component from the candidate region to reduce redundant background.

[0179] 5. Residual region cleanup:

[0180] Candidate regions are obtained through Boolean operations:

[0181] Residual=mask_z∧(~mask_org)∧(~connected_to_spine)

[0182] Small connected components are removed from Residual (regions with fewer than 500 voxels are removed), and morphological opening and closing operations are used for smoothing to obtain Residual_clean.

[0183] 6. ROI Pruning and Network Inference:

[0184] The three-dimensional minimum bounding box (bbox) is calculated based on Residual_clean, and margins (e.g., 10~20 voxels) are added in each direction to avoid the target structure edges being clipped.

[0185] The sub-volume I_ROI is obtained by cropping the HU volume data using this bounding box.

[0186] 7. 3D-unet based on multi-scale windowing inference:

[0187] Input the I_ROI into the 3D U-Net (3D-UNet) network for training or inference. During inference, the same sub-volume is scaled to different scales to improve prediction accuracy and obtain complete prediction results.

[0188] 8. Result reply and export:

[0189] Map the prediction results within the ROI range back to the original CT volume.

[0190] The results are then thresholded, small block removed, and smoothed to obtain the final segmentation result.

[0191] The output is saved in NIfTI format and can be evaluated by calculating splitting metrics such as Dice coefficient and IoU.

[0192] In a specific embodiment, an image segmentation method is provided. During execution, the process begins with receiving an execution request and parameters, followed by initiating the execution program. Then, DICOM preprocessing and ROI clipping are performed sequentially. Next, the method proceeds to the stage of identifying organs using a pre-trained model: if identification is successful, an organ mask image is generated; if identification fails, the method proceeds to the stage of determining the presence of a spine: if a spine exists, a spine and back muscle mask image is generated using connected component analysis and seed growth methods, followed by cleaning the remaining region and clipping the ROI; if no spine exists, the method directly proceeds to cleaning the remaining region and clipping the ROI. After completing "cleaning the remaining region and clipping the ROI," the process continues: 3D-UNET segmentation is imported, followed by multi-scale sliding window inference; after inference, the results are exported and reconstructed back to the original DICOM, then the predicted lesions are outlined, the result log is printed, and finally, the execution result is returned. The specific implementation methods of each step can be found in the above embodiment and will not be elaborated here.

[0193] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0194] Based on the same inventive concept, embodiments of this application also provide an image segmentation apparatus for implementing the image segmentation method described above, and an image segmentation model training apparatus for implementing the image segmentation model training method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, specific limitations in one or more apparatus embodiments provided below can be found in the limitations of the method described above, and will not be repeated here.

[0195] In one exemplary embodiment, such as Figure 6 As shown, an image segmentation apparatus 600 is provided, comprising:

[0196] The preprocessing module 602 is used to acquire the three-dimensional lesion image corresponding to the target lesion, preprocess the three-dimensional lesion image, and obtain the preprocessed three-dimensional lesion image.

[0197] The spatial cropping module 604 is used to perform spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image.

[0198] The organ mask generation module 606 is used to determine the interfering organ category corresponding to the three-dimensional lesion image and generate the organ mask map corresponding to the interfering organ category.

[0199] The redundant structure mask generation module 608 is used to identify the redundant structure regions corresponding to the three-dimensional lesion image and generate the redundant structure mask corresponding to the redundant structure.

[0200] The region removal module 610 is used to remove the regions corresponding to the organ mask images and redundant structure mask images from the candidate mask images to obtain the remaining region mask images.

[0201] Image segmentation module 612 is used to segment the image based on the remaining region mask map and using an image segmentation model to obtain the image segmentation result.

[0202] In one embodiment, the image segmentation module 612 is further configured to perform region cleaning on the remaining region mask image to obtain a clean mask image; use the clean mask image to crop the region of interest in the preprocessed three-dimensional lesion image to obtain a region of interest image; input the region of interest image into the image segmentation model, use the image segmentation model to perform image segmentation, and determine the final segmentation result corresponding to the three-dimensional lesion image based on the image segmentation result output by the image segmentation model.

[0203] In one embodiment, the image segmentation module 612 is further configured to: calculate the minimum bounding box for the clean mask image, add an edge buffer region of a preset size in each direction of the minimum bounding box to obtain the outer bounding box; and obtain the region of interest image by using the local sub-volume cropped from the preprocessed three-dimensional lesion image using the outer bounding box.

[0204] In one embodiment, the organ mask generation module 606 is further configured to: obtain a set of interfering organ categories corresponding to the target lesion, identify at least one organ category corresponding to the three-dimensional lesion image; determine the interfering organ category that matches the at least one organ category from the set of interfering organ categories, and determine the successfully matched interfering organ category as the interfering organ category corresponding to the three-dimensional lesion image; generate an organ mask image corresponding to each interfering organ category and merge them.

[0205] In one embodiment, the redundant structure mask generation module 608 is further used to identify the redundant structure region corresponding to the three-dimensional lesion image to obtain an initial structure mask; perform a morphological dilation operation on the initial structure mask to expand the connectivity between the spine and back muscles to obtain a seed region; and execute a three-dimensional connectivity propagation algorithm in the effective propagation region to identify all redundant regions connected to the spine and back muscles to obtain a redundant structure mask corresponding to the redundant structure region.

[0206] The aforementioned image segmentation device acquires a three-dimensional lesion image corresponding to the target lesion, preprocesses the three-dimensional lesion image to obtain a preprocessed three-dimensional lesion image, performs spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image, determines the interfering organ category corresponding to the three-dimensional lesion image, generates an organ mask image corresponding to the interfering organ category, identifies redundant structural regions corresponding to the three-dimensional lesion image, generates a redundant structure mask image corresponding to the redundant structure, removes the region corresponding to the organ mask image and the redundant structure mask image from the candidate mask image to obtain a remaining region mask image, and performs image segmentation based on the remaining region mask image and using an image segmentation model to obtain the image segmentation result. Since multiple masking processes can be performed on the three-dimensional lesion image to obtain a mask image, and the regions corresponding to these mask images can be removed from the candidate mask image to obtain a more accurate candidate region, it can not only improve the efficiency and accuracy of the image segmentation model, but also reduce the computational overhead of the model for background regions, thereby reducing the computational power required by the model when performing image segmentation on medical images.

[0207] In one exemplary embodiment, such as Figure 7 As shown, an image segmentation apparatus 700 is provided, comprising:

[0208] The preprocessing module 702 is used to acquire three-dimensional lesion image samples corresponding to the target lesion, preprocess the three-dimensional lesion image samples, and obtain preprocessed three-dimensional lesion images.

[0209] The spatial cropping module 704 is used to perform spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image.

[0210] The organ mask generation module 706 is used to determine the interfering organ category corresponding to the three-dimensional lesion image and generate the organ mask image corresponding to the interfering organ category.

[0211] The redundant structure mask generation module 708 is used to identify the redundant structure regions corresponding to the three-dimensional lesion image and generate the redundant structure mask corresponding to the redundant structure regions.

[0212] The region removal module 710 is used to remove the region corresponding to the organ mask image and the redundant structure mask image from the candidate mask image to obtain the remaining region mask image.

[0213] The model training module 712 is used to generate training samples based on the remaining region mask map and to train the image segmentation model based on the training samples.

[0214] The aforementioned image segmentation model training device acquires three-dimensional lesion image samples corresponding to the target lesion, preprocesses the three-dimensional lesion image samples to obtain preprocessed three-dimensional lesion images, performs spatial cropping on the preprocessed three-dimensional lesion images to obtain candidate mask images, determines the interfering organ categories corresponding to the three-dimensional lesion images, generates organ mask images corresponding to the interfering organ categories, identifies redundant structural regions corresponding to the three-dimensional lesion images, generates redundant structural mask images corresponding to the redundant structural regions, removes the regions corresponding to the organ mask images and redundant structural mask images from the candidate mask images to obtain the remaining region mask images, generates training samples based on the remaining region mask images, and trains the image segmentation model based on the training samples. Since multiple masking processes can be performed on the three-dimensional lesion images to obtain mask images, and the regions corresponding to these mask images can be removed from the candidate mask images to obtain more accurate candidate regions, the computational overhead of the model on the background region can be reduced, greatly reducing the model training time and computational power consumed.

[0215] Each module in the above-mentioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0216] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores three-dimensional lesion images, three-dimensional lesion image samples, and training sample data. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an image segmentation method or an image segmentation model training method.

[0217] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational 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 an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image segmentation method or an image segmentation model training method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0218] Those skilled in the art will understand that Figure 8 , Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0219] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the image segmentation method or image segmentation model training method in any of the above embodiments.

[0220] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the image segmentation method or the image segmentation model training method in any of the above embodiments.

[0221] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the image segmentation method or image segmentation model training method in any of the above embodiments.

[0222] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0223] 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, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0224] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0225] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image segmentation method, characterized in that, The method includes: A three-dimensional lesion image corresponding to the target lesion is obtained, and the three-dimensional lesion image is preprocessed to obtain a preprocessed three-dimensional lesion image. Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image; Determine the category of interfering organs corresponding to the three-dimensional lesion image, and generate an organ mask image corresponding to the category of interfering organs; Identify the redundant structure regions corresponding to the three-dimensional lesion image and generate a redundant structure mask map corresponding to the redundant structure. The remaining region mask is obtained by removing the region corresponding to the organ mask and the redundant structure mask from the candidate mask image; Based on the remaining region mask image, image segmentation is performed using an image segmentation model to obtain the image segmentation result.

2. The method according to claim 1, characterized in that, The step of performing image segmentation based on the remaining region mask map and using an image segmentation model to obtain the image segmentation result includes: The remaining area mask image is cleaned to obtain a clean mask image; The region of interest is cropped from the preprocessed three-dimensional lesion image using the clean mask image to obtain a region of interest image. The region of interest image is input into an image segmentation model, and the image is segmented using the image segmentation model. The final segmentation result corresponding to the three-dimensional lesion image is determined based on the image segmentation result output by the image segmentation model.

3. The method according to claim 2, characterized in that, The step of cropping the region of interest from the preprocessed 3D lesion image using the clean mask image to obtain the target mask image includes: Calculate the minimum bounding box for the clean mask image, and add an edge buffer area of ​​a preset size in each direction of the minimum bounding box to obtain the outer bounding box; The region of interest image is obtained by cropping a local sub-volume from the preprocessed 3D lesion image using the bounding box.

4. The method according to claim 1, characterized in that, The step of determining the interfering organ category corresponding to the three-dimensional lesion image and generating an organ mask map corresponding to the interfering organ category includes: Obtain the set of interfering organ categories corresponding to the target lesion, and identify at least one organ category corresponding to the three-dimensional lesion image; Determine the interfering organ category that matches the at least one organ category from the set of interfering organ categories, and determine the successfully matched interfering organ category as the interfering organ category corresponding to the three-dimensional lesion image; Generate organ mask images corresponding to each of the aforementioned interfering organ categories and merge them.

5. The method according to any one of claims 1 to 4, characterized in that, The target lesion is a pseudomyxoma peritoneum. The step of identifying redundant structural regions corresponding to the three-dimensional lesion image and generating a redundant structural mask map corresponding to the redundant structural regions includes: Identify the redundant structural regions corresponding to the three-dimensional lesion image to obtain an initial structural mask image; A morphological dilation operation is performed on the initial structural mask to expand the connectivity between the spine and back muscles, thereby obtaining the seed region; Within the effective propagation region, a three-dimensional connectivity propagation algorithm is executed to identify all redundant regions connected to the spinal back muscles, thereby obtaining a redundant structure mask map corresponding to the redundant structure regions.

6. A method for training an image segmentation model, characterized in that, The method includes: Obtain a three-dimensional lesion image sample corresponding to the target lesion, and preprocess the three-dimensional lesion image sample to obtain a preprocessed three-dimensional lesion image; Spatial cropping is performed on the preprocessed three-dimensional lesion image to obtain a candidate mask image; Determine the category of interfering organs corresponding to the three-dimensional lesion image, and generate an organ mask image corresponding to the category of interfering organs; Identify the redundant structural regions corresponding to the three-dimensional lesion image and generate a redundant structural mask map corresponding to the redundant structural regions; The remaining region mask is obtained by removing the region corresponding to the organ mask and the redundant structure mask from the candidate mask image; Training samples are generated based on the remaining region mask image, and an image segmentation model is trained based on the training samples.

7. An image segmentation apparatus, characterized in that, The device includes: The preprocessing module is used to acquire a three-dimensional lesion image corresponding to the target lesion, and to preprocess the three-dimensional lesion image to obtain a preprocessed three-dimensional lesion image. The spatial cropping module is used to perform spatial cropping on the preprocessed three-dimensional lesion image to obtain a candidate mask image. An organ mask generation module is used to determine the category of interfering organs corresponding to the three-dimensional lesion image and generate an organ mask corresponding to the category of interfering organs. A redundant structure mask generation module is used to identify the redundant structure regions corresponding to the three-dimensional lesion image and generate a redundant structure mask corresponding to the redundant structure. The region removal module is used to remove the region corresponding to the organ mask and the redundant structure mask from the candidate mask image to obtain the remaining region mask image; The image segmentation module is used to perform image segmentation based on the remaining region mask map and using an image segmentation model to obtain the image segmentation result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.