Biliary duct segmentation method, computer device, medical system, and storage medium
Patent Information
- Application Number
- CN202211529686.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2042-11-30
AI Technical Summary
[0005]在本实施例中提供了一种胆管分割方法、计算机设备、医疗系统和存储介质,以解决相关技术中无法自动分割较细胆管的问题
[0039]与相关技术相比,在本实施例中提供的胆管分割方法、计算机设备、医疗系统和存储介质,通过将待预测图像输入至训练好的胆管分割模型,得到预测结果;根据待预测图像的肝内门静脉标签调整预测结果,得到胆管分割结果,解决了相关技术中无法自动分割较细胆管的问题,实现了自动分割较细胆管的效果。
Smart Images

Figure CN118154634B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image processing, and in particular to a bile duct segmentation method, computer equipment, medical system, and storage medium. Background Technology
[0002] Segmenting the bile ducts in medical imaging is crucial for detecting related diseases and for surgical procedures. From a biological perspective, the bile ducts can be divided into the common bile duct, cystic duct, and hepatobiliary ducts, with the common bile duct being relatively thicker. From the perspective of disease presence, bile ducts can be classified as dilated or non-dilated, and these two types have different diameters. Dilated bile ducts are those that have dilated due to disease, resulting in thicker bile ducts; non-dilated bile ducts, i.e., normal bile ducts, are thinner, less visible on imaging, and more difficult to segment.
[0003] The related technologies provide bile duct segmentation methods based on deep learning, but they are only effective for larger bile ducts, such as the common bile duct and some dilated bile ducts. The segmentation effect for smaller bile ducts is not good, and doctors still need to perform a lot of subsequent semi-automatic or manual repair operations, which is difficult to meet the processing requirements of bile duct medical images in clinical applications.
[0004] There is currently no effective solution to the problem that related technologies cannot automatically segment thinner bile ducts. Summary of the Invention
[0005] This embodiment provides a bile duct segmentation method, computer device, medical system, and storage medium to solve the problem in related technologies that cannot automatically segment thinner bile ducts.
[0006] Firstly, this embodiment provides a method for bile duct segmentation, including:
[0007] The image to be predicted is input into the trained bile duct segmentation model to obtain the prediction result;
[0008] The prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation result.
[0009] In some embodiments, the prediction result includes a first prediction probability map, and the prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain a bile duct segmentation result, including:
[0010] Based on the intrahepatic portal vein label, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain a second prediction probability map. The target pixel includes non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
[0011] The bile duct segmentation result is obtained based on the second predicted probability map.
[0012] In some embodiments, based on the intrahepatic portal vein label, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain a second prediction probability map, including:
[0013] Based on the intrahepatic portal vein label, a first distance is determined between the target pixel in the image to be predicted and the nearest edge of the intrahepatic portal vein, wherein the first distance is the minimum value of the distance from the target pixel to all pixels in the edge of the intrahepatic portal vein;
[0014] Based on the first distance, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain the second prediction probability map, wherein the smaller the first distance, the higher the probability value corresponding to the target pixel is adjusted.
[0015] In some embodiments, the prediction result includes a first pixel set, and the prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain a bile duct segmentation result, including:
[0016] Based on the intrahepatic portal vein label, target pixels in the image to be predicted are determined, and a second pixel set is generated based on the target pixels. The target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
[0017] The bile duct segmentation result is obtained by expanding the first pixel set according to the second pixel set, wherein the first pixel set includes bile duct pixels in the image to be predicted determined according to the first prediction label.
[0018] In some embodiments, the bile duct segmentation result is obtained by expanding the first pixel set according to the second pixel set, including:
[0019] Unwanted pixels are removed from the second pixel set to obtain a third pixel set, wherein the line connecting the unwanted pixels to the nearest edge of the intrahepatic portal vein passes through the location of at least a portion of the pixels in the first pixel set.
[0020] The union of the first pixel set and the third pixel set is obtained to obtain the bile duct segmentation result.
[0021] In some embodiments, the method further includes, prior to deleting non-required pixels from the second pixel set:
[0022] Extract multiple skeleton points from the first pixel set to generate a skeleton point set, wherein the skeleton points include points on the central axis of the bile duct image corresponding to the first pixel set.
[0023] The target pixel of the skeleton point set is defined as the non-demand pixel, with the line connecting it to the nearest edge of the intrahepatic portal vein passing through the skeleton point set.
[0024] In some embodiments, generating a second pixel set based on the target pixel includes:
[0025] Candidate pixels whose CT values fall within a preset range are selected from the target pixels, and hole filling is performed on the candidate pixels to generate the second pixel set; or...
[0026] Candidate pixels whose CT values fall within a preset range are selected from the target pixels. Region growing is then performed using a subset of these candidate pixels as initial points to generate the second pixel set.
[0027] In some embodiments, the image to be predicted is input into a trained bile duct segmentation model to obtain prediction results, including:
[0028] The image to be predicted is input into the bile duct segmentation model to obtain a first prediction probability map;
[0029] The first predicted label is obtained based on the first predicted probability map;
[0030] Based on the first predicted label, the bile duct pixels in the image to be predicted are determined, and the first pixel set is generated based on the bile duct pixels.
[0031] In some embodiments, the image to be predicted is input into a trained bile duct segmentation model to obtain prediction results, including:
[0032] The image to be predicted is input into the bile duct segmentation model to obtain a first prediction probability map;
[0033] Based on the intrahepatic portal vein label, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain the second prediction probability map;
[0034] The first predicted label is obtained based on the second predicted probability map;
[0035] Based on the first predicted label, the bile duct pixels in the image to be predicted are determined, and the first pixel set is generated based on the bile duct pixels.
[0036] Secondly, this embodiment 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 bile duct segmentation method described in the first aspect above.
[0037] Thirdly, this embodiment provides a medical system, including: an imaging body, a bed, and the computer equipment described in the third aspect above. The imaging body has a scanning cavity into which the bed is moved. The imaging body is connected to the computer equipment, and the imaging body is capable of acquiring human image data.
[0038] Fourthly, this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the bile duct segmentation method described in the first aspect above.
[0039] Compared with related technologies, the bile duct segmentation method, computer equipment, medical system and storage medium provided in this embodiment obtain the prediction result by inputting the image to be predicted into the trained bile duct segmentation model; and adjust the prediction result according to the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation result. This solves the problem that related technologies cannot automatically segment thinner bile ducts and achieves the effect of automatically segmenting thinner bile ducts.
[0040] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0041] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0042] Figure 1 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application;
[0043] Figure 2 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 1 ;
[0044] Figure 3 This is a comparative diagram of a bile duct segmentation experiment in one embodiment of this application;
[0045] Figure 4 This is a schematic diagram illustrating the principle of a bile duct segmentation method in one embodiment of this application;
[0046] Figure 5 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 2 ;
[0047] Figure 6 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 3 ;
[0048] Figure 7 This is a schematic diagram of pixel set operation in one embodiment of this application;
[0049] Figure 8 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 4 ;
[0050] Figure 9 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 5 ;
[0051] Figure 10 This is a flowchart of a bile duct segmentation method in one embodiment of this application. Figure 6 ;
[0052] Figure 11 This is a schematic diagram of the training principle of the bile duct segmentation model in one embodiment of this application;
[0053] Figure 12 This is a schematic diagram of the structure of a medical system in one embodiment of this application. Detailed Implementation
[0054] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0055] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.
[0056] Due to the difficulty in segmenting thinner bile ducts, existing bile duct segmentation methods are not very effective. The branches of the hepatobiliary ducts are thin and accompany the intrahepatic portal vein; currently, there is no effective solution for segmenting this portion of the bile duct. The solutions proposed in this application are the result of the inventors' practical experience and careful research. Therefore, the discovery of this problem and the solutions proposed below are contributions made by the inventors to this application.
[0057] To facilitate understanding of this application, the executing entity of the bile duct segmentation method in this application will first be introduced. In one embodiment, the executing entity of the bile duct segmentation method can be a computer device with certain computing capabilities. This computer device can be a terminal, and its internal structure diagram can be as follows: Figure 1As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a bile duct segmentation method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0058] Those skilled in the art will understand that Figure 1 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.
[0059] The bile duct segmentation method provided in this application is described below. In one embodiment, see... Figure 2 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 1 This method is applied to Figure 1 Taking a computer device as an example, the steps include:
[0060] Step S101: Input the image to be predicted into the trained bile duct segmentation model to obtain the prediction result.
[0061] The image to be predicted includes human image data acquired by medical systems, such as CT (Computed Tomography) image data. The image to be predicted can be an abdominal image, a liver image, or an image containing both the gallbladder and liver.
[0062] The bile duct segmentation model can be obtained by building a deep learning algorithm network and iteratively training it on a training set with real bile duct labels. The training set can contain abdominal cavity images, liver images, or images containing both the gallbladder and liver.
[0063] Optionally, the prediction result can be a prediction probability map (heat map), in which the value at each position represents the probability that the image pixel to be predicted at that position belongs to the bile duct pixel. Optionally, the prediction result can be a pixel set, which is obtained based on the prediction mask. The prediction mask includes the bile duct label, which can be represented by the number 1. The labeled objects corresponding to the bile duct label include, but are not limited to, the common bile duct, the cystic duct, and the hepatobiliary duct.
[0064] Step S102: Adjust the prediction results based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation results.
[0065] Based on intrahepatic portal vein labels, the label category information of each pixel in the image to be predicted is adjusted to improve the ability of the bile duct segmentation model to segment thinner bile ducts. For example, in the forward inference stage of the model, the probability of each pixel belonging to a bile duct pixel in the prediction probability map is adjusted; or, in the post-processing stage of the model, the label category of a certain pixel in the prediction label is adjusted.
[0066] The labeling object corresponding to the intrahepatic portal vein refers to the intrahepatic portal vein, which is located inside the liver. Regarding the acquisition of intrahepatic portal vein labels, the image to be predicted can be input into the intrahepatic portal vein segmentation model to obtain the predicted intrahepatic portal vein label. Alternatively, the actual intrahepatic portal vein label can be obtained through manual or semi-automatic annotation. The label can also be obtained through non-model-based algorithms; this embodiment does not impose any limitations. The intrahepatic portal vein segmentation model can be obtained by building a deep learning algorithm network and iteratively training it on a training set containing actual intrahepatic portal vein labels. The training set may include liver images.
[0067] Segmentation refers to distinguishing the bile duct from the background, treating it as the foreground. For example, different colors can be used to differentiate the bile duct from the background, or the bile duct can be outlined with a border to highlight the identified bile duct. The bile duct segmentation method in this embodiment can automatically segment thinner bile ducts. The diameter levels are as follows: First diameter level: bile duct diameter 0.4~0.6cm, for example, no dilation of the hepatobiliary ducts or partial dilation of the common bile duct; Second diameter level: bile duct diameter 0.6~0.8cm, for example, partial dilation of the common bile duct; Third diameter level: bile duct diameter greater than 0.8cm, for example, dilation of the hepatobiliary ducts or dilation of the common bile duct. The common bile duct is relatively thick, while some branches of the hepatobiliary ducts within the liver are thinner, and these thinner branches accompany the intrahepatic portal vein.
[0068] See Figure 3This is a comparative diagram of a bile duct segmentation experiment provided in this embodiment. Sub-image (a) shows the result obtained by processing the image to be predicted using related techniques, and sub-image (b) shows the result obtained by processing the image to be predicted using the bile duct segmentation method provided in this embodiment. The light-colored tubular structures represent the intrahepatic portal vein, and the dark-colored tubular structures represent the bile duct segmentation results. It can be seen that the bile duct segmentation method of this application has certain optimizations on the bile duct segmentation results, capable of segmenting not only large-diameter bile ducts but also small-diameter bile ducts, especially the thinner bile ducts accompanying the intrahepatic portal vein.
[0069] In steps S101 to S102 above, by utilizing the characteristic that the intrahepatic portal vein accompanies the bile duct, the intrahepatic portal vein label is introduced as prior information when using the bile duct segmentation model for prediction. This adjusts the prediction results output by the bile duct segmentation model, making the prediction results more biased towards considering that the intrahepatic portal vein is surrounded by bile ducts. This improves the bile duct segmentation model's ability to predict thinner bile ducts, especially the segmentation effect on thinner bile duct branches that accompany the intrahepatic portal vein, thereby automatically segmenting thinner bile ducts and obtaining better bile duct segmentation results.
[0070] In one embodiment, see Figure 4 This is a schematic diagram illustrating the principle of a bile duct segmentation method provided in this embodiment. First, the CT image to be predicted is input into both the bile duct segmentation model and the intrahepatic portal vein segmentation model. The bile duct segmentation model outputs the prediction results, while the intrahepatic portal vein segmentation model outputs the intrahepatic portal vein labels. Then, when adjusting the prediction results, either a bile duct heat map correction algorithm is used alone to adjust the first prediction probability map, or a post-processing algorithm is used alone to adjust the first pixel set, or both the bile duct heat map correction algorithm and the post-processing algorithm are used in combination. The bile duct segmentation method presented in this embodiment introduces intrahepatic portal vein labels in different processing stages of the bile duct segmentation model, allowing for individual adjustment of the prediction results in each stage. This achieves the goal of finer bile duct segmentation. Specifically, for both processing stages, intrahepatic portal vein labels are introduced to adjust the corresponding prediction results, thereby better segmenting finer bile ducts.
[0071] The following sections will further introduce these alternative implementation schemes based on the different roles of intrahepatic portal vein tags in the bile duct segmentation process.
[0072] In one embodiment, the prediction result includes a first predicted probability map, using a separate bile duct heat map correction algorithm. See also Figure 5 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 2 The process includes the following steps:
[0073] Step S201: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map.
[0074] The target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the intrahepatic portal vein edge does not exceed a threshold. The intrahepatic portal vein edge refers to a contour line formed by pixels on the surface of the tubular intrahepatic portal vein.
[0075] Step S202: Obtain the bile duct segmentation result based on the second prediction probability map.
[0076] Considering that bile ducts are located near the intrahepatic portal vein, increasing the probability value of the target pixel increases the detection rate of bile duct pixels at the edge of the intrahepatic portal vein, thereby improving the extraction ability of thinner bile ducts accompanying the intrahepatic portal vein. Optionally, if the threshold is 8 mm, the target pixel is a non-portal vein pixel within a range of no more than n pixels from the edge of the intrahepatic portal vein, where n = 8 mm / spacing, and spacing is the actual size of a single pixel. For example, in the second prediction probability map, if the probability value of a pixel exceeds 0.5, the final prediction result for that pixel is a bile duct; otherwise, it is background.
[0077] Step S201 includes: determining a first distance between the target pixel in the image to be predicted and the nearest edge of the intrahepatic portal vein based on the intrahepatic portal vein label, wherein the first distance is the minimum distance from the target pixel to all pixels in the intrahepatic portal vein edge; adjusting the probability value corresponding to the target pixel in the first prediction probability map based on the first distance to obtain a second prediction probability map, wherein the smaller the first distance, the higher the probability value corresponding to the target pixel is adjusted. It should be noted that since the intrahepatic portal vein edge has multiple pixels, the distance between the target pixel and the intrahepatic portal vein edge includes the distance between the target pixel and multiple pixels. For the target pixel, its nearest intrahepatic portal vein edge is the intrahepatic portal vein pixel corresponding to the minimum distance (i.e., the first distance).
[0078] The probability value of the target pixel is increased by a corresponding amount based on the distance L between the target pixel and the nearest intrahepatic portal vein edge. Optionally, the increase rate decreases non-linearly from smallest to largest distance L, using a Gaussian function as the non-linear function. The formula is as follows:
[0079]
[0080] in, This represents the value of the second prediction probability map. The value represents the first predicted probability map, 'a' represents the parameter weight of the Gaussian function (e.g., a=0.2), and 'n' represents the pixel range, calculated from the threshold mentioned above.
[0081] In one embodiment, the prediction result includes a first set of pixels, which is processed separately using a post-processing algorithm. See also Figure 6 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 3 The process includes the following steps:
[0082] Step S301: Based on the intrahepatic portal vein label, determine the target pixel in the image to be predicted, and generate a second pixel set based on the target pixel.
[0083] The target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
[0084] Step S302: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0085] The first pixel set includes bile duct pixels in the image to be predicted, determined according to the first prediction label. The first prediction label, including bile duct labels, can be obtained directly from the first prediction probability map or from the second prediction probability map. In all pixels of the image to be predicted, bile duct pixels are used as foreground pixels corresponding to bile duct labels, and the predicted bile duct labels correspond to the predicted first pixel set. Background pixels other than bile duct pixels correspond to background labels, and the predicted background labels correspond to the predicted background pixel set.
[0086] Further, step S302 includes: deleting non-required pixels from the second pixel set to obtain a third pixel set, wherein the line connecting the non-required pixels and the nearest intrahepatic portal vein edge passes through the location of at least some pixels in the first pixel set; and calculating the union of the first pixel set and the third pixel set to obtain the bile duct segmentation result.
[0087] See Figure 7 This is a schematic diagram of pixel set operation provided in this embodiment. Sub-figures (a) and (b) are both idealized two-dimensional positional relationship diagrams of bile duct segmentation results, target pixels, and intrahepatic portal vein segmentation results. The arrows represent the lines connecting the second pixel set to the edge of the intrahepatic portal vein.
[0088] For each pixel in the second pixel set, determine whether the line connecting it to the nearest intrahepatic portal vein edge point passes through the first pixel set. If the line passes through the first pixel set, as shown in sub-image (a), the pixel is removed from the second pixel set; if the line does not pass through the first pixel set, as shown in sub-image (b), the pixel is retained. After filtering and deleting some pixels from the second pixel set, the third pixel set is obtained. The bile duct segmentation result is the union of the first and third pixel sets.
[0089] To improve computational speed, pixel sets can be processed using at least one of the following methods.
[0090] Optionally, before deleting undesirable pixels from the second pixel set, the method further includes: extracting multiple skeleton points from the first pixel set to generate a skeleton point set, wherein the skeleton points include points on the central axis of the bile duct image corresponding to the first pixel set; and taking target pixels whose lines connecting to the nearest intrahepatic portal vein edge pass through the skeleton point set as undesirable pixels.
[0091] Optionally, generating a second pixel set based on the target pixel includes: filtering candidate pixels whose CT values fall within a preset range, performing hole filling on the candidate pixels, and generating the second pixel set. Here, CT value refers to the corresponding value of each tissue in a CT image equivalent to the X-ray attenuation coefficient, measured in HU. For example, threshold segmentation is applied to the target pixel to extract pixel regions in the image whose CT values are between h1 and h2 (h1=0, h2=100), and then hole filling is performed on the extracted regions to obtain the second pixel set.
[0092] Optionally, generating a second pixel set based on the target pixel includes: filtering candidate pixels whose CT values fall within a preset range, performing region growing processing with some candidate pixels as initial points, and generating a second pixel set.
[0093] In one embodiment, see Figure 8 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 4 The process includes the following steps:
[0094] Step S401: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0095] Step S402: Obtain the first predicted label based on the first predicted probability map;
[0096] Step S403: Based on the first prediction label, determine the bile duct pixels in the image to be predicted, and generate a first pixel set based on the bile duct pixels;
[0097] Step S404: Based on the intrahepatic portal vein label, determine the target pixels in the image to be predicted, and generate a second pixel set based on the target pixels; wherein, the target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
[0098] Step S405: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0099] In steps S401 to S405 above, a first predicted label is first obtained based on the first predicted probability map, and then a first pixel set is obtained based on the first predicted label. This first pixel set is used as the preliminary bile duct segmentation result. Further, the first pixel set is adjusted to optimize the extraction effect of bile ducts from the intrahepatic portal vein, resulting in the final bile duct segmentation result.
[0100] In one embodiment, see Figure 9 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 5 The process includes the following steps:
[0101] Step S501: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0102] Step S502: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map; wherein, the target pixel includes non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed the threshold.
[0103] Step S503: Obtain the first predicted label based on the second predicted probability map;
[0104] Step S504: Based on the first predicted label, determine the bile duct pixels in the image to be predicted, and generate the first pixel set based on the bile duct pixels, thus obtaining the bile duct segmentation result.
[0105] In steps S501 to S504 above, the first prediction probability map is first adjusted to obtain a second prediction probability map, in order to improve the extraction capability of thinner bile ducts accompanying the intrahepatic portal vein. Then, a first prediction label is obtained based on the second prediction probability map, and a first pixel set is obtained based on the first prediction label. The first pixel set is used as the final bile duct segmentation result.
[0106] The following will introduce the implementation scheme of superimposing the bile duct heat map correction algorithm and the post-processing algorithm.
[0107] In one embodiment, see Figure 10 The following is a flowchart of a bile duct segmentation method provided in this embodiment. Figure 6 The process includes the following steps:
[0108] Step S601: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0109] Step S602: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map; wherein, the target pixel includes non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed the threshold.
[0110] Step S603: Obtain the first predicted label based on the second predicted probability map;
[0111] Step S604: Based on the first prediction label, determine the bile duct pixels in the image to be predicted, and generate a first pixel set based on the bile duct pixels;
[0112] Step S605: Based on the intrahepatic portal vein label, determine the target pixels in the image to be predicted, and generate a second pixel set based on the target pixels;
[0113] Step S606: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0114] In steps S601 to S606, the first predicted probability map is first adjusted to obtain a second predicted probability map, thereby improving the extraction capability of thinner bile ducts accompanying the intrahepatic portal vein. Then, a first pixel set is obtained based on the second predicted probability map, and this first pixel set is used as the preliminary bile duct segmentation result. Further, the first pixel set is adjusted to optimize the extraction effect of bile ducts from the intrahepatic portal vein, resulting in the final bile duct segmentation result.
[0115] In one embodiment, see Figure 11 This diagram illustrates the training principle of a bile duct segmentation model provided in this embodiment. The model is obtained by iteratively training a deep learning-based network nnUNet on a training set labeled with bile ducts.
[0116] Optionally, to improve the bile duct segmentation model's ability to segment the bile duct, the original CT image data can be preprocessed. Before inputting the current sample images into the bile duct segmentation model to be trained, a first CT value and a second CT value are determined based on the CT values of labeled pixels in multiple original images. This ensures that the proportion of labeled pixels with a CT value less than the first CT value is within a first preset range, and the proportion of labeled pixels with a CT value greater than the second CT value is within a second preset range; wherein the first CT value is less than the second CT value. Based on the first CT value and the second CT value, all pixels in the multiple original images are standardized to obtain multiple sample images.
[0117] For example, firstly, the regions containing bile ducts are labeled in the raw CT image data. Then, the pixels carrying bile duct and intrahepatic portal vein labels in the raw CT image data are counted. Based on the CT values of these pixels, a first CT value and a second CT value are obtained, such that among the pixels carrying bile duct labels, the proportion of pixels with CT values less than the first CT value is 5%, and the proportion of pixels with CT values greater than the second CT value is 5%. Here, the total number of pixels refers to the total number of pixels carrying bile duct labels. Finally, the raw CT image data is standardized using the Z-Score method, where the parameters used in the Z-Score (Standard Score) method include the first CT value and the second CT value.
[0118] In one embodiment, the performance of the bile duct segmentation model is evaluated using the following steps: The dataset is divided into K subsets. During each round of iterative training of the bile duct segmentation model, one subset is used as the test set, and the remaining K-1 subsets are used as the training set (i.e., the current sample images), until each subset is used as the test set in the iterative training of the bile duct segmentation model, resulting in K empirical errors. The current bile duct segmentation model is evaluated based on the average of the K empirical errors. Optionally, K equals 5. This setting minimizes the influence of the training and test set partitioning on the selection and evaluation of the bile duct segmentation model.
[0119] In one embodiment, see Figure 12 This embodiment provides a medical system comprising an imaging unit 100, a bed 101, and a computer device 200. The imaging unit 100 has a scanning cavity 102 for the bed to be moved into. The computer device 200 is connected to the imaging unit 100, and the imaging unit 100 is capable of acquiring human image data. The internal structure and operation method of the computer device have been described in the above embodiments and will not be repeated here. The bed 101 is suitable for carrying a human body and is movable, allowing the human body to be moved to a suitable position for detection, for example... Figure 12 The location is marked as 105. Specifically, the medical system also includes a scanning component, mainly composed of a radiation source 103 and a detector 104. The imaging unit 100 can drive the detector 104 to be aligned with the lesion area outside or inside the scanning cavity 102 to obtain molecular image information of the lesion area; the scanning cavity 102 is used to accommodate the lesion area and perform tomographic imaging of the lesion area. Optionally, the imaging unit 100 is an MR device body or a CT device body.
[0120] Furthermore, in conjunction with the bile duct segmentation method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program performs the following steps:
[0121] Step S101: Input the image to be predicted into the trained bile duct segmentation model to obtain the prediction result;
[0122] Step S102: Adjust the prediction results based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation results.
[0123] In one embodiment, when the computer program is executed by a processor, it performs the following steps:
[0124] Step S201: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map;
[0125] Step S202: Obtain the bile duct segmentation result based on the second prediction probability map.
[0126] In one embodiment, when the computer program is executed by a processor, it performs the following steps:
[0127] Step S301: Based on the intrahepatic portal vein label, determine the target pixels in the image to be predicted, and generate a second pixel set based on the target pixels;
[0128] Step S302: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0129] In one embodiment, when the computer program is executed by a processor, it performs the following steps:
[0130] Step S401: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0131] Step S402: Obtain the first predicted label based on the first predicted probability map;
[0132] Step S403: Based on the first prediction label, determine the bile duct pixels in the image to be predicted, and generate a first pixel set based on the bile duct pixels;
[0133] Step S404: Based on the intrahepatic portal vein label, determine the target pixels in the image to be predicted, and generate a second pixel set based on the target pixels; wherein, the target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
[0134] Step S405: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0135] In one embodiment, when the computer program is executed by a processor, it performs the following steps:
[0136] Step S501: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0137] Step S502: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map; wherein, the target pixel includes non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed the threshold.
[0138] Step S503: Obtain the first predicted label based on the second predicted probability map;
[0139] Step S504: Based on the first predicted label, determine the bile duct pixels in the image to be predicted, and generate the first pixel set based on the bile duct pixels, thus obtaining the bile duct segmentation result.
[0140] In one embodiment, when the computer program is executed by a processor, it performs the following steps:
[0141] Step S601: Input the image to be predicted into the bile duct segmentation model to obtain the first prediction probability map;
[0142] Step S602: Based on the intrahepatic portal vein label, adjust the probability value corresponding to the target pixel in the first prediction probability map to obtain the second prediction probability map; wherein, the target pixel includes non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed the threshold.
[0143] Step S603: Obtain the first predicted label based on the second predicted probability map;
[0144] Step S604: Based on the first prediction label, determine the bile duct pixels in the image to be predicted, and generate a first pixel set based on the bile duct pixels;
[0145] Step S605: Based on the intrahepatic portal vein label, determine the target pixels in the image to be predicted, and generate a second pixel set based on the target pixels;
[0146] Step S606: Expand the first pixel set according to the second pixel set to obtain the bile duct segmentation result.
[0147] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0148] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0149] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0150] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0151] 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, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. The acquisition, storage, use, and processing of data involved in the embodiments of this application all comply with the relevant provisions of national laws and regulations.
[0152] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile 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, etc., and are not limited to these.
[0153] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. 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 scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A method of segmenting a bile duct, characterized by, include: The image to be predicted is input into the trained bile duct segmentation model to obtain the prediction result; The prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation result; The prediction result includes a first prediction probability map. The prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation result, including: Based on the intrahepatic portal vein label, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain the second prediction probability map; The bile duct segmentation result is obtained based on the second predicted probability map; or, The prediction result includes a first pixel set. The prediction result is adjusted based on the intrahepatic portal vein label of the image to be predicted to obtain the bile duct segmentation result, including: Based on the intrahepatic portal vein label, the target pixel in the image to be predicted is determined, and a second pixel set is generated based on the target pixel; The first pixel set is expanded according to the second pixel set to obtain the bile duct segmentation result, wherein the first pixel set includes bile duct pixels in the image to be predicted determined according to the first prediction label; The target pixels include non-intrahepatic portal vein pixels near the edge of the intrahepatic portal vein in the image to be predicted, and the minimum distance from the non-intrahepatic portal vein pixels to all pixels in the edge of the intrahepatic portal vein does not exceed a threshold.
2. The biliary duct segmentation method according to claim 1, characterized by, Based on the intrahepatic portal vein label, the probability values corresponding to the target pixels in the first prediction probability map are adjusted to obtain a second prediction probability map, including: Based on the intrahepatic portal vein label, a first distance is determined between the target pixel in the image to be predicted and the nearest edge of the intrahepatic portal vein, wherein the first distance is the minimum value of the distance from the target pixel to all pixels in the edge of the intrahepatic portal vein; Based on the first distance, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain the second prediction probability map, wherein the smaller the first distance, the higher the probability value corresponding to the target pixel is adjusted.
3. The biliary duct segmentation method according to claim 1, characterized by, The bile duct segmentation result is obtained by expanding the first pixel set based on the second pixel set, including: Unwanted pixels are removed from the second pixel set to obtain a third pixel set, wherein the line connecting the unwanted pixels to the nearest edge of the intrahepatic portal vein passes through the location of at least a portion of the pixels in the first pixel set. The union of the first pixel set and the third pixel set is obtained to obtain the bile duct segmentation result.
4. The biliary duct segmentation method according to claim 3, characterized by, Before deleting undesirable pixels from the second pixel set, the method further includes: Extract multiple skeleton points from the first pixel set to generate a skeleton point set, wherein the skeleton points include points on the central axis of the bile duct image corresponding to the first pixel set. The target pixel of the skeleton point set is defined as the non-demand pixel, with the line connecting it to the nearest edge of the intrahepatic portal vein passing through the skeleton point set.
5. The biliary duct segmentation method according to claim 3, characterized by, Generate a second pixel set based on the target pixel, including: Candidate pixels whose CT values fall within a preset range are selected from the target pixels, and hole filling is performed on the candidate pixels to generate the second pixel set; or... Candidate pixels whose CT values fall within a preset range are selected from the target pixels. Region growing is then performed using a subset of these candidate pixels as initial points to generate the second pixel set.
6. The biliary duct segmentation method of claim 1, wherein, The image to be predicted is input into the trained bile duct segmentation model to obtain the prediction results, including: The image to be predicted is input into the bile duct segmentation model to obtain a first prediction probability map; The first predicted label is obtained based on the first predicted probability map; Based on the first predicted label, the bile duct pixels in the image to be predicted are determined, and the first pixel set is generated based on the bile duct pixels.
7. The biliary duct segmentation method of claim 1, wherein, The image to be predicted is input into the trained bile duct segmentation model to obtain the prediction results, including: The image to be predicted is input into the bile duct segmentation model to obtain a first prediction probability map; Based on the intrahepatic portal vein label, the probability value corresponding to the target pixel in the first prediction probability map is adjusted to obtain the second prediction probability map; The first predicted label is obtained based on the second predicted probability map; Based on the first predicted label, the bile duct pixels in the image to be predicted are determined, and the first pixel set is generated based on the bile duct pixels. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. When the processor executes the computer program, it implements the bile duct segmentation method according to any one of claims 1 to 7.
9. A medical system, characterized by include: An imaging body, a bed, and the computer device of claim 8, wherein the imaging body has a scanning cavity into which the bed is moved, the imaging body is connected to the computer device, and the imaging body is capable of acquiring human image data.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the bile duct segmentation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
CT image lung vessel segmentation method and system based on deep learning
CN111091573A