Target segmentation method for computed tomography image and electronic equipment
The problem of topology errors in tomography image segmentation is solved by processing image samples through persistent homologous algorithm and describing topology structures with persistence graphs, which improves segmentation accuracy and structural accuracy.
Patent Information
- Application Number
- CN202411137642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The segmentation method of tomography scan images in the prior art has topological errors, resulting in low target segmentation accuracy and lack of effective attention to segmenting target topological structure.
Using persistent homologous algorithm to process image samples, generate persistence graphs to determine the loss function, and combine persistence graphs to describe the topology structure of the target segmentation annotation, train the initial model to focus on the accuracy of the topology, thereby avoiding topology errors during the prediction process. .
The accuracy of the tomography image target segmentation is improved, the overall structural accuracy of the segmentation results is ensured, and topological errors are avoided.
Smart Images

Figure CN119273909A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and electronic device for object segmentation of a computed tomography image. Background Art
[0002] Tomography images are an important part of medical imaging and can be used to assist medical diagnosis.
[0003] However, in the prior art, there are topological errors in the segmentation method of tomographic scan images, resulting in low target segmentation accuracy. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a method and electronic device for object segmentation of a computed tomography image to solve the above technical problems.
[0005] Based on the above purpose, the first aspect of the present application provides a method for object segmentation of a computed tomography image, comprising:
[0006] Obtain training image samples with real segmentation annotations and build an initial model;
[0007] Inputting training image samples with real segmentation annotations into the initial model, and outputting image samples with training prediction segmentation annotations through the initial model;
[0008] Based on the training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations, the persistent homology algorithm is used to process them to obtain a persistence map;
[0009] Determining a loss function based on the persistence map, the true segmentation annotation, and the training predicted segmentation annotation;
[0010] The initial model is trained and adjusted according to the minimization result obtained in the process of minimizing the loss function to obtain the trained and adjusted initial model, and the index corresponding to the target in the training image sample is determined based on the training image sample with the real segmentation annotation and the image sample with the training prediction segmentation annotation;
[0011] In response to the indicator being less than a preset indicator threshold, continuously adjusting the trained and adjusted initial model; or,
[0012] In response to the indicator being greater than or equal to a preset indicator threshold, using the trained and adjusted initial model as a segmentation model;
[0013] Acquiring a tomographic image to be predicted;
[0014] The tomographic image to be predicted is input into the segmentation model, and the segmentation model is used to perform segmentation prediction on at least one target in the tomographic image to be predicted, so as to obtain a scanned image with predicted segmentation annotations.
[0015] Based on the same inventive concept, the second aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable by the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0016] From the above description, it can be seen that the target segmentation method and electronic device for the computed tomography image provided by the present application, in the process of training the initial model, determines the loss function based on the persistence graph obtained by processing the persistent homology algorithm to train the initial model, and combines the index that also uses the persistence graph to describe the topological structure of the target segmentation annotation to obtain a segmentation model that can focus on the accuracy of the topological structure, so that in the prediction process, the obtained tomography image to be predicted is input into such a segmentation model, and then the segmentation model is used to perform segmentation prediction on at least one target in the tomography image to be predicted, which can ensure the correctness of the overall structure of the scanned image with the predicted segmentation annotation, thereby avoiding the occurrence of topological errors and improving the accuracy of target segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 Schematic diagram of the flow of the object segmentation method of the computer tomography image according to the embodiment of the present application;
[0019] Figure 2A A schematic diagram of the process of preparing a data set according to an embodiment of the present application;
[0020] Figure 2B A schematic diagram of the training process of the model of the embodiment of the present application;
[0021] Figure 2C A schematic diagram of a process for determining a loss function according to an embodiment of the present application;
[0022] Figure 2D A schematic diagram of a process for determining an indicator of an embodiment of the present application;
[0023] Figure 3is a structural block diagram of a device for segmenting a target of a computer tomography image according to an embodiment of the present application;
[0024] Figure 4 A schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0026] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] It is understandable that before using the technical solutions of each embodiment of the present application, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0028] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present application according to the prompt message.
[0029] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0030] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of this application. Other methods that meet relevant laws and regulations may also be applied to the implementation method of this application.
[0031] Computed Tomography (CT) is an important part of medical imaging and can be used to assist medical diagnosis. Object segmentation of CT images is a key task that involves accurately segmenting different objects from the image. Deep learning models, especially Convolutional Neural Networks (CNN), have made significant progress in this field. Compared with traditional object segmentation methods, deep learning models can automatically extract multi-level features of images, and compared with traditional image processing methods, they can still maintain high accuracy in complex backgrounds.
[0032] The design of deep learning models includes model design, loss function design, and evaluation index design. First of all, for model design, neural networks (U-Net) and their variants have outstanding performance in multi-target segmentation of CT images. U-Net is a classic deep learning architecture that is widely used in medical image segmentation. It achieves accurate segmentation through a symmetrical encoder-decoder structure and retains high-resolution contextual information through skip connections.
[0033] On the other hand. The loss function is the learning goal of the deep learning model. It is a tool to measure the gap between the model's predicted results and the actual results. It is the core mechanism to guide model learning and optimization. Choosing a suitable loss function has an important impact on the training effect and final performance of the model. The evaluation index provides a quantitative way to evaluate the performance of the model, which can ensure that the model meets specific business needs, such as the clinical accuracy requirements for target segmentation. The purpose of model training is to minimize the loss function and maximize the value of the evaluation index. Therefore, loss functions and evaluation indicators often appear in pairs. For example, based on the Dice similarity coefficient, the loss function is called Dice loss, and the evaluation index is called the Dice similarity coefficient.
[0034] Although various variants of deep learning models for multi-target segmentation of CT images have been proposed to improve segmentation accuracy, the topological structure of the segmentation target is not considered in the definition of loss function and evaluation index, resulting in topological errors in the segmentation results of the model. Specifically, the segmentation index of the model reaches a relatively ideal value, but the segmentation result has an incorrect spatial structure.
[0035] The current loss functions and evaluation indicators can be divided into the following three categories: pixel-based, region-based, and edge-based. The pixel-based loss function directly predicts the difference between the image and the true label image at the pixel level, such as Cross-Entropy Loss and Mean Squared Error (MSE). The region-based loss function emphasizes the overall segmentation effect, focusing on the intersection of the segmentation results predicted by the model and the true value annotation, such as Intersection Over Union (IOU) and Dice Coefficient. The edge-based loss function calculates the distance between edge point sets, focusing on the edge effect predicted by the model, such as Hausdorff Distance and Average Surface Distance (ASD).
[0036] The above loss functions and evaluation indicators can guide the model to converge effectively and achieve clinically acceptable segmentation results. However, their processing of images often stays at the pixel level and lacks an overall description of the segmentation target. In other words, they lack a topological description of the segmentation target, which leads to topological errors in the segmentation results.
[0037] Topology studies the properties of geometric figures or spaces that remain unchanged under continuous transformations. Topology is not concerned with the specific shape and size of geometric figures, but their structural characteristics under continuous transformations. Using topological information can ensure that the segmentation results maintain the integrity of these anatomical structures and avoid unreasonable shapes and connection errors. For example, when the target is an organ, such as the small intestine, for an organ with a tubular structure such as the small intestine, by introducing topological information, the algorithm can more accurately identify and segment continuous and connected structures, thereby improving the accuracy of the segmentation results.
[0038] For existing loss functions and evaluation index models, ignoring topological information may result in segmentation results that lack coherence, leading to incomplete target structures. For example, when the target is an organ and the organ is a blood vessel, the blood vessel may be segmented into discontinuous parts, or the outline of the organ may be incoherent, which is unreasonable in practical applications.
[0039] This application aims to solve the defect of insufficient attention to target topological information in related technologies. Considering the clinical demand for target segmentation, although the related technologies can focus on the pixel-level difference between model prediction and true annotation, it is difficult to identify and correct the significant topological error areas in the model prediction, and lacks attention to the correctness of the overall structure.
[0040] The advantage of this application is that it combines it with loss functions and evaluation indicators, emphasizing the accuracy of the model's attention to topological structure during training. Persistent homology is a tool derived from topological data analysis, which is used to study the shape characteristics of data. It provides a way to analyze the shape of data at multiple scales by identifying and tracking the topological structure of data at different scales (such as connected components, holes, cavities, etc.).
[0041] An embodiment of the present application provides a method for target segmentation of a computed tomography image. In the process of training an initial model, a loss function is determined based on a persistence graph obtained by processing a persistent homology algorithm to train the initial model, and a segmentation model that can focus on the accuracy of the topological structure is obtained by combining an indicator that also uses a persistence graph to describe the topological structure of the target segmentation annotation. In the prediction process, the obtained tomography image to be predicted is input into such a segmentation model, and then the segmentation model is used to perform segmentation prediction on at least one target in the tomography image to be predicted, which can ensure the correctness of the overall structure of the scanned image with the predicted segmentation annotation, thereby avoiding the occurrence of topological errors and improving the accuracy of target segmentation.
[0042] like Figure 1 As shown, the method of this embodiment includes:
[0043] Step 101, obtain training image samples with real segmentation annotations and build an initial model.
[0044] In this step, a tomography image (Computed Tomography, CT) can be acquired by photographing with a computer tomography camera or scanning with an X-ray electronic computer tomography scanner, and then saved in DICOM (a medical image format that can be used for data exchange and can meet clinical needs) format. The tomography image is annotated by medical image processing software to obtain a tomography image with real segmentation annotations.
[0045] After that, the tomographic images are preprocessed and the annotated DICOM files are converted into CT images and annotations in NII (medical image format) format.
[0046] The CT image dataset is divided. All CT images are divided into training set and test set in a ratio of 4:1. Then data enhancement is performed on the constructed CT image dataset. The data enhancement methods used include image flipping, rotation, translation, cropping, brightness adjustment, and adding Gaussian noise to obtain training image samples with true segmentation annotations.
[0047] In addition, the initial model of this application is a neural network (U-Net) model, which performs outstandingly in multi-target segmentation of CT images, achieves accurate segmentation through a symmetrical encoder-decoder structure, and retains high-resolution contextual information through jump connections.
[0048] Step 102: input the training image samples with real segmentation annotations into the initial model, and output the image samples with training predicted segmentation annotations through the initial model.
[0049] In this step, since the CT image dataset was divided into a training set and a test set according to a ratio of 4:1, all CT images were then enhanced, and the data enhancement methods used included image flipping, rotation, translation, cropping, brightness adjustment, and adding Gaussian noise.
[0050] The data-enhanced training set (i.e., training image samples with true segmentation annotations) is input into the U-Net model to obtain image samples with training predicted segmentation annotations.
[0051] Step 103 , based on the training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations, a persistence graph is obtained by processing them using a persistent homology algorithm.
[0052] In this step, the persistence graph is obtained using the true segmentation annotations and the training prediction segmentation annotations predicted by the model, thereby introducing topological information so that the model obtained based on the loss function obtained from the persistence graph can more accurately identify and segment continuous and connected structures, thereby improving the accuracy of the segmentation results.
[0053] Persistent homology is a tool derived from topological data analysis, which is used to study the shape characteristics of data. It provides a way to analyze the shape of data at multiple scales by identifying and tracking the topological structure of data at different scales (such as connected components, holes, cavities, etc.).
[0054] Step 104: determining a loss function according to the persistence map, the true segmentation annotation, and the training predicted segmentation annotation.
[0055] In this step, the loss function determined using the persistence graph, the true segmentation annotations, and the training prediction segmentation annotations can identify and correct significant topological error areas in the model predictions, thereby increasing attention to the correctness of the overall structure.
[0056] Step 105, training and adjusting the initial model according to the minimization result obtained in the process of minimizing the loss function, obtaining the trained and adjusted initial model, and determining the indicators corresponding to the targets in the training image samples based on the training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations.
[0057] In this step, the initial model is trained and adjusted according to the minimization result obtained in the process of minimizing the loss function. The gradient descent method is used in the training and adjustment process to update the network parameters of the initial model to obtain the trained and adjusted initial model.
[0058] In addition, it is also possible to determine whether a preset number of training iterations or a set number of times or a loss function reaches a threshold. If so, a trained and adjusted initial model is obtained, otherwise, training iterations are continued.
[0059] Then, we use the test set to introduce an indicator that also uses a persistence graph to describe the topological structure of the target segmentation annotation. It calculates the persistence graph of the target annotation at different scales. This is because the introduction of multi-scale calculations during model training will reduce the efficiency of model training, and the multi-scale perspective in indicator calculation helps measure the topological correctness of the model prediction annotations in each area.
[0060] Among them, the target of this application is organs, including but not limited to blood vessels, small intestine, skeleton, joints, heart, liver, nose, larynx, trachea, bronchi, and lungs.
[0061] Step 106: Determine whether the indicator is greater than or equal to a preset indicator threshold.
[0062] In this step, based on the comparison between the indicator and the preset indicator threshold, it can be quickly determined whether the initial model after training and adjustment meets the expected requirements.
[0063] Step 107: In response to the indicator being less than a preset indicator threshold, continuously adjusting the trained and adjusted initial model. Or,
[0064] In this step, when the indicator is less than the preset indicator threshold, it means that the topological correctness of the predicted annotations in each area by the trained and adjusted initial model still does not meet the expected requirements. In this case, the trained and adjusted initial model is continuously adjusted until the expected requirements are met, thereby improving the accuracy of target segmentation.
[0065] Step 108, in response to the indicator being greater than or equal to a preset indicator threshold, using the trained and adjusted initial model as a segmentation model.
[0066] In this step, when the index is greater than or equal to the preset index threshold, it means that the topological correctness of the prediction annotation in each area by the trained and adjusted initial model has reached the expected requirements. Using the trained and adjusted initial model as a segmentation model can improve the accuracy of target segmentation.
[0067] Step 109: Acquire the tomographic image to be predicted.
[0068] In this step, a computed tomography (CT) image may be obtained by photographing with a computerized tomography camera or scanning with an X-ray electronic computer tomography scanner as the tomography image to be predicted.
[0069] Step 1010: input the tomographic image to be predicted into the segmentation model, and perform segmentation prediction on at least one target in the tomographic image to be predicted by the segmentation model to obtain a scanned image with predicted segmentation annotations.
[0070] In this step, since the segmentation model can focus on the accuracy of the topological structure, the tomographic image to be predicted is input into such a segmentation model, and then the segmentation model is used to perform segmentation prediction on at least one target in the tomographic image to be predicted. This can ensure the correctness of the overall structure of the scanned image with predicted segmentation annotations, thereby avoiding topological errors and improving the accuracy of target segmentation.
[0071] Through the above scheme, in the process of training the initial model, the loss function is determined based on the persistence graph obtained by processing the persistent homology algorithm to train the initial model, and the segmentation model that can focus on the accuracy of the topological structure is obtained by combining the indicators that also use the persistence graph to describe the topological structure of the target segmentation annotation. In the prediction process, the obtained tomographic image to be predicted is input into such a segmentation model, and then the segmentation model is used to perform segmentation prediction on at least one target in the tomographic image to be predicted, which can ensure the correctness of the overall structure of the scanned image with predicted segmentation annotations, thereby avoiding the occurrence of topological errors and improving the accuracy of target segmentation.
[0072] In some embodiments, the true segmentation annotation corresponds to multiple targets, and the training predicted segmentation annotation corresponds to multiple targets.
[0073] Step 103 includes:
[0074] Step A1, based on the real segmentation annotations corresponding to the multiple targets, the training image samples are one-hot encoded respectively to obtain multiple first encoded binary images, and based on the training predicted segmentation annotations corresponding to the multiple targets, the image samples are one-hot encoded respectively to obtain multiple second encoded binary images.
[0075] Step A2, for any of the multiple targets, perform the following operations:
[0076] Step A21, determining a first target binary image corresponding to the target from the plurality of first encoded binary images, and determining a second target binary image corresponding to the target from the plurality of second encoded binary images.
[0077] Step A22, determining the intersection between the first target binary image and the second target binary image, and determining the union between the first target binary image and the second target binary image.
[0078] Step A23, processing the intersection by a convex hull algorithm to obtain a first edge point set, and processing the union by a convex hull algorithm to obtain a second edge point set.
[0079] Step A24: determining a first persistence graph based on the first edge point set, and determining a second persistence graph based on the second edge point set, and using the first persistence graph and the second persistence graph as the persistence graph.
[0080] In the above scheme, during the deep learning model training process, the training prediction segmentation annotation and the true segmentation annotation of the current iteration are both represented in the form of tensors. The size is (B, H, W, Z). Among them, B is the batch size of the model training. For the medical image segmentation model, the batch size represents the number of images input to the model for each iteration. H, W, and Z are the length, width, and number of slices of the CT image, respectively. Generally speaking, H and W are 512, which means that each slice is an image of 512x512 size. For these two tensors, the value range of any element is [1, C]. C is the total number of targets for segmentation.
[0081] One-hot encoding is a commonly used method to convert categorical data into numerical data. It separates the annotations of different segmentation targets from each other. First, it identifies all unique categories in the categorical variable, creates a binary vector of length N for each category, where N is the total number of categories, and sets the index position of the corresponding category to 1 and the other positions to 0. For a tensor of size (B, H, W, Z), the total number of segmentation targets is C, and its one-hot encoded tensor size is (B, C, H, W, Z).
[0082] Then, we obtain the training prediction segmentation annotation and the real segmentation annotation corresponding to one of the targets c, that is, we obtain two binary images. In this step, we take c(c∈[1, C]) from the training prediction segmentation annotation and the real segmentation annotation of the size (B, C, H, W, Z) calculated in the previous step, and obtain two binary images, which are referred to as the first target binary image gt c and the second target binary map pred c The size is (B, H, W, Z), and the pixel value of 1 represents the labeled area of the target, and the pixel value of 0 represents the non-labeled area of the target.
[0083] Recalculate gt c and pred c The intersection of c and the union U c , all intersections can be calculated by corresponding element multiplication. If two binary images are both 1 at a certain coordinate, the intersection is 1 at that coordinate, and if either is 0, the intersection is 0 at that coordinate. The union can be calculated by corresponding element addition. If two binary images are both 0 at a certain coordinate, the union is 0 at that coordinate, otherwise the union is 1 at that coordinate. The intersection and union obtained are also two binary images of size (B, H, W, Z).
[0084] Intersection I c and the union U c Use the convex hull algorithm to extract two point sets, referred to as the first edge point set S i and the second edge point set S u .
[0085] Convex hull algorithm is a class of algorithms used to calculate the smallest convex polygon of a set of points. The convex hull refers to the smallest convex polygon that contains the point set, that is, all points inside the polygon are located on its boundary or inside, and not outside the polygon. The purpose of using the convex hull algorithm is to provide a boundary that tightly surrounds the target for subsequent topological data analysis.
[0086] This step can also be replaced by gradient calculation. For a point set, use the central difference formula to calculate the gradient of the internal points, and use the forward difference and backward difference formulas to calculate the gradient of the boundary points. Keep the points whose gradient is not 0 in any dimension as the edge point set for subsequent calculations.
[0087] Then, using the persistent homology theory, we analyze the first edge point set S i and the second edge point set S u The persistence graph is calculated to obtain a first persistence graph D1 and a second persistence graph D2.
[0088] In some embodiments, in step A24, determining a first persistence graph based on the first edge point set includes:
[0089] Step B1, for any of the multiple targets, perform the following operations:
[0090] Step B11: constructing a first simplicial complex according to the first edge point set using a preset scale parameter.
[0091] Step B12, determining a first homology group based on the first simplicial complex.
[0092] Step B13, performing topological feature tracking processing on the first homology group to obtain the first persistence graph.
[0093] In the above scheme, for the first edge point set, the first persistence diagram is calculated by the following steps:
[0094] 1) Construct the first simplicial complex: Starting from the data points, by selecting different scale parameters, a series of nested simplicial complexes are gradually constructed. The data points are connected through simple geometric objects (such as points, line segments, triangles, etc.) to form a simplicial complex. These geometric objects are called simplices, and a simplicial complex is a collection of simplices.
[0095] 2) Calculate the first homology group: At each scale, calculate the corresponding homology group and identify the topological characteristics of the data at that scale. The 0-dimensional homology group H0 describes the number of connected components in the space. The 1-dimensional homology group H1 describes the 1-dimensional holes in the space, i.e. rings or cycles. The 2-dimensional homology group H2 describes the 2-dimensional holes in the space, i.e. cavities.
[0096] 3) Compute the first persistence diagram: Generate a persistence bar diagram or persistence diagram by tracking the birth and death of topological features at different scales. A persistence bar diagram uses the length of the bar to represent the persistence of the topological feature, while a persistence diagram uses the coordinates of the points (birth scale and death scale) to represent the persistence of the feature.
[0097] In some embodiments, in step A24, determining a second persistence graph based on the second edge point set includes:
[0098] Step C1, for any of the multiple targets, perform the following operations:
[0099] Step C11: constructing a second simplicial complex according to the second edge point set using a preset scale parameter.
[0100] Step C12, determining a second homology group based on the second simplicial complex.
[0101] Step C13, performing topological feature tracking processing on the second homology group to obtain the second persistence graph.
[0102] In the above scheme, for the second edge point set, the second persistence diagram is calculated by the following steps:
[0103] 1) Construct the second simplicial complex: Starting from the data points, by selecting different scale parameters, a series of nested simplicial complexes are gradually constructed. The data points are connected through simple geometric objects (such as points, line segments, triangles, etc.) to form a simplicial complex. These geometric objects are called simplices, and a simplicial complex is a collection of simplices.
[0104] 3) Calculate the second homology group: At each scale, calculate the corresponding homology group and identify the topological characteristics of the data at that scale. The 0-dimensional homology group H0 describes the number of connected components in the space. The 1-dimensional homology group H1 describes the 1-dimensional holes in the space, i.e. rings or cycles. The 2-dimensional homology group H2 describes the 2-dimensional holes in the space, i.e. cavities.
[0105] 3) Compute the second persistence diagram: By tracking the birth and death of topological features at different scales, a persistence bar diagram or persistence diagram is generated. The persistence bar diagram uses the length of the bar to represent the persistence of the topological feature, while the persistence diagram uses the coordinates of the points (birth scale and death scale) to represent the persistence of the feature.
[0106] In some embodiments, step 104 includes:
[0107] Step D1, for any of the multiple targets, perform the following operations:
[0108] Step D11: determining the difference between the first persistence map and the second persistence map.
[0109] Step D12, based on the real segmentation annotation and the training predicted segmentation annotation, the Dice similarity coefficient is determined by the following formula:
[0110]
[0111] in, represents the Dyss similarity coefficient, p i represents the training prediction segmentation annotation of the i-th pixel in the image sample, g i represents the true segmentation label of the ith pixel in the training image sample.
[0112] Step D13, determining a sub-loss function corresponding to the target by using the following formula based on the difference and the Dice similarity coefficient:
[0113]
[0114] in, represents the Dess similarity coefficient, d represents the difference, represents the sub-loss function;
[0115] The sub-loss functions corresponding to each target are summed up to obtain the loss function.
[0116] In the above scheme, the real segmentation annotation corresponds to multiple targets, and the training prediction segmentation annotation
[0117] Using the definition of Dice Loss, we can get the value of the loss function between the real segmentation label of the current target and the training predicted segmentation label.
[0118] The Dice Similarity Coefficient loss function is a loss function used to evaluate the performance of image segmentation models, and is particularly suitable for tasks such as medical image segmentation that require accurate calculation of overlapping areas. It is based on the Dice Similarity Coefficient (DSC), and its purpose is to maximize the overlap between the training predicted segmentation annotations and the true segmentation annotations.
[0119] For the segmentation target c, the Dice similarity coefficient loss function is defined as:
[0120]
[0121] On the basis of the Dyss similarity coefficient loss function, the difference d calculated in the previous step is added as a coefficient to obtain a new loss function (i.e., sub-loss function), referred to as
[0122]
[0123] Repeat this process until all the sub-loss functions of the segmented targets are calculated, and the loss functions of all targets are summed up and returned to obtain the final loss function for network optimization, which is shown below:
[0124]
[0125] Among them, C is the total number of segmentation targets.
[0126] This loss function is based on the theory of persistent homology and takes into account the topological differences in the intersection and union of model predictions and true annotations. It enables the model to focus on segmentation targets whose topological structures are difficult to correctly describe during training, thereby improving the overall segmentation accuracy and topological correctness, making it more suitable for clinical use.
[0127] In some embodiments, the difference comprises a bottleneck distance.
[0128] Step D11 includes:
[0129] For any of the multiple targets, do the following:
[0130] The bottleneck distance is determined based on the first persistence graph and the second persistence graph by the following formula:
[0131]
[0132] Among them, d b (D1, D2) represents the bottleneck distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, ||·|| represents the Euclidean distance, and x represents a pixel in the first persistence map.
[0133] In the above scheme, the bottleneck distance is used to measure the difference between two persistence graphs, which is defined as the minimum maximum matching distance between the two graphs.
[0134] The difference between two persistence graphs can be better determined by the bottleneck distance.
[0135] In some embodiments, the difference comprises a Wasserstein distance.
[0136] Step D11 includes:
[0137] For any of the multiple targets, do the following:
[0138] The Wasserstein distance is determined based on the first persistence graph and the second persistence graph by the following formula:
[0139]
[0140] Among them, d w (D1, D2) represents the Wasserstein distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, x represents a pixel point in the first persistence map, and p takes the value of 1 or 2.
[0141] In the above scheme, Wasserstein distance is used to measure the minimum total distance between all pairs of points between two persistence graphs.
[0142] The difference between two persistence graphs can be better determined by the Wasserstein distance.
[0143] In some embodiments, the difference comprises a matching distance.
[0144] Step D11 includes:
[0145] For any of the multiple targets, do the following:
[0146]
[0147] Among them, d M (D1, D2) represents the matching distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, x represents a pixel point in the first persistence map, and Δ represents a diagonal line.
[0148] In the above scheme, the matching distance is calculated based on the best matching of points in two persistence graphs. Unlike the bottleneck distance and Wasserstein distance, it not only considers the distance between paired points, but also the distance from unmatched points to the diagonal in the graph.
[0149] The difference between two persistence graphs can be better determined by matching distance.
[0150] In some embodiments, the true segmentation annotation corresponds to multiple targets, and the training predicted segmentation annotation corresponds to multiple targets.
[0151] In step 105, the step of determining the index corresponding to the target in the training image sample based on the training image sample with the real segmentation annotation and the image sample with the training predicted segmentation annotation includes:
[0152] Step E1, based on the real segmentation annotations corresponding to the multiple targets, the training image samples are one-hot encoded respectively to obtain multiple first encoded binary images, and based on the training predicted segmentation annotations corresponding to the multiple targets, the image samples are one-hot encoded respectively to obtain multiple second encoded binary images.
[0153] Step E2, for any of the multiple targets, perform the following operations:
[0154] Step E21, determining a first target binary image corresponding to the target from the plurality of first encoded binary images, and determining a second target binary image corresponding to the target from the plurality of second encoded binary images.
[0155] Step E22, determining the intersection between the first target binary image and the second target binary image, and determining the union between the first target binary image and the second target binary image.
[0156] Step E23, processing the intersection by a convex hull algorithm to obtain a first edge point set, and processing the union by a convex hull algorithm to obtain a second edge point set.
[0157] Step E24, dividing the corresponding first edge point set and the second edge point set according to a preset division scale to obtain a plurality of edge sub-point set pairs, each edge sub-point set pair including a first edge sub-point set and a second edge sub-point set.
[0158] Step E25: for each edge sub-point set pair, construct a third simplicial complex according to the first edge sub-point set using a preset scale parameter, and construct a fourth simplicial complex according to the second edge sub-point set using a preset scale parameter.
[0159] Step E26, determining a third homology group based on the third simplicial complex, and determining a fourth homology group based on the fourth simplicial complex.
[0160] Step E27, performing topological feature tracing processing on the third homology group to obtain a third persistence graph, and performing topological feature tracing processing on the fourth homology group to obtain a fourth persistence graph.
[0161] Step E28, for each pair of sub-edge sub-point sets, determine the difference between the corresponding third persistence map and the fourth persistence map, and multiply the difference with the coordinates of the image sample where the training prediction segmentation annotation corresponding to the target is located to obtain a product processing result.
[0162] Step E29, determining the index based on the product processing result and the first target binary image by the following formula:
[0163]
[0164] Among them, Topo DSC (pred, gt) represents the index, pred topo Represents the product processing result, and gt represents the first target binary image.
[0165] In the above scheme, this application proposes a target segmentation index based on the persistent homology theory. Similar to the implementation process of the proposed loss function, this index also calculates the persistence graph of the real segmentation annotation and the training prediction segmentation annotation to measure the topological difference between the two. Its implementation process is as follows:
[0166] The CT image data and its corresponding true segmentation annotations and training prediction segmentation annotations are obtained, and the true segmentation annotations and the training prediction segmentation annotations are one-hot encoded.
[0167] The true segmentation annotation and the training prediction segmentation annotation are represented in array form, and their size is (H, W, Z). H, W, Z are the length, width, and number of slices of the CT image, respectively. One-hot encoding separates the annotations of different segmentation targets from each other. The size of the true segmentation annotation and the training prediction segmentation annotation after one-hot encoding is (C, H, W, Z).
[0168] Get the true segmentation annotation and training prediction segmentation annotation corresponding to one of the targets c, that is, obtain two binary images, referred to as the first target binary image gt c and the second target binary map pred c .
[0169] Use the convex hull algorithm to extract the first target binary image gt c and the second target binary map pred c Outline the edge and get two edge point sets S pred and S gt .
[0170] This step is similar to the calculation step of the loss function defined previously, and can also be replaced by gradient calculation. The obtained edge point set S pred and S gt It is composed of three-dimensional coordinates. For any of the two coordinates (x, y, z), 1≤x≤H, 1≤y≤W, 1≤z≤Z are satisfied. H, W, Z are the length, width and number of slices of the CT image respectively.
[0171] Given a partition scale of r∈[2, 3, 4], the edge point set S pred and S gt The coordinate size of the base point is divided into edge point subsets according to the division scale r and Get edge point subset pairs
[0172] According to the division scale r, S pred and S gt The points in are divided according to the size of the coordinates. Let the integers 0≤a, b, c≤r-1, and the number of non-repeating arrays formed by these three integers is r 3 For a given array [a, b, c], satisfy
[0173] That is, it is divided into the category corresponding to the array. Given different scales r, repeat this process.
[0174] Using the persistent homology theory, the edge point subset pairs Calculate the persistence graph and get the persistence graph pair set Similar to the calculation steps of the previous loss function, the steps for calculating the persistence graph are: constructing a simplicial complex, calculating the homology group, and calculating the persistence graph. Take i∈[1, r 3 ], respectively calculated The corresponding persistence graph and Corresponding persistence graph. Traverse all possible values of i and obtain the persistence graph pair set
[0175] right Calculate the bottleneck distance pair by pair, and get This step is similar to the previous loss function calculation step and can also be replaced by Wasserstein distance and matching distance.
[0176] Repeat the above steps until all the division scales are traversed and the The bottleneck distance d b As coefficients, and the corresponding coordinate range of pred c Multiply.
[0177]
[0178] Where i = r 2 ·a+r·b+c. For a certain i and a certain The values of the coordinates (x, y, z) satisfy
[0179] Using the definition of the Dice similarity coefficient, we can get the values of the evaluation indicators of the real segmentation annotation and the training prediction segmentation annotation of the current target:
[0180] Dyss similarity coefficient is a commonly used indicator to measure the similarity between two sample sets. In image segmentation, DSC is used to compare the overlap between the true segmentation annotation and the training prediction segmentation annotation. t And training prediction segmentation annotation pred, DSC is defined as:
[0181]
[0182] Among them, |pred| and |gt| represent the size of the training prediction segmentation annotation pred and the true segmentation annotation gt respectively, and |pred∩gt| represents the size of the intersection of the training prediction segmentation annotation pred and the true segmentation annotation gt. Considering the correction of the training prediction segmentation annotation pred in the previous step, the indicators are defined as follows:
[0183]
[0184] This process is repeated until the indices of all segmentation targets are calculated.
[0185] This indicator, like the previously defined loss function, also uses a persistence graph to describe the topological structure of the target segmentation annotation. The difference is that it calculates the persistence graph of the target annotation at different scales. This is because the introduction of multi-scale calculations during model training will reduce the efficiency of model training, and the multi-scale perspective in indicator calculation helps measure the topological correctness of the model prediction annotations in each area.
[0186] In some embodiments, the data set preparation process is divided into the following steps: Figure 2A As shown:
[0187] Step 2011, collect CT images.
[0188] Step 2012: Use professional medical image processing software to manually annotate the CT image.
[0189] Step 2013, confirming the marking result to confirm whether the marking is correct, if not, returning to step 202 to modify and correct the wrong marking. If yes, executing step 2014.
[0190] Step 2014: CT image annotation integrity check.
[0191] Step 2015: preprocess the CT image.
[0192] Step 2016, dividing the CT image data set.
[0193] Step 2017, obtaining a CT image dataset containing manual segmentation annotations.
[0194] In some embodiments, after the data set is constructed, the model training process is divided into the following steps: Figure 2B As shown:
[0195] Step 2021, CT image training data set.
[0196] Step 2022, data enhancement.
[0197] Step 2023, segmentation model based on U-Net.
[0198] Step 2024 , calculate a loss function based on persistent homology in combination with the actual segmentation map annotation.
[0199] Step 2025, gradient descent updates the network parameters of the segmentation model.
[0200] Step 2026, determine whether the number of training iterations or the set number of times or the loss function reaches a threshold. If not, return to step 2023, if yes, execute step 2027.
[0201] Step 2027, trained segmentation model.
[0202] Step 2028, calculating the evaluation index based on persistent homology.
[0203] In some embodiments, the determination process of the target segmentation loss function based on persistent homology is as follows: Figure 2C As shown:
[0204] Step 2031, one-hot encoding is performed using the real annotation of the CT image and the model predicted segmentation map.
[0205] Step 2032, obtaining the model prediction and true label corresponding to one of the organs (ie, the target).
[0206] Step 2033, calculate the intersection and union of the model prediction and the true annotation.
[0207] Step 2034, using the convex hull algorithm to obtain the edge point set.
[0208] Step 2035, calculate the persistence graph.
[0209] Step 2036, calculate the bottleneck distance.
[0210] Step 2037, determine whether all segmentation targets have been traversed, if not, return to step 2032, if yes, execute step 2038.
[0211] Step 2038, calculate the loss function.
[0212] In some embodiments, the indicator also calculates a persistence graph for the model prediction and the true value annotation to measure the topological difference between the two. The determination process is as follows: Figure 2D As shown:
[0213] Step 2041, one-hot encoding is performed using manual annotation and model prediction of the CT image.
[0214] Step 2042, obtaining a binary image corresponding to an uncalculated organ (ie, target).
[0215] Step 2043, using the convex hull algorithm, obtain two edge point sets.
[0216] Step 2044, divide the above point set into N subset pairs (subset pair 1, subset pair 2, ..., subset pair N) according to the coordinate size of the point and the division scale.
[0217] Step 2045, calculate the persistence graph.
[0218] Step 2046, calculate the bottleneck distance.
[0219] Step 2047, determine whether all division scales have been traversed, if not, return to step 2044, if yes, execute step 2048.
[0220] Step 2048, calculating the evaluation index of the current organ.
[0221] Step 2049, determine whether all segmentation targets have been traversed, if not, return to step 2042, if so, execute step 20410.
[0222] Step 20410, calculate the overall evaluation index.
[0223] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0224] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0225] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a target segmentation device for a computed tomography image.
[0226] refer to Figure 3 , the object segmentation device of the computer tomography image comprises:
[0227] The sample acquisition module 301 is configured to acquire training image samples with real segmentation annotations and construct an initial model;
[0228] A training input module 302 is configured to input training image samples with real segmentation annotations into the initial model, and output image samples with training predicted segmentation annotations through the initial model;
[0229] The persistent homology processing module 303 is configured to process the training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations through a persistent homology algorithm to obtain a persistence map;
[0230] A loss function determination module 304 is configured to determine a loss function according to the persistence map, the true segmentation annotation and the training predicted segmentation annotation;
[0231] The training adjustment module 305 is configured to perform training adjustment on the initial model according to the minimization result obtained in the process of minimizing the loss function, obtain the initial model after training adjustment, and determine the index corresponding to the target in the training image sample based on the training image sample with real segmentation annotation and the image sample with training prediction segmentation annotation;
[0232] The continuous adjustment module 306 is configured to continuously adjust the trained and adjusted initial model in response to the indicator being less than a preset indicator threshold; or,
[0233] The model determination module 307 is configured to use the trained and adjusted initial model as a segmentation model in response to the indicator being greater than or equal to a preset indicator threshold;
[0234] The prediction acquisition module 308 is configured to acquire a tomographic image to be predicted;
[0235] The prediction segmentation module 309 is configured to input the tomographic image to be predicted into the segmentation model, perform segmentation prediction on at least one target in the tomographic image to be predicted through the segmentation model, and obtain a scanned image with prediction segmentation annotations.
[0236] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0237] The device of the above embodiment is used to implement the object segmentation method of the corresponding computed tomography image in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0238] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the target segmentation method of the computed tomography image described in any of the above embodiments is implemented.
[0239] Figure 4A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 401, a memory 402, an input / output interface 403, a communication interface 404, and a bus 405. The processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are connected to each other in communication within the device through the bus 405.
[0240] The processor 401 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0241] The memory 402 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 402 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 402 and called and executed by the processor 401.
[0242] The input / output interface 403 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0243] The communication interface 404 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0244] The bus 405 includes a path for transmitting information between various components of the device (eg, the processor 401 , the memory 402 , the input / output interface 403 , and the communication interface 404 ).
[0245] It should be noted that, although the above device only shows the processor 401, the memory 402, the input / output interface 403, the communication interface 404 and the bus 405, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0246] The electronic device of the above embodiment is used to implement the object segmentation method of the corresponding computed tomography image in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0247] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the target segmentation method of the computed tomography image as described in any of the above embodiments.
[0248] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0249] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the object segmentation method of the computer tomography image as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0250] A person skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0251] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0252] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0253] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the present application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for object segmentation of a computer tomography image, characterized in that: include: Obtain training image samples with real segmentation annotations and build an initial model; Inputting training image samples with real segmentation annotations into the initial model, and outputting image samples with training prediction segmentation annotations through the initial model; Based on the training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations, the persistent homology algorithm is used to process them to obtain a persistence map; Determining a loss function based on the persistence map, the true segmentation annotation, and the training predicted segmentation annotation; The initial model is trained and adjusted according to the minimization result obtained in the process of minimizing the loss function to obtain the trained and adjusted initial model, and the index corresponding to the target in the training image sample is determined based on the training image sample with the real segmentation annotation and the image sample with the training prediction segmentation annotation; In response to the indicator being less than a preset indicator threshold, continuously adjusting the trained and adjusted initial model; or, In response to the indicator being greater than or equal to a preset indicator threshold, using the trained and adjusted initial model as a segmentation model; Acquiring a tomographic image to be predicted; The tomographic image to be predicted is input into the segmentation model, and the segmentation model is used to perform segmentation prediction on at least one target in the tomographic image to be predicted, so as to obtain a scanned image with predicted segmentation annotations.
2. The method according to claim 1, characterized in that: The true segmentation annotation corresponds to a plurality of targets, and the training prediction segmentation annotation corresponds to a plurality of targets; The training image samples with real segmentation annotations and the image samples with training predicted segmentation annotations are processed by a persistent homology algorithm to obtain a persistence map, including: Based on the real segmentation labels corresponding to the multiple targets, the training image samples are respectively one-hot encoded to obtain multiple first encoded binary images, and based on the training predicted segmentation labels corresponding to the multiple targets, the image samples are respectively one-hot encoded to obtain multiple second encoded binary images; For any of the multiple targets, do the following: Determine a first target binary image corresponding to the target from the plurality of first encoded binary images, and determine a second target binary image corresponding to the target from the plurality of second encoded binary images; Determine an intersection between the first target binary map and the second target binary map, and determine a union between the first target binary map and the second target binary map; Processing the intersection by a convex hull algorithm to obtain a first edge point set, and processing the union by a convex hull algorithm to obtain a second edge point set; A first persistence graph is determined based on the first edge point set, and a second persistence graph is determined based on the second edge point set, and the first persistence graph and the second persistence graph are used as the persistence graph.
3. The method according to claim 2, characterized in that The determining a first persistence graph based on the first edge point set comprises: For any of the multiple targets, do the following: constructing a first simplicial complex according to the first edge point set by using a preset scale parameter; determining a first homology group based on the first simplicial complex; Perform topological feature tracking processing on the first homology group to obtain the first persistence graph.
4. The method according to claim 2, characterized in that: The determining a second persistence graph based on the second edge point set comprises: For any of the multiple targets, do the following: constructing a second simplicial complex according to the second edge point set by using a preset scale parameter; determining a second homology group based on the second simplicial complex; Perform topological feature tracking processing on the second homology group to obtain the second persistence graph.
5. The method according to claim 2, characterized in that: The determining of the loss function according to the persistence graph, the true segmentation annotation and the training prediction segmentation annotation comprises: For any of the multiple targets, do the following: determining a difference between the first persistence map and the second persistence map; The Dice similarity coefficient is determined based on the true segmentation annotation and the training prediction segmentation annotation by the following formula: in, represents the Dyss similarity coefficient, p i represents the training prediction segmentation annotation of the i-th pixel in the image sample, g i represents the true segmentation annotation of the i-th pixel in the training image sample; The sub-loss function corresponding to the target is determined by the following formula based on the difference and the Diess similarity coefficient: in, represents the Dess similarity coefficient, d represents the difference, represents a sub-loss function; the sub-loss functions corresponding to each target are summed to obtain the loss function.
6. The method according to claim 5, characterized in that Said differences include bottleneck distance; The determining a difference between the first persistence map and the second persistence map comprises: For any of the multiple targets, do the following: The bottleneck distance is determined based on the first persistence graph and the second persistence graph by the following formula: Among them, d b (D1, D2) represents the bottleneck distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, ||·|| represents the Euclidean distance, and x represents a pixel in the first persistence map.
7. The method according to claim 5, characterized in that Said differences include Wasserstein distance; The determining a difference between the first persistence map and the second persistence map comprises: For any of the multiple targets, do the following: The Wasserstein distance is determined based on the first persistence graph and the second persistence graph by the following formula: Among them, d w (D1, D2) represents the Wasserstein distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, x represents a pixel point in the first persistence map, and p takes the value of 1 or 2.
8. The method according to claim 5, characterized in that The differences include matching distances; The determining a difference between the first persistence map and the second persistence map comprises: For any of the multiple targets, do the following: Among them, d M (D1, D2) represents the matching distance, D1 represents the first persistence map, D2 represents the second persistence map, γ(x) represents all bijective mappings from D1 to D2, x represents a pixel point in the first persistence map, and Δ represents a diagonal line.
9. The method according to claim 1, characterized in that: The true segmentation annotation corresponds to a plurality of targets, and the training prediction segmentation annotation corresponds to a plurality of targets; The step of determining the index corresponding to the target in the training image sample based on the training image sample with the real segmentation annotation and the image sample with the training prediction segmentation annotation includes: Based on the real segmentation labels corresponding to the multiple targets, the training image samples are respectively one-hot encoded to obtain multiple first encoded binary images, and based on the training predicted segmentation labels corresponding to the multiple targets, the image samples are respectively one-hot encoded to obtain multiple second encoded binary images; For any of the multiple targets, do the following: Determine a first target binary image corresponding to the target from the plurality of first encoded binary images, and determine a second target binary image corresponding to the target from the plurality of second encoded binary images; Determine an intersection between the first target binary map and the second target binary map, and determine a union between the first target binary map and the second target binary map; Processing the intersection by a convex hull algorithm to obtain a first edge point set, and processing the union by a convex hull algorithm to obtain a second edge point set; Dividing the corresponding first edge point set and the second edge point set according to a preset division scale to obtain a plurality of edge sub-point set pairs, each edge sub-point set pair including a first edge sub-point set and a second edge sub-point set; For each edge sub-point set pair, construct a third simplicial complex according to the first edge sub-point set by using a preset scale parameter, and construct a fourth simplicial complex according to the second edge sub-point set by using a preset scale parameter; determining a third homology group based on the third simplicial complex, and determining a fourth homology group based on the fourth simplicial complex; Performing topological feature tracing processing on the third homology group to obtain a third persistence graph, and performing topological feature tracing processing on the fourth homology group to obtain a fourth persistence graph; For each pair of sub-edge sub-point sets, determining the difference between the corresponding third persistence map and the fourth persistence map, and performing a product processing on the difference based on the coordinates of the image sample where the training prediction segmentation annotation corresponding to the target is located to obtain a product processing result; The index is determined based on the product processing result and the first target binary image by the following formula: Among them, Topo DSC (pred, gt) represents the index, pred topo Represents the product processing result, and gt represents the first target binary image.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Topology awareness-based point cloud segmentation network construction method, segmentation method and device
CN115222747A
Microvascular decompression-oriented multi-modal multi-target segmentation method and system
CN117671748A
Medical image segmentation method, medical image segmentation apparatus and terminal device
WO2021179205A1