Segmentation method of tumor region in medical image, computer equipment and storage medium

By using the dynamic Monte Carlo algorithm to screen high-quality seed points, combining the watershed algorithm and deep Q network to optimize the segmentation results, and using the average link algorithm for clustering, the problem of tumor segmentation result deviation in the existing technology is solved, and accurate segmentation of the head and neck tumor area is achieved.

CN120807556AActive Publication Date: 2025-10-17HUABORON NEUTRON TECH (HANGZHOU) CO LTD

Patent Information

Application Number
CN202511308315.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-10-17
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing medical image tumor segmentation methods have segmentation result deviations, especially in images with complex grayscale distribution and blurred boundaries, which are prone to over-segmentation or under-segmentation. Existing methods are also sensitive to noise and fine textures, making it difficult to accurately segment complex head and neck tumor areas.

Method used

The dynamic Monte Carlo algorithm is used to select voxels with extremely small local grayscale values ​​as seed points of the watershed algorithm. The deep Q network is combined to merge the segmentation results, and the average link algorithm is used for clustering. The texture feature data is used to optimize the segmentation results.

Benefits of technology

The accuracy and speed of tumor region segmentation are improved, especially in complex head and neck cancer malignant tumor areas, which reduces the over-segmentation problem and eliminates noise interference, thereby improving the accuracy of the segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807556A_ABST
    Figure CN120807556A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical images, and discloses a segmentation method of a tumor region in a medical image, computer equipment and a storage medium, and the method comprises the steps: obtaining a to-be-segmented medical image, and carrying out the random sampling and local search based on the to-be-segmented medical image, and obtaining a target voxel with a minimum local gray value; secondly, taking the target voxels as seed points of a watershed algorithm, and performing watershed algorithm segmentation on the to-be-segmented medical image to obtain a preliminary segmentation result; thirdly, combining and optimizing the candidate segmentation regions in the preliminary segmentation result by utilizing texture feature data of the candidate segmentation regions to obtain an intermediate segmentation result; and finally, clustering the intermediate segmentation results to obtain a target segmentation result corresponding to the tumor region so as to ensure the accuracy of the segmentation result of the tumor region.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical images, in particular to a tumor region segmentation method in a medical image, a computer device and a storage medium. BACKGROUND

[0002] Tumor region image segmentation can provide an important basis for doctors to develop treatment plans. In related technologies, medical image tumor segmentation methods mainly include threshold segmentation method, region growing method, etc. The threshold segmentation method is a segmentation method based on image gray value. For images with complex gray distribution and fuzzy boundaries, the segmentation effect is not ideal, and over-segmentation or under-segmentation may occur. The region growing method is sensitive to the selection of seed points, and the design of the growth criterion needs to fully consider the characteristics of tumors in certain body parts, otherwise the deviation of the segmentation result may be caused. Therefore, it is urgent to propose a new tumor region segmentation method in a medical image. SUMMARY

[0003] The present application provides a tumor region segmentation method in a medical image, a computer device and a storage medium, which solves the technical problem of deviation of tumor segmentation results in medical images in related technologies, and achieves the technical effect of improving the accuracy of segmentation results.

[0004] In order to achieve the above purpose, the present application provides a tumor region segmentation method in a medical image, which comprises: acquiring a to-be-segmented medical image, performing random sampling and local search based on the to-be-segmented medical image to obtain a target voxel with a local minimum gray value as a seed point of a watershed algorithm; performing watershed algorithm segmentation on the to-be-segmented medical image based on the seed point to obtain a preliminary segmentation result; wherein the candidate segmentation region in the preliminary segmentation result has texture feature data; merging and optimizing the candidate segmentation region in the preliminary segmentation result by using the texture feature data of the candidate segmentation region to obtain an intermediate segmentation result; and clustering the intermediate segmentation result to obtain a target segmentation result corresponding to the tumor region.

[0005] Optionally, the random sampling and local search based on the to-be-segmented medical image to obtain a target voxel with a local minimum gray value comprises: performing normalization preprocessing on the to-be-segmented medical image according to the gray values of each voxel in the to-be-segmented medical image to obtain a normalized result; and performing random sampling and local search on the normalized result by a dynamic Monte Carlo algorithm to obtain the target voxel.

[0006] Optionally, the random sampling and local search on the normalized result by a dynamic Monte Carlo algorithm to obtain the target voxel comprises: randomly sampling according to the normalized result to obtain a preset number of preliminary voxels; wherein the preliminary voxel has a current statistical number of being randomly selected as a local minimum value; selecting any preliminary voxel to be reserved with a probability of the reciprocal of the current statistical number, updating the current statistical number corresponding to the any preliminary voxel to obtain an updated statistical number in the current round; performing local search on the gray value of the any preliminary voxel in the preset number of preliminary voxels to obtain a local search result; wherein the local search result comprises a preliminary voxel with a local minimum gray value in the current round; if the iteration process is completed, sorting according to the updated statistical number of the preliminary voxel in the last round to obtain the target voxel satisfying the preset sorting requirement.

[0007] Optionally, the local search based on the gray value of the any preliminary voxel in the preset number of preliminary voxels to obtain a local search result comprises: determining a specified number of other preliminary voxels around the any preliminary voxel in the preset number of preliminary voxels; performing local search based on the gray value of the any preliminary voxel and the gray values of the specified number of other preliminary voxels to obtain the local search result.

[0008] Optionally, the texture feature data comprises contrast index data, uniformity index data, homogeneity index data and entropy index data; and the merging optimization of the candidate segmentation region in the preliminary segmentation result by using the texture feature data of the candidate segmentation region to obtain an intermediate segmentation result comprises: for two adjacent candidate segmentation regions in the preliminary segmentation result, performing merging evaluation by using the contrast index data, uniformity index data, homogeneity index data and entropy index data of the two candidate segmentation regions respectively to obtain a merging evaluation result between the two candidate segmentation regions; wherein the merging evaluation result is used to describe whether the two candidate segmentation regions perform a merging operation or a non-merging operation; and performing merging optimization on the preliminary segmentation result according to the merging evaluation result to obtain the intermediate segmentation result.

[0009] Optionally, the merging evaluation result between the two candidate segmentation regions is obtained by using the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of the two candidate segmentation regions respectively, including: determining texture feature difference data between the two candidate segmentation regions by using the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of the two candidate segmentation regions respectively; constructing a state space based on the texture feature difference data between the two candidate segmentation regions; and obtaining the merging evaluation result by estimating the state space through a target deep Q network.

[0010] Optionally, the intermediate segmentation result is obtained by estimating based on the texture feature data of the candidate segmentation region by using a target deep Q network; a reward function used for training the target deep Q network includes a first reward item and a second reward item; wherein the first reward item is a reward item for operation rationality judgment based on the change of gray value features before and after the merging of adjacent candidate segmentation regions; and the second reward item is a reward item for operation rationality judgment based on the change of similarity between the shape before and after the merging of adjacent candidate segmentation regions and the actual shape of the tumor.

[0011] Optionally, the adjacent candidate segmentation regions include a first candidate region and a second candidate region; the first reward item and the second reward item are determined by: using the first gray mean variance of the first candidate region before merging, the second gray mean variance of the second candidate region before merging, and the third gray mean variance of the first candidate region and the second candidate region after merging to judge the rationality of merging operation and non-merging operation, to obtain the first reward item; and using the first overlap degree between the merged region of the first candidate region and the second candidate region and the tumor label region, and the second overlap degree between the first candidate region and the tumor label region to judge the rationality of merging operation and non-merging operation, to obtain the second reward item.

[0012] Embodiments of the present application provide a computer device, comprising: a memory and a processor, which are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method of any one of the above embodiments.

[0013] Embodiments of the present application provide a computer readable storage medium, which stores computer instructions, and the computer instructions are used to make a computer execute the method of any one of the above embodiments.

[0014] In the embodiment of the present application, firstly, a to-be-segmented medical image is acquired, and random sampling and local search are performed based on the to-be-segmented medical image to obtain target voxels with locally minimum gray value; secondly, the target voxels are taken as seed points of a watershed algorithm to segment the to-be-segmented medical image by the watershed algorithm to obtain a preliminary segmentation result; then, candidate segmentation regions in the preliminary segmentation result are merged and optimized by using texture feature data of the candidate segmentation regions to obtain an intermediate segmentation result; finally, the intermediate segmentation result is clustered to obtain a target segmentation result corresponding to a tumor region. In the above process, the high-quality local minimum points are taken as the seed points of the watershed algorithm, which not only can reduce the over-segmentation problem, but also can exclude accidental noise minimum points and retain stable tumor region candidate points, thereby improving the accuracy of tumor segmentation at the first level, and on this basis, the preliminary segmentation result is optimized to improve the accuracy of tumor region segmentation at the second level, so as to ensure the accuracy of the tumor region segmentation result. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0016] Figure 1a A flowchart of a medical image tumor region segmentation method provided by the embodiment of the present application is shown in the figure. Figure 1b A flowchart of an average link algorithm provided by the embodiment of the present application is shown in the figure. Figure 2 A flowchart of a medical image tumor region segmentation method provided by the embodiment of the present application is shown in the figure. Figure 3a A flowchart of a medical image tumor region segmentation method provided by the embodiment of the present application is shown in the figure. Figure 3b A process diagram for determining local gray value minimum based on the principle of Monte Carlo algorithm provided by the embodiment of the present application is shown in the figure. Figure 4a A diagram of four directions provided by the embodiment of the present application is shown in the figure. Figure 4b A flowchart of a medical image tumor region segmentation method provided by the embodiment of the present application is shown in the figure. Figure 5a A flowchart of a medical image tumor region segmentation method provided by the embodiment of the present application is shown in the figure. Figure 5bA schematic diagram of a DQN learning framework provided for an embodiment of the present application; Figure 5c A schematic diagram of a DQN training process provided for an embodiment of the present application; Figure 6 A structural schematic diagram of a computer device provided for an embodiment of the present application. DETAILED DESCRIPTION

[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0018] In the related art, due to the particularity of some body parts, image segmentation for tumors of these body parts faces many challenges. Taking the head and neck as an example, first, the boundary between the malignant tumor and the surrounding normal tissue on the computed tomography (CT) image may not be clear, increasing the difficulty of positioning; second, the skeletal structure of the head and neck region is complex, and these skeletal structures will produce different degrees of artifacts on the CT image, affecting the positioning of the tumor; third, the tumor morphology and size of different parts of the head and neck vary greatly, and this diversity makes it difficult to use a unified standard to locate the tumor; finally, the growth and spread of malignant tumors will cause changes in their relationship with the surrounding tissues, making the morphology and position of these tissues on the CT image change, thereby affecting tumor positioning.

[0019] In addition to the threshold segmentation method and region growing method mentioned in the background, the tumor segmentation method based on machine learning in the related art mainly includes support vector machine (SVM) and convolutional neural network (CNN). Among them, SVM is a binary classification model, and its processing capability for high-dimensional data and complex sample distribution is limited, and the performance of the model is sensitive to the selection of kernel functions and parameter adjustment; the convolutional neural network automatically extracts the features of the image through the combination of convolutional layers, pooling layers, and fully connected layers, but the training of the convolutional neural network requires a large amount of labeled data, and the model complexity is high, which is prone to overfitting. In addition, the watershed algorithm can also be used for tumor segmentation, but it is sensitive to noise and fine texture, and is prone to over-segmentation.

[0020] Based on the above analysis, the embodiment of the present application provides a method for segmenting a tumor region in a medical image. In the method process, first, a Monte Carlo algorithm with dynamic sampling strategy is used to statistically determine the most likely local minimum gray value voxel as the catchment basin seed. Second, the catchment basin seeds are used to perform a watershed algorithm to obtain a segmentation result. Third, a deep Q network (DQN) calculation framework is used to merge the segmentation results. Finally, an average linkage algorithm is used to separate the tumor region. The embodiment of the present application combines the dynamic Monte Carlo algorithm, the watershed algorithm, the deep Q network, and the average linkage algorithm to segment the tumor region. Compared with the algorithm process in the related art, the embodiment of the present application is more accurate in tumor region segmentation and faster in calculation, especially for complex head and neck cancer tumor regions.

[0021] Please refer to Figure 1a The method for segmenting a tumor region in a medical image provided by the embodiment of the present application includes the following steps: S110, obtaining a medical image to be segmented, performing random sampling and local search based on the medical image to be segmented, and obtaining a target voxel with a local minimum gray value as a seed point of a watershed algorithm.

[0022] The medical image to be segmented can be three-dimensional CT data in DICOM format, which contains gray value information of multiple slice images. The medical image to be segmented can include a head and neck CT scan image of a patient, which contains gray value distribution to reflect the density difference of different tissues. The tumor region can be a lesion region that needs to be identified and segmented in the medical image, and the gray value or texture feature thereof is usually significantly different from that of normal tissue. For example, in a head and neck cancer CT image, the gray value or texture feature of the tumor region is contrasted with that of normal tissue.

[0023] The target voxel can be a voxel that is confirmed to have a local minimum gray value after random sampling and local search, which is used as a seed point of the watershed algorithm. For example, the gray value of the target voxel can be significantly lower than that of the surrounding voxels, and it is verified as a stable minimum value point by sampling and searching.

[0024] The seed point of the watershed algorithm can be a starting point for initializing region segmentation in the watershed algorithm, and each seed point corresponds to a catchment basin (region). For example, in a three-dimensional CT image, the seed points can be distributed in the potential low gray region of the tumor region, thereby guiding the watershed algorithm to gradually expand to the boundary of the segmentation region.

[0025] Specifically, the original image data is read from a medical imaging device (such as a CT machine) or a digital image storage system and loaded into a computer system for processing. A number of voxels are selected as initial candidate points based on the medical image to be segmented in a random selection manner. For example, random sampling can use the Mason rotation algorithm to generate random coordinates, thereby selecting 5000 voxels uniformly distributed in the image space. Based on the randomly sampled voxels, local minimum points are found by comparing the gray value of any voxel with that of its neighborhood voxels. For example, the local search can use a 26-neighborhood (up, down, left, right, front, back, etc. in three-dimensional space) as the range, and gradually move towards the voxel with the lowest gray value until a voxel is found whose gray value is lower than that of all its neighborhood voxels, thereby determining that the voxel is a local minimum point. In this embodiment, by screening out high-quality local minimum points as seed points for the watershed algorithm, not only can the over-segmentation problem be reduced, but also accidental noise minimum points can be excluded and stable tumor region candidate points can be retained.

[0026] S120, performing watershed algorithm segmentation on the medical image to be segmented based on the seed points to obtain a preliminary segmentation result.

[0027] The candidate segmentation region in the preliminary segmentation result has texture feature data. The watershed algorithm segmentation refers to a technique that simulates the "water filling" process to divide the image into multiple catchment basins (regions). The candidate segmentation region can be a region that needs to be further optimized in the preliminary segmentation result, which can contain tumor tissue or normal tissue. For example, the candidate segmentation region can include multiple small regions with low gray values, some of which belong to tumors and others belong to normal tissue or noise.

[0028] Specifically, the target voxel with the local minimum gray value is taken as the starting point of the initialization region segmentation, and the gray values of the medical image to be segmented are sorted, and then the adjacent voxels are gradually labeled from the seed point until all voxels are assigned to a catchment basin, thereby obtaining multiple candidate segmentation regions, i.e. the preliminary segmentation result. The texture feature data can be a feature parameter extracted by analyzing the gray level co-occurrence matrix (GLCM) or other texture statistical methods of the candidate segmentation region, which describes the texture characteristics of the region through the texture feature data. For example, the texture feature data can include contrast, uniformity, entropy, homogeneity, etc. These indicators reflect the spatial distribution of the region's gray values.

[0029] Exemplarily, the calculation process of the watershed algorithm includes two steps, i.e. the sorting process and the flooding process.

[0030] In the sorting process, based on the gray value h of each voxel in the medical image to be segmented, and from low to high sorting, the sorting result is put into a one-dimensional array. For example, from all the voxels of a three-dimensional CT image, there are N gray values, that is, {h1, h2, …… hn}, where n∈[1, N]. After sorting, the sequence H0 is obtained, denoted as [hmin, …… h1, …… hmax]. Where hmin is the minimum gray value, and hmax is the maximum gray value. The purpose of this step is to provide an ordered gray value sequence for the subsequent flooding process, so as to process the medical image to be segmented.

[0031] In the flooding process, in the initialization stage, a label is defined for each catchment basin seed (i.e. the target voxel with a local minimum gray value determined by the dynamic Monte Carlo algorithm) to distinguish different catchment basin regions; all target voxels representing seeds are added to a "first-in, first-out" F queue; then the following operations are repeatedly executed: 1) Take an unused gray value in sequence HO as the threshold Gth of this iteration; 2) Take a voxel from the F queue, denoted as T0; 3) Check the neighborhood voxels T1-T26 (i.e. the 26 voxels around) of the voxel T0, if the gray value of a neighborhood voxel (such as T12) is less than or equal to the current gray value threshold Gth and has not been marked, mark it T12 as the same catchment basin as the current voxel T0, and add it T12 to the queue F. If a voxel has been marked, it is not added to the F queue; 4) Repeat step 2) until the queue is empty or all voxels are marked; 5) Repeat step 1) until all gray values are used as thresholds, i.e. until hmax.

[0032] After the completion of the flooding process, all voxels containing different catchment basin labels are the watershed, i.e. the three-dimensional CT image is segmented into different candidate regions by voxels containing different catchment basin labels. For example, if there are 500 seed points, there are 500 candidate regions, and the candidate region set can be denoted as r, represented as [r1, r2, ……, ri], where i∈[1, 500].

[0033] S130, using the texture feature data of the candidate segmentation region to merge and optimize the candidate segmentation region in the preliminary segmentation result, to obtain an intermediate segmentation result.

[0034] In some cases, the medical image to be segmented can be quickly segmented into multiple regions by using the watershed algorithm, but over-segmentation may occur due to uneven distribution of seed points, and therefore further optimization is needed. Specifically, by comparing the texture feature data of the candidate segmentation regions, it is determined whether they should be merged into one region, thereby reducing the problem of over-segmentation or under-segmentation. For example, the segmentation accuracy can be improved by dynamically adjusting the region merging strategy through a machine learning model. Exemplarily, the merging optimization can be to evaluate the texture feature difference between two regions by using a deep Q network (DQN), and if the difference is small and the gray variance is reduced after merging, the merging operation is performed. After the merging optimization, the number of candidate regions of the segmentation result is reduced compared with the preliminary segmentation result, and the shape is closer to that of the real tumor region. For example, the intermediate segmentation result can include merging at least two small regions into one connected tumor region; the intermediate segmentation result can also include merging at least two small regions into one connected normal tissue region.

[0035] S140, clustering the intermediate segmentation result to obtain a target segmentation result corresponding to the tumor region.

[0036] The clustering can be a statistical method of dividing the candidate segmentation regions into tumor tissue clusters and normal tissue clusters based on the texture feature data of the candidate segmentation regions. For example, the Average Linkage algorithm can be used to gradually merge regions with high similarity by calculating the Euclidean distance between regions.

[0037] Specifically, the tumor tissue is separated from the intermediate segmentation result by the clustering method. For example, the target segmentation result can determine that the cluster with fewer regions is a tumor region, and the cluster with more regions is normal tissue, thereby clearly identifying the tumor tissue and the normal tissue, and further completing the accurate segmentation of the tumor region. In this embodiment, the regions in the intermediate segmentation result are divided into two categories based on the similarity of the texture features, and the tumor tissue is determined by the number of regions, thereby outputting a clinically usable segmentation result.

[0038] Exemplarily, in this embodiment, the Average Linkage algorithm of the Agglomerative Hierarchical Clustering is used to gather all tumor tissue regions and normal tissue regions together, thereby realizing the final identification of the tumor tissue.

[0039] The core idea of the Average Linkage algorithm is that the distance between two clusters is equal to the average distance of all sample pairs in the two clusters, and the formula is as follows: wherein, and are two clusters, and | is the number of regions in the cluster, is the region and region distance, ∈ , ∈ .

[0040] wherein the attribute of the region to be clustered is denoted as RV = [Vθ1, Vθ2, Vθ3, Vθ4]. The distance between regions is calculated using the Euclidean distance, and the formula is as follows: wherein, is the attribute of the region , such as a 16-dimensional texture feature, is the attribute of the region .

[0041] Referring to Figure 1b , the calculation process of the average linkage algorithm is exemplarily explained. The clustering result is set to two clusters, each sample is initially considered as an independent cluster, the average distance is calculated between all clusters two by two, the two clusters with the smallest average distance are selected and merged, it is judged whether there are two clusters left, if yes, the cluster with fewer members is determined as the malignant tumor tissue, if not, the average distance is calculated again between the remaining clusters two by two, the above steps are repeated until there are two clusters left.

[0042] In the above embodiment, firstly, a medical image to be segmented is acquired, and random sampling and local search are performed based on the medical image to be segmented to obtain target voxels with locally minimum gray value; secondly, the target voxels are taken as seed points of a watershed algorithm to perform watershed algorithm segmentation on the medical image to be segmented to obtain a preliminary segmentation result; then, the texture feature data of the candidate segmentation region is used to perform merging optimization on the candidate segmentation region in the preliminary segmentation result to obtain an intermediate segmentation result; finally, clustering is performed on the intermediate segmentation result to obtain a target segmentation result corresponding to the tumor region. In the above process, the high-quality local minimum value points are used as the seed points of the watershed algorithm, which not only can reduce the over-segmentation problem, but also can exclude accidental noise minimum value points, retain stable tumor region candidate points, improve the accuracy of tumor segmentation at the first level, and on this basis, optimize the preliminary segmentation result to improve the accuracy of tumor region segmentation at the second level, thereby ensuring the accuracy of the tumor region segmentation result.

[0043] In some embodiments, referring to Figure 2 , random sampling and local search are performed based on the medical image to be segmented to obtain target voxels with locally minimum gray value, comprising: S210, performing normalization preprocessing on the to-be-segmented medical image according to the gray value of each voxel in the to-be-segmented medical image, to obtain a normalized result.

[0044] Specifically, the gray value of each voxel in the to-be-segmented medical image, the maximum gray value and the minimum gray value in the to-be-segmented medical image are determined. The gray value of each voxel in the to-be-segmented medical image is mapped to between 0 and 1 by using the maximum gray value and the minimum gray value, to obtain the normalized result.

[0045] It can be understood that a voxel is the smallest unit that constitutes a three-dimensional space of a CT image. Each voxel in the CT image has a corresponding gray value (Hounsfield Unit, HU). The maximum and minimum values of the gray values of all voxels are normalized, that is, the gray values of the image are mapped to between 0 and 1, to eliminate the gray differences between different images and improve the stability and generalization ability of the algorithm. The normalization formula is as follows: where h is the original gray value of the voxel in the to-be-segmented medical image, is the minimum gray value in the to-be-segmented medical image, is the maximum gray value in the to-be-segmented medical image, is the normalized result.

[0046] S220, randomly sampling and locally searching the normalized result by a dynamic Monte Carlo algorithm to obtain a target voxel.

[0047] The dynamic Monte Carlo algorithm refers to a method combining random sampling and probability selection to screen local minimum points in the normalized medical image. For example, the dynamic Monte Carlo algorithm can generate random coordinates in combination with the Mason rotation algorithm, iteratively sample the image multiple times, and dynamically adjust the sampling strategy according to the frequency of the voxel being selected as a local minimum value, so as to preferentially retain local minimum points with high stability.

[0048] Specifically, the gray differences between different voxels are eliminated by normalization to provide a unified data basis for subsequent random sampling and local searching. The normalized result is randomly sampled and locally searched by the dynamic Monte Carlo algorithm to screen high-quality local minimum points as seed points of the watershed algorithm, thereby reducing the over-segmentation problem. For example, the dynamic Monte Carlo algorithm preferentially retains local minimum points with high frequency by multiple iterations and probability selection mechanism. These points are more likely to correspond to the true boundary of the tumor region, while low-frequency points are likely to be determined as noise or pseudo-minimum points and excluded.

[0049] In the above embodiments, firstly, the normalization preprocessing is used to avoid the segmentation deviation caused by the inconsistent gray value range, and secondly, the dynamic Monte Carlo algorithm is used to preferentially retain the local minimum value points with high frequency, so as to reduce the influence of noise interference on the quality of the seed points.

[0050] In some embodiments, referring to Figure 3a , the target voxels are obtained by random sampling and local search on the normalized result through the dynamic Monte Carlo algorithm, including: S310, randomly sampling according to the normalized result to obtain a preset number of preliminary voxels.

[0051] The preliminary voxels have a current statistical number of being randomly selected as local minimum values. The preset number of preliminary voxels can be an initial candidate voxel set randomly sampled from the normalized medical image. The initial candidate voxel set includes the preset number of preliminary voxels. For example, the preset number can be 5000, and these voxels are uniformly distributed in the image by randomly selecting the coordinates generated by the Mason rotation algorithm as the starting point for subsequent local search.

[0052] The current statistical number can be a statistical value of the number of times that each preliminary voxel is randomly selected and participates in local search, which is used to measure the stability of the local minimum value. For example, if a voxel is selected in multiple iterations, its current statistical number will gradually increase, indicating that it is more likely to correspond to a real local minimum value. It should be noted that the current statistical number is denoted as c, and the initial value of c can be equal to 1.

[0053] Specifically, the image space is covered by uniform distribution random sampling to provide candidate points for subsequent local search. The diversity of local minimum value points is ensured by random sampling to avoid segmentation deviation caused by over-dense or over-sparse local regions.

[0054] S320, selecting any preliminary voxel to be retained with the reciprocal of the current statistical number as the probability, updating the current statistical number corresponding to any preliminary voxel to obtain the updated statistical number in the current round.

[0055] The updated statistical number can be the result of the incremental operation on the current statistical number of the retained preliminary voxel, which is used to record its contribution in the current round of iteration. For example, if a voxel is retained in the current round, its updated statistical number is equal to , thereby strengthening its possibility as a seed point.

[0056] Specifically, in order to strengthen the contribution of high-stability voxels, which are more likely to be retained in subsequent iterations, the probability of being retained is dynamically adjusted according to the current statistical number of the preliminary voxel, so as to give priority to the local minimum points with high stability. For example, if the current statistical number of a voxel is c, the probability of being retained is 1 / c. If c is large (such as c=10), the retention probability is low (0.1), and vice versa, if c is small (such as c=1), the retention probability is high (1.0). This mechanism filters low-frequency false minimum points through probability selection and retains high-frequency true minimum points.

[0057] S330, based on the gray value of any preliminary voxel, local search is performed in a preset number of preliminary voxels to obtain a local search result.

[0058] The local search result includes the preliminary voxel with the local minimum gray value in the current round. Specifically, the process of gradually finding the local minimum point is started from the retained preliminary voxel, and the gray values of the neighborhood voxels are compared.

[0059] In some embodiments, based on the gray value of any preliminary voxel, local search is performed in a preset number of preliminary voxels to obtain a local search result, including: in the preset number of preliminary voxels, a specified number of other preliminary voxels around any preliminary voxel are determined; based on the gray value of any preliminary voxel and the gray values of the specified number of other preliminary voxels, local search is performed to obtain a local search result.

[0060] In this embodiment, the specified number can be equal to 26, or for the purpose of reducing the amount of calculation, the specified number can be less than 26. Exemplarily, the local search can adopt a 26-neighborhood strategy (up, down, left, right, front, back, etc. in three-dimensional space), starting from the current voxel, finding the neighborhood voxel with the minimum gray value, and repeating the process until a voxel is found whose gray value is lower than all 26 neighborhood voxels, thereby determining the voxel as a local minimum point. The set of preliminary voxels with the local minimum gray value is confirmed in the current round of iteration through local search. For example, in each round of iteration, the local search result may contain several voxels, whose gray values are significantly lower than the surrounding voxels, and their stability is verified through multiple iterations.

[0061] S340, if the iteration process of the above steps is completed, the preliminary voxels are sorted according to the updated statistical number in the last round to obtain target voxels that meet the preset sorting requirements.

[0062] Specifically, in the multi-round execution process of the dynamic Monte Carlo algorithm, through repeated random sampling, probability selection, local search and statistical number updating, a high-quality local minimum point set is gradually converged. For example, the iterative process can perform N rounds, and the retention probability is adjusted according to the updated statistical number in each round, and finally the most stable local minimum point is screened out. Among them, the preset sorting requirement refers to the rule of sorting the updated statistical number of the preliminary voxel in the last round of iteration, which is used to determine the final seed point set. For example, the preset sorting requirement can be arranged in descending order according to the updated statistical number, and the top 500 voxels are taken as the target voxels (i.e. the seed points of the watershed algorithm).

[0063] Please refer to Figure 3b , which exemplarily illustrates the process of determining the local gray value minimum based on the principle of Monte Carlo algorithm.

[0064] Define that each voxel has 5-dimensional attributes v = [x, y, z, h, c] in the Cartesian product coordinate system.

[0065] Among them, x, y, z are the coordinates of X axis, Y axis and Z axis respectively. For example, for a medical image to be segmented with a length of N pixels, a width of M pixels and a thickness of L pixels, x ∈ [1, N], y ∈ [1, M], z ∈ [1, L], and the total number of voxels is N*M*L. h is the result of normalizing the voxel gray value. c is the statistical number of voxels randomly selected as local minimum.

[0066] Take a three-dimensional CT image as an example to illustrate the process of segmenting a medical image. First, use the Mason rotation algorithm to generate random coordinate values in the x, y and z directions, thereby randomly sampling 5000 voxels Tw in the three-dimensional CT image space, where w ∈ [1, 5000].

[0067] Take the reciprocal of the selected voxel c value (i.e. 1 / c) as the probability for selection: whether the selected voxel is retained as the random result of this time. If retained, the voxel is subjected to subsequent steps; otherwise, the voxel is discarded. The c value of each retained voxel Tw is incremented by 1.

[0068] Secondly, perform local search, i.e. take the selected voxel Tw0 as the starting point to find the voxel Tw1 with the smallest gray value among the 26 voxels around it. After finding the voxel Tw1, continue to find the voxel Tw2 with the smallest gray value among the 26 voxels around Tw1, and so on, until a voxel Twi is found whose gray value is smaller than that of all the 26 voxels around it. Twi is the final result of local search (with the smallest gray value). All search results are local minimum values randomly selected this time, i.e. the seeds of the catchment basin (segmentation region) of the watershed algorithm.

[0069] Then, the next iteration operation of randomly sampling W voxels is performed until the iteration is performed for a preset number of times.

[0070] Finally, all the voxels are arranged in descending order of the c value, and the top 500 voxels are taken as the seed of the catchment basin required by the subsequent watershed algorithm.

[0071] In the above embodiment, after a preset number of preliminary voxels are randomly sampled, low-frequency false minimum value points are filtered through a dynamic probability mechanism, and high-frequency true minimum value points are retained. After multiple iterations, the statistical number of high-frequency voxels is significantly increased, further consolidating their status as seed points. Through local search, it is ensured that the gray value of the voxel is significantly lower than that of the surrounding voxels, thereby reducing noise interference and excluding false judgments caused by neighborhood gray fluctuation. Finally, a high-quality seed point set is screened based on multiple rounds of iteration, which can effectively guide the watershed algorithm to segment the tumor region and reduce the problem of over-segmentation.

[0072] In some embodiments, the texture feature data includes contrast index data, uniformity index data, homogeneity index data, and entropy index data. For each candidate segmentation region, there are four gray level indicators: contrast (Contrast), uniformity (Uniformity), homogeneity (Homogeneity), and entropy (Entropy). Since the CT image has low resolution in the Z-axis direction, the embodiments of the present application use a two-dimensional gray level co-occurrence matrix (2D Gray Level Co-occurrence Matrix, GLCM) to statistically calculate the four indicators in the X-axis and Y-axis directions to represent the texture features of the corresponding region.

[0073] The GLCM is a matrix of size N x N (N is the number of different gray values after image normalization). For a pixel pair , the matrix element represents the frequency of the simultaneous occurrence of a pixel with a gray value of i and a pixel with a gray value of j in the directionɵand at a distance d. The specific calculation steps are as follows: Step 1: Set the directionɵand the distance d.

[0074] The direction is set to four directionsɵ∈{ɵ1, ɵ2, ɵ3, ɵ4}, and the distance is set to one pixel. Please refer to Figure 4a , the four directions are shown in Figure 4a .

[0075] Step 2: Traverse the entire image and count the number of pixel pairs that satisfy the directionɵand the distance d.

[0076] Step 3: Normalize the statistical results to obtain the probability matrix: The following four indicators are obtained using GLCM: 1) Contrast: Its physical meaning is to reflect the intensity of local changes in the image. The larger the value, the clearer the texture. The formula is as follows: 2) Uniformity: Its physical meaning is to reflect the uniformity of the grayscale distribution of the image. The larger the value, the more uniform the texture. The formula is as follows: 3) Entropy: Its physical meaning is to reflect the complexity of the image. The larger the value, the more complex the texture. The formula is as follows: 4) Homogeneity: Its physical meaning is to reflect the local similarity of the image. The larger the value, the smoother the texture. The formula is as follows: The texture feature attributes Vɵ=[c,u,e,h] composed of the above four indicators in each direction are calculated, where c represents contrast, u represents uniformity, e represents entropy, and h represents homogeneity. Each candidate region r then has 16 attributes representing its texture features, namely: RV=[Vɵ1,Vɵ2,Vɵ3,Vɵ4] Accordingly, see Figure 4b , the texture feature data of the candidate segmentation area is used to merge and optimize the candidate segmentation areas in the preliminary segmentation result to obtain the intermediate segmentation result, including: S410: For two adjacent candidate segmentation regions in the preliminary segmentation result, use the contrast index data, balance index data, homogeneity index data and entropy index data of the two candidate segmentation regions to perform a combined evaluation to obtain a combined evaluation result between the two candidate segmentation regions.

[0077] The merge evaluation result is used to describe whether two candidate segmentation regions should be merged or not. Two adjacent candidate segmentation regions can be two regions that are spatially adjacent (e.g., share a boundary) in the preliminary segmentation results and may have similar grayscale or texture features. For example, in a CT image, two adjacent low-grayscale regions may belong to the same tumor region, while a low-grayscale region and a high-grayscale region may belong to different tissue types.

[0078] In some cases, since the selection of the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data is based on the statistical characteristics of the gray level co-occurrence matrix (GLCM), the texture distribution law of the region can be comprehensively reflected. For example, the contrast and the uniformity focus on describing the local change of the gray value, and the homogeneity and the entropy focus on describing the global distribution of the gray value, and the combination of the four can provide more robust basis for the similarity judgment of the region. Therefore, in the embodiment, the texture feature similarity of the two candidate segmentation regions is obtained by quantitatively comparing the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of the two candidate segmentation regions respectively; or in other words, the decision result of whether the two adjacent candidate segmentation regions should be merged into one region is determined by comparing the contrast, the uniformity, the homogeneity and the entropy index data of the two adjacent candidate segmentation regions. For example, if the contrast difference of the two regions is small, the uniformity difference is large, and the entropy difference is low, the merging evaluation result may determine that the operation is “merging”; otherwise, if the difference exceeds the threshold range, it is determined that the operation is “not merging”. For example, in the head and neck cancer CT image, the tumor region and the normal tissue have different performances in the above four indicators, and therefore the two types of regions can be effectively distinguished by merging evaluation.

[0079] S420, according to the merging evaluation result, the preliminary segmentation result is merged and optimized to obtain an intermediate segmentation result.

[0080] In some cases, since the watershed algorithm may cause over-segmentation problem, in order to improve the accuracy and integrity of the segmentation result, the preliminary segmentation result is dynamically adjusted for region division, the preliminary segmentation result is merged and optimized to obtain an intermediate segmentation result. Through merging optimization, the region division is ensured to be neither too rough (to retain the details of the tissue boundary) nor too fine (to avoid over-segmentation).

[0081] In the above embodiment, the multi-dimensional texture feature quantitative analysis is used to determine whether the adjacent regions belong to the same type of tissue, and the four indicators are considered comprehensively to avoid the limitation of a single indicator, which can improve the stability of the merging decision. Further, the preliminary segmentation result is merged and optimized based on the merging decision to reduce the problem of over-segmentation or under-segmentation.

[0082] In some embodiments, please refer to Figure 5a The merging evaluation of the two candidate segmentation regions is performed by using the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of the two candidate segmentation regions respectively to obtain the merging evaluation result between the two candidate segmentation regions, including: S510, the texture feature difference data between the two candidate segmentation regions is determined by using the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of the two candidate segmentation regions respectively.

[0083] Specifically, the texture feature difference data can be a set of difference values obtained by quantitatively comparing the contrast index data, the uniformity index data, the homogeneity index data and the entropy index data of two adjacent candidate segmentation regions. For example, the texture feature difference DVɵi of two adjacent candidate segmentation regions in a certain direction ɵi is defined as [dc, du, de, dh]. Wherein, dc represents the contrast difference value of the two adjacent candidate segmentation regions, du represents the uniformity difference value of the two adjacent candidate segmentation regions, de represents the entropy difference value of the two adjacent candidate segmentation regions, and dh represents the homogeneity difference value of the two adjacent candidate segmentation regions, i∈[1, 2, 3, 4].

[0084] S520, constructing a state space based on the texture feature difference data between the two candidate segmentation regions.

[0085] Wherein, the state space can be the texture feature difference data converted into an input form that can be processed by a machine learning model, used to describe the feature set of the current decision environment. The state space can be represented in the form of a vector as the input of the target deep Q network for predicting the operation value of merging or not merging. Specifically, the texture feature difference data between the two candidate segmentation regions is converted into the input form of the machine learning model, which is convenient for the target deep Q network to make decisions. For example, the texture feature difference vector can be standardized and input into the target deep Q network, so that it can extract high-order features through the neural network, thereby more accurately evaluating the rationality of the merging operation.

[0086] S530, estimating the state space by the target deep Q network to obtain a merging evaluation result.

[0087] Wherein, the target deep Q network refers to a reinforcement learning model that learns the policy of selecting the optimal action (merging or not merging) in a specific state through training. For example, the target deep Q network can be a network containing an input layer (4 neurons), a hidden layer (128 neurons, ReLU activation function) and an output layer (2 neurons, corresponding to the Q values of "merge" and "not merge" respectively).

[0088] Specifically, the reinforcement learning model is used to dynamically adjust the merging strategy to improve the adaptability of the segmentation result. For example, the target deep Q network learns through training that when the comprehensive score of the texture feature difference data is lower than a threshold, the "merge operation" is selected; when the difference data exceeds the threshold, the "non-merge operation" is selected, thereby reducing the over-segmentation or under-segmentation problem. The action space of the deep Q network can be represented as: a=[Merge, Miss] Wherein, Merge represents the merging operation, and Miss represents the non-merging operation.

[0089] The training process of the target deep Q network (DQN) is exemplarily explained. The DQN algorithm is based on the Q-learning method, and uses a deep neural network to estimate the Q value function, and the algorithm is defined as: wherein, represents the Q value of taking action a in state s; represents a learning rate for controlling the update step of the Q value; r is an immediate reward obtained after taking action a in state s; is a discount factor for weighing the importance of the immediate reward and the future reward; represents the next state the maximum Q value of the optimal action that can be taken in the next state

[0090] The calculation formula of the target Q value is as follows: wherein, represents the Q value estimated by the target network; represents the maximum Q value of the optimal action that can be taken in the next state by the target network.

[0091] The loss function uses the mean squared error (MSE) to minimize the prediction error of the Q value. In order to prevent the occurrence of local optimal results, the ε-greed strategy is adopted for action selection. That is, with the probability of ε, a random behavior is selected, and with the probability of (1-ε), the behavior is selected according to the Q value function .

[0092] A three-layer neural network is defined as , wherein the input layer includes 16 neurons corresponding to 16 elements of the state space; the hidden layer includes 128 neurons; and the output layer includes 2 neurons corresponding to the Q values of two actions in the action space. The learning framework of the DQN is as shown in Figure 5b . In the 4-tuple , is the state at the current time, is the behavior at the current time, is the reward for the behavior, is the next state after the behavior is performed. When is the merge behavior, then is the texture feature difference between the merged tile and the tile merged by the agent, and the merge result becomes a new agent; when a is the non-merge operation, then is the texture feature difference between the tile and the tile merged by the agent at the current time Consistent. Store each set of 4-tuple, can improve the sample usage rate, while reducing the sample relevance. Understandably, the segmentation area is the tile in the CT image.

[0093] Please refer to Figure 5c , randomly initialize the main network parameters , use as the initialization network parameters of the target network, start a learning round, randomly select a three-dimensional tile from the segmentation result which has not been merged and has not become an agent as the current agent, pair the current agent with a tile which has not been paired in this round, calculate the state s, get the action a by using the ε-greed strategy, determine the reward r, and get the new state , store the 4-tuple in the experience pool, judge whether the action is merging, if yes, the merged tile is the new agent, if no, in this round, whether the adjacent tiles of the agent have been paired and calculated, randomly extract a set of samples from the experience pool , calculate the Q value using the target network, perform MES operation with the Q value calculated by the main network to obtain the loss data (LOSS value), update the parameters of the main network using the gradient descent method, after this step, return to randomly extract other samples from the experience pool for iteration. After iterating x times, use the parameters of the main network as the new target network parameters. Return to randomly select a three-dimensional tile from the segmentation result which has not been merged and has not become an agent as the current agent for iteration, iterate y times, and end a learning round. Iterate z times, and start a new learning round again.

[0094] The formula of the mean square error loss function is as follows: Where N is the number of training samples, ) is the i-th state-action pair, is the value estimation of the state by the DQN according to the current main network parameters w, , and the corresponding target value calculated by the target network is .

[0095] Use stochastic gradient descent to update the parameter network parameters , and the parameter update formula is: Where is the parameter value at the current time t, is the learning rate, which controls the step size of parameter update, is the loss function at the parameter .

[0096] For the MSE loss function in DQN, the gradient is calculated as follows: By the backpropagation algorithm, the gradient of the loss function can be calculated as follows:

[0097] After the training of DQN, the final network parameters are obtained , and the complete normal tissue and tumor tissue of the human body are obtained by using the model to merge the segmentation results of all the watershed algorithms.

[0098] In some embodiments, the intermediate segmentation result is obtained by estimating the texture feature data of the candidate segmentation region based on the target deep Q network.

[0099] The reward function used to train the target deep Q network includes a first reward item and a second reward item. The first reward item is a reward item for judging the rationality of the operation based on the change in the gray value feature before and after the merging of adjacent candidate segmentation regions. The second reward item is a reward item for judging the rationality of the operation based on the change in the similarity between the shape before and after the merging of adjacent candidate segmentation regions and the actual shape of the tumor.

[0100] Specifically, the reward function used to train the target deep Q network is designed based on the rationality of the region merging behavior or the non-merging behavior. Specifically, the reward function R is composed of the following two parts: wherein is the first reward item, is the second reward item. α and β are weight coefficients, respectively representing the influence degree of the gray level-based reward and the shape similarity-based reward on the reward value, and can be taken as α = 0.5 and β = 0.5.

[0101] It should be noted that if the gray value of the merged region is more uniform, i.e. the gray variance is reduced, it is considered that the merging operation is reasonable, and a positive reward is given; otherwise, a negative reward is given; if the gray value of the merged region is more chaotic, i.e. the gray variance is increased, it is considered that the non-merging operation is reasonable, and a positive reward is given; otherwise, a negative reward is given.

[0102] It should be noted that if the similarity between the shape of the merged region and the true shape of the region is higher, it is considered that the merging operation is reasonable, and a positive reward is given; otherwise, a negative reward is given; if the similarity between the shape of the merged region and the true shape of the region is lower, it is considered that the non-merging operation is reasonable, and a positive reward is given; otherwise, a negative reward is given.​​​​

[0103] In some embodiments, the adjacent candidate segmentation regions include a first candidate region and a second candidate region; the first reward item and the second reward item are determined by: The first reward item is obtained by judging the rationality of the merging operation and the non-merging operation by using the first gray mean variance of the first candidate region before merging, the second gray mean variance of the second candidate region before merging, and the third gray mean variance of the first candidate region and the second candidate region after merging. The second reward item is obtained by judging the rationality of the merging operation and the non-merging operation by using the first overlap degree between the merged region of the first candidate region and the second candidate region and the tumor annotation region, and the second overlap degree between the first candidate region and the tumor annotation region.

[0104] In this embodiment, the first candidate region is denoted as region i, the first candidate region is denoted as region j, the first gray mean variance is denoted as , the second gray mean variance is denoted as , and the third gray mean variance is denoted as .

[0105] The first reward item can be defined as: In this embodiment, the Dice coefficient is used to measure the overlap degree (or overlap degree) between a region and the real region where it is located. The calculation formula of Dice is as follows: Where A represents the segmentation result of the tumor region, B represents the labeled tumor real region, The closer the coefficient is to 1, the more similar A and B are. A value greater than 0.7 is usually considered to meet the clinical use standard, and a value less than 0.5 indicates that the segmentation result is unreliable. Compared with the conventional accuracy index, Dice can effectively avoid the evaluation deviation caused by class imbalance.

[0106] The reward item based on can be defined as Wherein, is the merged region, is the first candidate region, that is, the intelligent agent. The function of the reward item is to reward the behavior that increases or does not decrease the coefficient. If the coefficient increases to 0.7 or above, a great reward is given; if the ​A significant penalty is imposed if the coefficient drops below 0.5.

[0107] It should be emphasized that, because the candidate segmentation regions in this embodiment are in a dynamically adjusted state, the agent in this embodiment is used to refer to each of the candidate segmentation regions obtained by the watershed algorithm. After the merge operation is performed, the merged region obtained by merging the candidate segmentation regions can be regarded as a new agent. Accordingly, the difference data between adjacent segmentation regions can be understood as the environment in which the agent resides.

[0108] The present application also provides a device for segmenting a tumor region in a medical image. The device comprises: A seed point determination module is used to obtain the medical image to be segmented, perform random sampling and local search based on the medical image to be segmented, and obtain the target voxel with the minimum local grayscale value as the seed point of the watershed algorithm; A preliminary segmentation module is used to perform watershed segmentation on the medical image to be segmented based on the seed points to obtain a preliminary segmentation result; wherein the candidate segmentation regions in the preliminary segmentation result have texture feature data; A merging and optimization module is used to merge and optimize the candidate segmentation regions in the preliminary segmentation result using the texture feature data of the candidate segmentation regions to obtain an intermediate segmentation result; The regional clustering module is used to cluster the intermediate segmentation results to obtain the target segmentation results corresponding to the tumor area.

[0109] The further functional description of each of the above modules is the same as that of the corresponding embodiment above and is not repeated here. The segmentation device in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0110] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 6As shown, the computer device includes one or more processors 10, memory 20, and interfaces 50 for external devices such as modems and network interfaces. One or more external devices are present, such as display devices, keyboards, mice, speakers, microphones, printers, joysticks, and the like. The computer device optionally has a storage device, such as a disk drive, a flash drive, or a combination thereof, for storing data and programs. The computer device has sufficient storage available to store a number of applications, programs, and / or data structures. Figure 6 The processor 10 is used in the description as an example.

[0111] The processor 10 can be a central processing unit, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.

[0112] The memory 20 stores instructions that can be executed by the at least one processor 10, so that the at least one processor 10 implements the method shown in the above embodiments.

[0113] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system, application programs required by at least one function, and the like. The data storage area can store data created according to the use of the computer device, and the like. In addition, the memory 20 can include a high-speed random access memory, and can further include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory disposed remotely with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0114] The memory 20 can include a volatile memory, such as a random access memory, and can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk. The memory 20 can further include a combination of the above-mentioned kinds of memories.

[0115] The computer device further includes input devices 30 and output devices 40. The processor 10, the memory 20, the input devices 30, and the output devices 40 can be connected through a bus or other means,Figure 6 The bus connections are exemplary only. Generally, the bus performs logically similar functions as its older counterpart. However, in the context of the present application, the bus is the means by which the computer device is connected to other devices or networks.

[0116] The input device 30 can receive input of digital or character information, and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The display device includes, but is not limited to, a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device can be a touch screen. The computer device further includes a communication interface for communication of the computer device with other devices or communication networks.

[0117] The embodiments of the present application further provide a computer readable storage medium, and the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code stored in a remote storage medium or a non-transitory machine readable storage medium and stored in a local storage medium to be downloaded through a network, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid state disk, etc. Further, the storage medium can also include a combination of the above-mentioned memories. It can be understood that the computer, the processor, the microprocessor controller, or the programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0118] The embodiments of the present application provide a computer program product, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any of the embodiments of the present application.

[0119] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be suggested by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes are intended to fall within the scope of the appended claims.

[0120] It should also be noted that the terms "comprises" and / or "comprising", or "includes" and / or "including" when used in this specification, specify the presence of stated features, integers, steps, operations, elements, or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof. In the context of the specification, the term "and / or" means "and" or "or", and the term "or" means "and" or "or". In the context of the specification, the term "exemplary" means "example" or "an example of".

[0121] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each of the embodiments focuses on the difference from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.

[0122] The above only describes the embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

[0123] Although the embodiments of the present application are described in conjunction with the drawings, those skilled in the art can make various modifications and changes without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A method for segmenting tumor regions in medical images, characterized in that: The method comprises: Acquire a medical image to be segmented, perform random sampling and local search based on the medical image to be segmented, and obtain a target voxel with a minimum local grayscale value as a seed point of a watershed algorithm; Performing watershed segmentation on the medical image to be segmented based on the seed points to obtain a preliminary segmentation result; wherein the candidate segmentation region in the preliminary segmentation result has texture feature data; Merging and optimizing the candidate segmentation regions in the preliminary segmentation result using the texture feature data of the candidate segmentation regions to obtain an intermediate segmentation result; The intermediate segmentation results are clustered to obtain a target segmentation result corresponding to the tumor area.

2. The method according to claim 1, characterized in that The method of performing random sampling and local search based on the medical image to be segmented to obtain a target voxel with a minimum local grayscale value includes: performing normalization preprocessing on the medical image to be segmented according to the grayscale value of each voxel in the medical image to be segmented to obtain a normalized result; The target voxel is obtained by performing random sampling and local search on the normalized result through a dynamic Monte Carlo algorithm.

3. The method according to claim 2, characterized in that The step of randomly sampling and locally searching the normalized result by a dynamic Monte Carlo algorithm to obtain the target voxel comprises: Performing random sampling based on the normalized result to obtain a preset number of preliminary voxels; wherein the preliminary voxels have a current statistical number of times they are randomly selected as local minima; Any preliminary voxel is selected to be retained with the reciprocal of the current statistical number as the probability, and the current statistical number corresponding to the any preliminary voxel is updated to obtain the updated statistical number in the current round; Performing a local search among the preset number of preliminary voxels based on the grayscale value of any preliminary voxel to obtain a local search result; wherein the local search result includes the preliminary voxel with the smallest local grayscale value in the current round; If the iteration process of the above steps is completed, the preliminary voxels are sorted according to the statistical number of times they are updated in the last round to obtain the target voxels that meet the preset sorting requirements.

4. The method according to claim 3, characterized in that The performing a local search in the preset number of preliminary voxels based on the grayscale value of any preliminary voxel to obtain a local search result includes: Determining a specified number of other preliminary voxels around any one of the preliminary voxels from the preset number of preliminary voxels; A local search is performed based on the grayscale value of any one of the preliminary voxels and the grayscale values ​​of the designated number of other preliminary voxels to obtain the local search result.

5. The method according to any one of claims 1 to 4, characterized in that The texture feature data includes contrast index data, balance index data, homogeneity index data and entropy index data; the candidate segmentation regions in the preliminary segmentation result are merged and optimized using the texture feature data of the candidate segmentation regions to obtain an intermediate segmentation result, including: For two adjacent candidate segmentation regions in the preliminary segmentation result, performing a merge evaluation using the contrast index data, the balance index data, the homogeneity index data, and the entropy index data of the two candidate segmentation regions, to obtain a merge evaluation result between the two candidate segmentation regions; wherein the merge evaluation result is used to describe whether a merge operation is performed on the two candidate segmentation regions or not; The preliminary segmentation results are merged and optimized according to the merged evaluation result to obtain the intermediate segmentation result.

6. The method according to claim 5, characterized in that The step of performing a combined evaluation using the contrast index data, the balance index data, the homogeneity index data, and the entropy index data of the two candidate segmentation regions to obtain a combined evaluation result between the two candidate segmentation regions includes: Determining texture feature difference data between the two candidate segmentation regions using the contrast index data, the balance index data, the homogeneity index data, and the entropy index data of the two candidate segmentation regions; constructing a state space based on texture feature difference data between the two candidate segmentation regions; The state space is estimated through a target deep Q network to obtain the combined evaluation result.

7. The method according to claim 1, characterized in that The intermediate segmentation result is obtained by estimating the texture feature data of the candidate segmentation area using the target deep Q network; The reward function used to train the target deep Q network includes a first reward item and a second reward item; wherein, the first reward item is a reward item for judging the rationality of the operation based on the change in grayscale value features before and after the merging of adjacent candidate segmentation regions; the second reward item is a reward item for judging the rationality of the operation based on the change in similarity between the morphology of the adjacent candidate segmentation regions before and after the merging and the actual morphology of the tumor.

8. The method according to claim 7, characterized in that The adjacent candidate segmentation regions include a first candidate region and a second candidate region; The first reward item and the second reward item are determined by: The rationality of a merging operation and a non-merging operation is judged using a first grayscale mean variance of the first candidate region before merging, a second grayscale mean variance of the second candidate region before merging, and a third grayscale mean variance of the first candidate region and the second candidate region after merging, to obtain the first reward item; The rationality of a merging operation or a non-merging operation is judged by using a first degree of overlap between a region obtained by merging the first candidate region and the second candidate region and the annotated tumor region, as well as a second degree of overlap between the first candidate region and the annotated tumor region, to obtain the second reward item.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 8 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Remote sensing image change detection method based on watershed and treelet algorithms

    CN102169584A

  • Probability-partition-merging-based three-dimensional model segmentation method

    CN106327506A

  • Image hierarchical superpixel segmentation method and system, electronic equipment and storage medium

    CN113240685A

  • Curve skeleton extraction method based on optimal transmission and clustering

    CN114419276A

  • Tumor segmentation method and system based on feature extraction and storage medium

    CN118521793A

Cited By

  • Tumor dynamic segmentation method and model training method suitable for BNCT treatment

    CN121010620A

  • MRI (Magnetic Resonance Imaging) image edema identification method for osteoporotic vertebral compression fracture

    CN122265292A