A medical image segmentation method

By preprocessing PET images, extracting features, and integrating multiple algorithms, combined with training on simulated and real data, and using the U-Net model and edge detection to optimize the segmentation results, the problem of inaccurate edge localization of lesion areas in PET image segmentation was solved, achieving high-precision lesion area identification and localization, and improving the efficiency and accuracy of clinical diagnosis.

CN119323587BActive Publication Date: 2025-11-18IFLYTEK SOUTH CHINA ARTIFICIAL INTELLIGENCE RES INST GUANGZHOU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411177150.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-11-18
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing medical image segmentation algorithms for PET indirect imaging suffer from insufficient accuracy in lesion edge localization, limited access to real case data, inconsistencies between simulated and real data features, and the inability of a single segmentation algorithm to adapt to different types of lesions.

Method used

By preprocessing PET image data, features are extracted using a convolutional neural network. A segmentation middleware integrating multiple algorithms is designed. Annotated data is generated using simulation technology and combined with real data to construct a training set. The U-Net deep learning model is used for initial segmentation, and the segmentation results are optimized through morphological operations and edge detection algorithms.

Benefits of technology

It significantly improves the accuracy and generalization ability of lesion area segmentation, enables precise identification and localization of lesion areas, and enhances the efficiency and accuracy of clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119323587B_ABST
    Figure CN119323587B_ABST
Patent Text Reader

Abstract

The application provides a medical image segmentation method, comprising: acquiring PET indirect imaging original image data, pre-processing the image, including denoising, contrast enhancement and gray level normalization, to obtain a pre-processed PET image data set; designing a segmentation middleware, integrating multiple segmentation algorithms, including threshold segmentation, region growing and level set method, selecting appropriate segmentation algorithms according to feature vector analysis results for different types of lesion regions; generating labeled PET image data using simulation technology, combining real case data to construct a training data set, using data enhancement technology to expand sample size, generating a large-scale data set for algorithm training; using the segmentation middleware to refine the segmentation result of U-Net, focusing on the edge of the lesion area, accurately positioning the lesion boundary through edge detection algorithm, to obtain a fine segmentation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a method for medical image segmentation. Background Technology

[0002] In the field of medical image segmentation using PET indirect imaging, existing segmentation algorithms face the challenge of insufficient accuracy when processing PET images. Particularly in locating the edges of lesion areas, algorithms often deviate, failing to accurately depict the actual contours of the lesions. This inaccuracy can lead to deviations in clinical diagnosis and treatment planning. To improve segmentation accuracy, researchers have proposed introducing segmentation middleware for auxiliary annotation. However, this method has encountered new difficulties in implementation. First, the acquisition of real case data is subject to strict privacy protection constraints, resulting in a severely insufficient sample size for algorithm training and testing. Second, even with some real data, the diversity and complexity of cases make it difficult to cover all possible lesion situations. To address the data scarcity problem, researchers have proposed using simulation technology to generate labeled data. However, ensuring that the simulated data accurately reflects the characteristics of PET images, especially maintaining consistency with real data in the representation of lesion areas, has become a challenging technical problem. The quality of the simulated data directly affects the training effect and segmentation accuracy of subsequent algorithms; therefore, various factors need to be considered during data generation, including image noise, tissue attenuation, and scattering effects. Furthermore, how to effectively integrate simulated data with limited real data to improve the generalization ability of the algorithm is also an urgent problem to be solved. Summary of the Invention

[0003] This invention provides a medical image segmentation method, mainly comprising:

[0004] The raw image data of PET indirect imaging is obtained, and the images are preprocessed, including denoising, contrast enhancement and gray level normalization, to obtain the preprocessed PET image dataset.

[0005] Based on the preprocessed PET image dataset, convolutional neural networks were used to extract image features and construct feature vectors. The shape indicators, texture features, and gray-level statistics of the lesion area were calculated using the feature vectors, and the morphological features and gray-level distribution features of the lesion area were analyzed.

[0006] The design incorporates a segmentation middleware that integrates multiple segmentation algorithms, including threshold segmentation, region growing, and level set methods. Based on the feature vector analysis results, it selects the appropriate segmentation algorithm for different types of lesion regions.

[0007] Annotated PET image data were generated using simulation technology, and a training dataset was constructed by combining it with real case data. Data augmentation techniques were used to expand the sample size and generate a large-scale dataset for algorithm training.

[0008] The U-Net deep learning model was used to perform preliminary segmentation of the lesion area to obtain coarse segmentation results. The U-Net model was then trained using the generated large-scale dataset. Morphological operations were used to optimize the segmentation results, eliminating isolated small regions and filling holes.

[0009] The segmentation results of U-Net are refined using a segmentation middleware, with a focus on the edges of the lesion region. The lesion boundary is accurately located through an edge detection algorithm to obtain a fine segmentation result.

[0010] The results of fine segmentation are quantitatively evaluated by calculating the Dice coefficient and Jaccard index. If the evaluation index is lower than the preset threshold, the segmentation algorithm is re-selected and optimized for different types of lesion areas based on the feature vector analysis results. If the preset threshold is still not reached after multiple optimizations, the case is recorded and marked as requiring manual review.

[0011] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0012] This invention discloses a medical image segmentation method. First, by preprocessing the raw PET image data, it addresses issues such as noise, contrast, and grayscale inconsistencies, improving image quality and providing a better foundation for subsequent analysis and processing. Second, through feature extraction and analysis, it effectively extracts various features of the lesion region and conducts in-depth analysis of its morphological and grayscale distribution characteristics, providing crucial evidence for accurate lesion segmentation. Third, by designing a segmentation middleware that integrates multiple segmentation algorithms and selecting the appropriate algorithm based on the characteristics of the lesion region, it solves the problem of a single segmentation algorithm being unable to adapt to different types of lesions. Furthermore, by utilizing simulation and data augmentation techniques to generate a large-scale training dataset, it addresses the issue of insufficient real-case data, improving the model's training effect and generalization ability. Finally, morphological operations are used to optimize the coarse segmentation results, eliminating isolated small regions and filling holes. The segmentation middleware is then used to further refine the segmentation results, improving the accuracy of lesion region segmentation. In summary, this invention significantly improves the generalization ability and accuracy of segmentation algorithms, achieving precise identification and localization of lesion regions, thereby significantly improving the efficiency and accuracy of clinical diagnosis. Attached Figure Description

[0013] Figure 1 This is a flowchart of a medical image segmentation method according to the present invention.

[0014] Figure 2This is a schematic diagram of a medical image segmentation method according to the present invention.

[0015] Figure 3 This is another schematic diagram of a medical image segmentation method according to the present invention. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0017] like Figure 1 -3, This embodiment of a medical image segmentation method may specifically include:

[0018] Step S101: Obtain the original image data of PET indirect imaging, and preprocess the image, including denoising, contrast enhancement and gray level normalization, to obtain the preprocessed PET image dataset.

[0019] The raw projection data acquired by the PET scanner is processed using a wavelet transform denoising algorithm to remove random and scattering noise, resulting in first projection data. Signal-to-noise ratio (SNR) analysis is performed on the first projection data. If the SNR is lower than a preset threshold, a median filtering algorithm is applied to process the first projection data, resulting in second projection data. Reconstruction is performed based on the second projection data, and a first tomographic image is generated using a maximum likelihood expectation maximization algorithm. An adaptive contrast enhancement algorithm is applied to the first tomographic image, dynamically adjusting the contrast based on the grayscale distribution of local areas, resulting in a second tomographic image. Grayscale normalization is performed on the second tomographic image, and a linear stretching method is used to map the grayscale values ​​of the second tomographic image to a preset grayscale range, resulting in a third tomographic image. The third tomographic image is saved in DICOM format, and a metadata index including patient information and scan parameters is established.

[0020] For example, raw projection data acquired by a PET scanner is obtained. To address random and scattering noise in the projection data, a wavelet transform denoising algorithm is used. The raw projection data is decomposed into wavelets, an appropriate wavelet basis and decomposition level are selected, and the wavelet coefficients of each level are thresholded. Finally, wavelet reconstruction is performed to obtain the denoised projection data. Signal-to-noise ratio (SNR) analysis is performed on the denoised projection data. If the SNR is lower than a preset threshold, additional median filtering is applied. The processed projection data is then reconstructed, and a tomographic image is generated using the maximum likelihood expectation maximization algorithm. By adjusting the number of iterations, relaxation factor, and regularization parameters, the SNR and spatial resolution of the image are optimized to obtain the reconstructed PET image. To address the insufficient contrast in the reconstructed PET image, an adaptive contrast enhancement algorithm is used. The contrast is dynamically adjusted based on the grayscale distribution of local areas to highlight the contrast difference between lesion areas and normal tissues, resulting in a contrast-enhanced PET image. The enhanced PET image undergoes grayscale normalization, mapping the image grayscale values ​​to the range of 0-255. A linear stretching method was used to adjust the grayscale distribution, making images acquired from different scanning devices and at different times comparable. The processed PET images were saved in DICOM format, and corresponding metadata indexes were established, including patient information and scanning parameters. A standardized PET image dataset was constructed to facilitate subsequent analysis and retrieval. During PET imaging, a high-sensitivity detector array was used to acquire raw projection data, with a detector spacing of 4 mm, a detector ring diameter of 80 cm, a field of view of 15.7 cm, and an acquisition time of 15 minutes. Wavelet transform denoising was performed on the acquired raw projection data using the Daubechies wavelet basis, selecting a 3-level wavelet decomposition, and applying a soft thresholding method to the wavelet coefficients of each level, with the threshold set to 3 times the standard deviation. The signal-to-noise ratio was calculated after processing; if it was lower than a preset threshold of 20 dB, additional processing was performed using median filtering with a 3x3 window. Image reconstruction was performed using the maximum likelihood expectation-maximization algorithm, with 30 iterations, a relaxation factor of 1.5, and a regularization parameter of 0.01. The reconstructed PET images have a resolution of 128x128x47 and a voxel size of 4x4x3.27 mm. An adaptive contrast enhancement algorithm was applied to the reconstructed images, setting the local window size to 7x7 and the contrast enhancement factor to 1.5, resulting in contrast-enhanced PET images. For grayscale normalization, a linear stretching method was used to map the image grayscale values ​​to the range of 0-255, setting the minimum threshold to the 10th percentile of the original image and the maximum threshold to the 90th percentile. Finally, the processed PET images were saved in DICOM format, with each pixel having a 16-bit depth. Metadata information such as patient ID, scan date, and injection dose was recorded in the DICOM header file, constructing a standardized PET image dataset containing 500 images from 100 patients.

[0021] Step S102: Based on the preprocessed PET image dataset, a convolutional neural network is used to extract image features and construct feature vectors. The shape indicators, texture features, and gray-level statistics of the lesion area are calculated using the feature vectors, and the morphological features and gray-level distribution features of the lesion area are analyzed.

[0022] Image data is read from the preprocessed PET image dataset, and features are extracted from the image data using a U-Net network to obtain feature data. Z-score standardization is performed on the feature data to obtain standardized feature vectors. Based on the standardized feature vectors, a region growing algorithm is used to segment the image data to obtain preliminary segmentation results of the lesion region. For the preliminary segmentation results, shape indices, texture features, and grayscale statistics are calculated to construct a lesion region feature descriptor. The lesion region feature descriptor is standardized, and a covariance matrix is ​​calculated. If the cumulative contribution rate of the covariance matrix reaches a preset threshold, the corresponding principal components are selected to reconstruct the feature space, obtaining the morphological features and grayscale distribution feature representation of the lesion region. Based on the morphological features and grayscale distribution feature representation, a shape factor is calculated, and the grayscale distribution histogram is analyzed to obtain a specific feature description of the lesion region.

[0023] For example, image data is read from a preprocessed PET image dataset, and a U-Net network is used for feature extraction. The U-Net network consists of a 4-layer encoder and a 4-layer decoder, each layer using a 3x3 convolutional kernel with ReLU activation and 2x2 max pooling. A 512-dimensional feature vector is obtained through the U-Net network, and Z-score normalization is applied to the feature vector to homogenize the feature data distribution. Based on the normalized feature vector, a region growing algorithm is used to segment the image. The point with the highest gray value in the image is selected as the seed point, and the growth threshold is set to 80% of the seed point's gray value. The region is gradually expanded until no further growth is possible, resulting in a preliminary segmentation of the lesion area. For the segmented lesion area, shape metrics such as area, perimeter, and roundness are calculated. Texture features are extracted using a gray-level co-occurrence matrix, with orientations set to 0°, 45°, 90°, and 135°, and a distance of 1 pixel. Features such as energy, contrast, and entropy are calculated. Gray-level statistics such as mean, standard deviation, skewness, and kurtosis are calculated. By combining shape indices, texture features, and grayscale statistics, feature descriptors for lesion regions are constructed. These descriptors are standardized, their covariance matrix is ​​calculated, and eigenvalue decomposition is performed. The top N principal components with a cumulative contribution rate of 95% are selected to reconstruct the feature space, obtaining the morphological and grayscale distribution representations of the lesion regions. Shape factors are calculated, and the grayscale distribution histogram is analyzed to obtain specific feature descriptions of the lesion regions. In the PET image feature extraction process, the preprocessed PET image dataset (256x256x128 pixels) is first read. A U-Net network is used for feature extraction. The network structure includes a 4-layer encoder and a 4-layer decoder, with each layer using 32 3x3 convolutional kernels, a stride of 1, and the ReLU activation function. 2x2 max pooling is used in the pooling layers. A 512-dimensional feature vector is obtained through the U-Net network. The feature vector is then Z-score standardized to achieve a mean of 0 and a standard deviation of 1. Based on the standardized feature vector, a region growing algorithm is used for image segmentation. The point with the highest grayscale value in the image, assumed to be 200, is selected as the seed point. A growth threshold of 80% of the seed point's grayscale value (160) is set, and the region is gradually expanded until no further growth is possible, yielding a preliminary segmentation result of the lesion area. For the segmented lesion area, shape indices such as area (e.g., 500 square millimeters), perimeter (e.g., 80 millimeters), and roundness (e.g., 0.85) are calculated. Texture features are extracted using a gray-level co-occurrence matrix (GLCM), with orientations of 0°, 45°, 90°, and 135°, and a distance of 1 pixel. Features such as energy (e.g., 0.2), contrast (e.g., 15), and entropy (e.g., 4.5) are calculated. Grayscale statistics such as mean (e.g., 150), standard deviation (e.g., 30), skewness (e.g., 0.5), and kurtosis (e.g., 2.8) are calculated. Combining shape indices, texture features, and grayscale statistics, a 20-dimensional lesion area feature descriptor is constructed. The feature descriptor is standardized, a 20x20 covariance matrix is ​​calculated, and eigenvalue decomposition is performed.The top 10 principal components with a cumulative contribution rate of 95% were selected to reconstruct the feature space, resulting in a 10-dimensional representation of the lesion region's morphological features and gray-level distribution characteristics. The shape factor was calculated as shown in Figure 1.2, and the gray-level distribution histogram was analyzed. It was found that the gray-level values ​​were concentrated in the range of 120-180, exhibiting a right-skewed distribution, thus providing a detailed description of the lesion region's features.

[0024] Step S103: Design a segmentation middleware that integrates multiple segmentation algorithms, including threshold segmentation, region growing, and level set methods. Based on the feature vector analysis results, select an appropriate segmentation algorithm for different types of lesion regions.

[0025] A segmentation algorithm selector is constructed based on shape indices and grayscale distribution characteristics. This selector is implemented using a decision tree classifier. The decision tree classifier is trained using a pre-labeled training dataset to obtain the optimal segmentation point and decision rules. If the decision tree classifier determines that the circularity index of the lesion region is within a preset range and the grayscale standard deviation is less than a preset threshold, then a region growing algorithm is used for segmentation. The region growing algorithm starts growing from the point with the highest grayscale value to obtain the segmentation result. If the decision tree classifier determines that the lesion region has an irregular shape and a clear boundary in its grayscale distribution, then a level set method is used for segmentation. The level set method calculates the water level using a fast moving average method. The level set function is used to obtain the segmentation boundary. If the decision tree classifier determines that the gray-level distribution of the lesion region has bimodal or multimodal characteristics, the multi-threshold OTSU algorithm is used for segmentation. The multi-threshold OTSU algorithm determines the optimal number of thresholds by maximizing the inter-class variance, calculates each threshold, and segments the image into multiple gray levels. A segmentation middleware is designed to integrate the region growing algorithm, the level set method, and the multi-threshold OTSU algorithm. The segmentation middleware calls the corresponding segmentation algorithm for processing based on the output of the segmentation algorithm selector. Post-processing is performed on the segmentation results of different algorithms, including morphological operations and boundary smoothing, to obtain the final lesion region segmentation result.

[0026] For example, based on the feature vector analysis results, a segmentation algorithm selector is constructed, implemented using a decision tree classifier. Input features include shape indices such as roundness and complexity, and grayscale distribution features such as mean, standard deviation, skewness, and kurtosis. The output is the most suitable segmentation algorithm. The decision tree is trained using a pre-labeled training dataset to determine the optimal segmentation point and decision rules. For lesion regions with a roundness index between 0.7 and 0.9 and a grayscale standard deviation less than a preset threshold, a region growing algorithm is used for segmentation. The growth threshold is set to 85% of the grayscale value of the seed point, and growth begins from the point with the highest grayscale value to obtain the segmentation result. For lesion regions with irregular shapes and clear grayscale distribution boundaries, a level set method is used for segmentation. The level set function is initialized as a signed distance map and calculated using the fast walking algorithm. The evolution rate function is set as a weighted combination of image gradient and curvature. The level set function is updated iteratively, and iteration stops when the change in the level set function between two consecutive iterations is less than a preset threshold, thus obtaining the segmentation boundary. For lesion regions with bimodal or multimodal grayscale distributions, a multi-threshold OTSU algorithm is used for segmentation. The optimal number of thresholds is determined by maximizing the inter-class variance, and the number of thresholds is gradually increased until the increase in inter-class variance is less than a preset value. For each threshold, the image is segmented into multiple gray levels to extract lesion regions. A segmentation middleware is designed to integrate the above segmentation algorithms. Based on the output of the algorithm selector, the corresponding segmentation algorithm is called for processing. Post-processing is performed on the segmentation results of different algorithms, including morphological operations and boundary smoothing, and multiple segmentation results are fused to obtain the final lesion region segmentation result. In practical applications, a C4.5 decision tree classifier is used when constructing the segmentation algorithm selector based on the feature vector analysis results. Input features include circularity (0-1), complexity boundary length / area, gray mean (0-255), standard deviation (0-127), skewness (-2 to 2), and kurtosis (1-5). The decision tree is trained with 1000 pre-labeled samples to obtain the optimal segmentation rule. For example, when the circularity is greater than 0.8 and the standard deviation is less than 20, the region growing algorithm is selected; when the complexity is greater than 0.1 and the skewness is greater than 1, the level set method is selected; and when the kurtosis is greater than 3, the multi-threshold OTSU algorithm is selected. For lesion regions with a circularity of 0.85 and a standard deviation of 15, a region growing algorithm is used for segmentation. A growth threshold of 170 is set, assuming a seed point grayscale value of 200. Growth begins at coordinates 100, 100, ultimately resulting in a segmented region of 500 square pixels. For irregular lesion regions with a complexity of 0.15 and a skewness of 1.5, a level set method is used for segmentation. The level set function is initialized with a signed distance map from -3 to 3, and the evolution rate function is set to 0.5 image gradient + 0.5 curvature. After 50 iterations, the level set function changes by less than 0.01, at which point the iteration stops, and a closed segmentation boundary is obtained. For lesion regions with a multi-peaked grayscale distribution and a kurtosis of 4, a multi-threshold OTSU algorithm is used.By maximizing the inter-class variance, the optimal number of thresholds was determined to be 3. The calculated thresholds were 85, 150, and 210, respectively. The image was segmented into 4 gray levels, and regions with gray values ​​greater than 210 were extracted as lesion regions. Finally, the segmentation results of different algorithms were post-processed, including opening operations of 3x3 structuring elements to remove small noise points and 5x5 Gaussian filtering for boundary smoothing, to obtain the final lesion region segmentation result.

[0027] Step S104: Use simulation technology to generate labeled PET image data, combine it with real case data to construct a training dataset, use data augmentation technology to expand the sample size, and generate a large-scale dataset for algorithm training.

[0028] The positron annihilation process was simulated using the Monte Carlo method to obtain simulated PET raw data. The maximum likelihood expectation-maximization algorithm was used to reconstruct images from the simulated PET raw data, obtaining simulated PET images. Corresponding lesion region annotation information was automatically generated for each simulated PET image. The U-Net deep learning algorithm was applied to real case PET images for segmentation to extract lesion regions and obtain annotation information for the real cases. If both the simulated PET images and the real case PET images were obtained, they were mixed in a 7:3 ratio to construct an initial training dataset. The initial training dataset was then used to... For each image in the dataset, five variants are generated, including: rotating the image by -15° to 15°, scaling the image by 0.9 to 1.1 times, translating the image by -10 to 10 pixels, adjusting the image brightness by ±20%, and enhancing the image contrast by ±20%. Through image enhancement methods, a large-scale training dataset containing five times the number of original samples is obtained. Cross-validation is used to evaluate the representativeness and diversity of the large-scale training dataset. The inter-class distance and intra-class distance of the large-scale training dataset are calculated. It is determined whether the inter-class distance and intra-class distance meet preset standards. If the inter-class distance and intra-class distance do not meet the preset standards, the process returns to the image enhancement workflow for adjustment.

[0029] For example, a PET image simulator is constructed, simulating the positron annihilation process based on the Monte Carlo method to generate simulated PET raw data. By setting different lesion types, sizes, locations, and metabolic activities, the maximum likelihood expectation maximization algorithm is used for image reconstruction to obtain simulated PET images, and corresponding lesion region annotation information is automatically generated. The quality of the simulated images is evaluated, and the signal-to-noise ratio and contrast are calculated to ensure that they are close to the features of real PET images. Real case PET image data is collected, and the U-Net deep learning algorithm is used to segment the real case PET images, extract lesion regions, and generate real case annotation information. The simulated data and real data are mixed in a 7:3 ratio to construct an initial training dataset. For the initial training dataset, image augmentation methods are used to augment the data. Five variants are generated for each image, including rotation from -15° to 15°, scaling from 0.9 to 1.1 times, translation from -10 to 10 pixels, brightness adjustment ±20%, and contrast enhancement ±20%. These processes increase the diversity of the dataset, ultimately generating a large-scale training dataset containing five times the number of original samples. Cross-validation was used to evaluate the representativeness and diversity of the dataset, calculating inter-class and intra-class distances to ensure the dataset covered different types of lesion features. If the evaluation results did not meet the preset criteria, the data augmentation process was returned for adjustment. Monte Carlo simulation was implemented in the PET image simulator using the GATEGeant4ApplicationforTomographicEmission software package. The 18F-FDG tracer activity was set to 5 MBq, the simulation time to 300 seconds, the detector crystal material to be LYSO, and the crystal size to be 4x4x20 mm³. Different types of lesions were simulated, such as spherical lesions with diameters of 5-30 mm and irregular shapes with a maximum size of 10-40 mm, randomly distributed within the phantom, with metabolic activity 2-5 times that of background uptake. Image reconstruction was performed using the OSEM algorithm with 2 iterations and 21 subsets, resulting in 128x128x47 PET images. The target image signal-to-noise ratio was calculated to be >15 dB and the target contrast ratio to be >2. For real case data, U-Net was used for segmentation. The network had a depth of 5 layers, each using a 3x3 convolutional kernel, and the activation function was ReLU. It was trained for 300 epochs using the cross-entropy loss function. For data augmentation, OpenCV was used for image processing. Rotation angles were randomly selected between -15° and 15°, scaling factors between 0.9 and 1.1, and translation pixels between -10 and 10. Brightness and contrast were adjusted within ±20%. A total of 25,000 augmented images were generated. Five-fold cross-validation was used to evaluate the dataset quality, with target values ​​of inter-class Euclidean distance > 100 and intra-class variance < 50. If the criteria were not met, the data augmentation parameters were adjusted and the dataset was regenerated.

[0030] Step S105: The U-Net deep learning model is used to perform preliminary segmentation of the lesion area to obtain coarse segmentation results. The generated large-scale dataset is used to train the U-Net model, and the segmentation results are optimized through morphological operations to eliminate isolated small regions and fill holes.

[0031] Based on the training, validation, and test sets, a U-Net neural network model is constructed, comprising a 4-layer encoder and a 4-layer decoder structure. The PET image to be segmented is input into the U-Net neural network model, and a lesion region probability map is obtained through forward propagation. The optimal threshold is automatically calculated using the Otsu algorithm, and the lesion region probability map is binarized to obtain a coarse segmentation result. Morphological post-processing is performed on the coarse segmentation result, including: opening operations using 3x3 circular structuring elements to remove isolated small regions with an area less than 0.1% of the total image area; closing operations to fill internal holes smaller than 5% of the lesion region area; and edge smoothing using Gaussian filtering to obtain an optimized lesion region segmentation result. The Dice coefficient, Jaccard exponent, and average surface distance of the optimized lesion region segmentation result compared to the manually labeled result are calculated. If the Dice coefficient is greater than 0.8, the Jaccard exponent is greater than 0.7, and the average surface distance is less than 2 pixels, then the optimized lesion region segmentation result is deemed to meet the quality requirements.

[0032] For example, based on the generated large-scale dataset, the data is divided into training, validation, and test sets in an 8:1:1 ratio. A U-Net neural network model is constructed, with a 4-layer encoder and 4-layer decoder structure. Each layer uses a 3x3 convolutional kernel and the ReLU activation function, employing the cross-entropy loss function. The Adam optimizer is used, with a learning rate of 0.001 and a batch size of 16, for 500 training epochs. The model performance is evaluated on the validation set every 50 epochs, and the best model is saved to obtain the initial segmentation model. The PET image to be segmented is input into the trained U-Net model. A probability map of the lesion region is obtained through forward propagation. The optimal threshold is automatically calculated using the Otsu algorithm, and the probability is... Figure 2Value-based segmentation yields coarse segmentation results. Morphological post-processing is then applied to these results. First, an opening operation is performed using 3x3 circular structuring elements to remove isolated small regions smaller than 0.1% of the total image area. Next, a closing operation is performed to fill internal holes smaller than 5% of the lesion area. Finally, Gaussian filtering is used for edge smoothing to obtain optimized lesion region segmentation results. The Dice coefficient, Jaccard index, and average surface distance are calculated and compared with manually labeled results. If the Dice coefficient is greater than 0.8, the Jaccard index is greater than 0.7, and the average surface distance is less than 2 pixels, the segmentation result is considered to meet quality requirements; otherwise, the process returns to the morphological post-processing step, adjusting parameters and re-optimizing. In practical applications, a large-scale dataset containing 10,000 PET images is used, divided into an 8:1:1 ratio of 8,000 training images, 1,000 validation images, and 1,000 test images. A U-Net model was constructed with an input image size of 256x256x1, consisting of a 4-layer encoder and a 4-layer decoder. Each layer used 32 3x3 convolutional kernels, ReLU activation function, max pooling layers, and upsampling layers. The Adam optimizer was used with an initial learning rate of 0.001, decaying by 10% every 100 epochs, a batch size of 16, and a training duration of 500 epochs. The best model was saved on the validation set when the Dice coefficient reached 0.85. For a new input 128x128x47 PET image, it was resampled to 256x256x1 and input into the U-Net model to obtain a probability map. The Otsu algorithm was used to calculate the optimal threshold (e.g., 0.43), and binarization was performed to obtain a coarse segmentation result. Morphological post-processing was performed, using a circular structuring element with a radius of 1.5 pixels for opening operations to remove isolated regions smaller than 33 square pixels (approximately 0.1% of the image area). Then, the same structuring element was used for closing operations to fill internal holes smaller than 150 square pixels (approximately 5% of the lesion area). Finally, a 3x3 Gaussian filter with σ = 0.8 is applied to smooth the edges. Evaluation metrics are calculated, yielding a Dice coefficient of 0.88, a Jaccard exponent of 0.79, and an average surface distance of 1.5 pixels. The segmentation result is deemed to meet the quality requirements. If not, the structuring element radius is adjusted to 1.2 pixels, and the morphological processing steps are repeated.

[0033] Step S106: The segmentation results of U-Net are refined using segmentation middleware, with a focus on the edges of the lesion area. The lesion boundary is accurately located through edge detection algorithm to obtain a fine segmentation result.

[0034] The segmentation results from U-Net are received and input into the segmentation middleware. The middleware calculates the average value of the multi-channel PET images to obtain a single-channel image. Edge detection is performed using the gradient-based Sobel operator on the single-channel image, calculating the horizontal and vertical gradients to obtain an edge intensity map and a direction map. The Otsu algorithm is used to automatically calculate the optimal threshold on the edge intensity map to extract a preliminary edge point set. Non-maximum suppression is applied to the preliminary edge point set to remove non-edge points, obtaining a refined edge point set. An edge tracking algorithm is used to connect the refined edge point set, setting a maximum connection distance to connect adjacent edge points into a continuous loop. A continuous contour line is formed; morphological thinning and bridging operations are applied to the continuous contour line to optimize edge connections, forming a closed lesion region boundary; for the closed lesion region boundary, a cubic B-spline curve fitting algorithm is used for smoothing, and control points are selected by equidistant sampling, the spacing between control points is set, and the boundary is interpolated and smoothed to obtain a refined lesion region segmentation result; the Hausdorff distance and average contour distance between the refined lesion region segmentation result and the original U-Net segmentation result are calculated; if the Hausdorff distance is less than a preset first threshold and the average contour distance is less than a preset second threshold, then the edge thinning is determined to be effective.

[0035] For example, the segmentation results of U-Net are input into the segmentation middleware. For multi-channel PET images, the average value of each channel is first calculated to obtain a single-channel image. The gradient-based Sobel operator is used to perform edge detection on the single-channel image, calculating the horizontal and vertical gradients to obtain an edge intensity map and a direction map. A 5x5 Gaussian filter with σ=1.0 is used to smooth the edge intensity map, reducing noise. Based on the smoothed edge intensity map, the Otsu algorithm is used to automatically calculate the optimal threshold and extract a preliminary edge point set. The edge points are then refined using a non-maximum suppression algorithm to remove non-edge points, obtaining a refined edge point set. An edge tracking algorithm is used to connect the refined edge points, setting the maximum connection distance to 5 pixels, connecting adjacent edge points into a continuous contour line. Morphological thinning and bridging operations are used to optimize edge connections, forming closed lesion region boundaries. The obtained lesion region boundaries are then smoothed using a cubic B-spline curve fitting algorithm. Control points are selected through equidistant sampling, setting the control point spacing to 5 pixels, and the boundaries are interpolated and smoothed to obtain a refined lesion region segmentation result. The Hausdorff distance and average contour distance are calculated and compared with the original U-Net segmentation results to evaluate the edge thinning effect. If the Hausdorff distance is less than 3 pixels and the average contour distance is less than 1 pixel, the edge thinning is considered effective. In practical applications, for a 128x128x47 multi-channel PET image, the average value of 47 channels is first calculated to obtain a 128x128 single-channel image. Edge detection is performed using a 3x3 Sobel operator to obtain horizontal and vertical gradient maps. The gradient magnitude is calculated as the edge intensity map, and a 5x5 Gaussian filter with σ = 1.0 is used to smooth the edge intensity map. The Otsu algorithm is applied to calculate the optimal threshold, such as a threshold of 45. Pixels with a value greater than 45 are extracted as the initial edge point set. The 3x3 neighborhood non-maximum suppression algorithm is used to thin the edges, retaining local maxima. An 8-connected edge tracking algorithm is used to connect edge points, with a maximum connection distance of 5 pixels. A morphological thinning operation using a 3x3 structuring element is applied with 10 iterations, and then a bridging operation is used to connect breakpoints with a 1-pixel interval. Closed boundaries were sampled at equal intervals, with one control point selected every 5 pixels, resulting in approximately 200 control points. A cubic B-spline curve fitting algorithm was used, with a smoothing parameter λ = 0.5, to interpolate and smooth the boundaries. Finally, the Hausdorff distance and average contour distance were calculated and compared with the original U-Net results. For example, a Hausdorff distance of 2.8 pixels and an average contour distance of 0.9 pixels were obtained, indicating that edge refinement was effective and a detailed lesion region segmentation result was obtained.

[0036] Step S107: Quantitatively evaluate the fine segmentation results, calculate the Dice coefficient and Jaccard index evaluation indicators. If the evaluation indicators are lower than the preset threshold, then based on the feature vector analysis results, re-select the segmentation algorithm for different types of lesion areas for optimization. If the preset threshold is still not reached after multiple optimizations, record the case and mark it as requiring manual review.

[0037] The fine segmentation results are quantitatively evaluated to obtain the Dice coefficient and Jaccard index. Based on these coefficients, it is determined whether a preset threshold has been reached. If either the Dice coefficient or the Jaccard index is less than the preset threshold, a new algorithm is selected from the segmentation algorithm library using a random forest algorithm. The lesion area is then re-segmented using the new algorithm to obtain an optimized segmentation result. The Dice coefficient and Jaccard index are calculated on the optimized segmentation result to determine if a preset threshold has been reached. If neither the Dice coefficient nor the Jaccard index reaches the preset threshold, the optimization process is repeated. If, after multiple optimization iterations, the Dice coefficient and Jaccard index still do not reach the preset threshold, the case is added to the pending review list.

[0038] For example, the fine segmentation results are quantitatively evaluated by calculating the Dice coefficient and Jaccard index, with a threshold of 0.80 for the Dice coefficient and 0.70 for the Jaccard index. Oversegmentation and undersegmentation are analyzed, and the oversegmentation rate and undersegmentation rate are calculated. The calculated evaluation metrics are compared with the preset thresholds, and detailed evaluation results are recorded. If the Dice coefficient is less than 0.80 or the Jaccard index is less than 0.70, a new algorithm is selected from the segmentation algorithm library for optimization using the random forest algorithm based on the feature vector analysis results. The selection criteria include lesion shape, size, location, and grayscale distribution features, establishing a mapping relationship between feature vectors and algorithm performance. The selected new algorithm is used to re-segment the lesion region, obtaining optimized segmentation results. The Dice coefficient and Jaccard index are recalculated and compared with the preset thresholds. The maximum number of iterations is dynamically adjusted based on the improvement of the metrics after each optimization, initially set to 5. If the threshold is still not reached, the optimization process is repeated. The segmentation results, evaluation metrics, and algorithm parameters of each iteration are saved as structured data, including metadata in JSON format and image data in DICOM format. If, after multiple optimization iterations, the evaluation metrics still fail to reach the preset threshold, the case is recorded in the list awaiting review and marked as requiring manual review. A visual interface is provided, displaying the original image, segmentation results, and evaluation metrics. Manual adjustment of the segmentation boundaries is supported, and the adjustment process is recorded. In practical applications, after fine segmentation of a 128x128x64 PET image, the calculated Dice coefficient was 0.78, and the Jaccard index was 0.68, both below the preset thresholds. Analysis revealed an oversegmentation rate of 5% and an undersegmentation rate of 8%. Based on these evaluation results, a new segmentation method is selected from the algorithm library using a random forest algorithm. The random forest contains 100 decision trees, with features including lesion shape roundness (0.85), size (volume 3.2 cm³), center coordinates (64, 58, 32), and grayscale distribution mean (150) and standard deviation (25). The level set algorithm is selected for re-segmentation, with the evolution rate function set to 0.5 image gradient + 0.3 curvature, and 100 iterations are performed. The optimized segmentation results show a Dice coefficient of 0.83 and a Jaccard index of 0.72. Due to the significant improvement in metrics, the maximum number of iterations was dynamically adjusted to 3. The segmentation results were saved in DICOM format, and the evaluation metrics and algorithm parameters were saved in a JSON file containing the relevant fields.

[0039] "iteration": 1, "dice": 0.83, "jaccard": 0.72, "algorithm": "level_set", "params": {"speed_function": "0.5gradient+0.3curvature", "iterations": 100}. The final segmentation result still did not reach the threshold. Case ID-20230701001 was added to the review list. The visualization interface displays the original PET image, the overlay of the segmentation results, and the evaluation index curve. Manual adjustment of the segmentation boundaries via mouse dragging is supported, and the sequence of adjusted coordinate points is recorded.

[0040] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A medical image segmentation method, characterized by, The method comprises: acquiring PET indirect imaging original image data, pre-processing the image, including denoising, contrast enhancement and gray level normalization, to obtain a pre-processed PET image data set; According to the pre-processed PET image data set, the image features are extracted by using a convolutional neural network to construct a feature vector, and the shape index, texture feature and gray statistical quantity of the lesion area are calculated through the feature vector, and the morphological characteristics and gray distribution characteristics of the lesion area are analyzed; Design a segmentation middleware, integrate multiple segmentation algorithms, including threshold segmentation, region growing and level set method, select appropriate segmentation algorithm for different types of lesion area according to the analysis result of feature vector; Use simulation technology to generate labeled PET image data, combine real case data to build training data set, use data enhancement technology to expand sample size, generate large-scale data set for algorithm training; Use deep learning model U-Net to preliminarily segment the lesion area to obtain coarse segmentation result, train U-Net model using large-scale data set generated, optimize the segmentation result through morphological operation, eliminate isolated small area and fill the cavity; Refine the segmentation result of U-Net using segmentation middleware, focus on the edge of the lesion area, accurately locate the lesion boundary through edge detection algorithm, and obtain fine segmentation result; Quantitative evaluation is carried out on the fine segmentation result, and the Dice coefficient and Jaccard index evaluation index are calculated, if the evaluation index is lower than the preset threshold, the segmentation algorithm is selected again according to the analysis result of feature vector, if the preset threshold is still not reached after multiple optimization, the case is recorded and marked as needing manual review.

2. The method of claim 1, wherein, The method comprises: acquiring PET indirect imaging original image data, pre-processing the image, including denoising, contrast enhancement and gray level normalization, to obtain a pre-processed PET image data set; Acquire the original projection data collected by the PET scanner, and use wavelet transform denoising algorithm to process the random noise and scattering noise in the original projection data to obtain first projection data; Perform signal-to-noise ratio analysis on the first projection data, if the signal-to-noise ratio is lower than the preset threshold, use median filter algorithm to process the first projection data to obtain second projection data; Reconstruct according to the second projection data, and use maximum likelihood expectation maximization algorithm to generate first tomographic image; For the first tomographic image, use adaptive contrast enhancement algorithm for processing, dynamically adjust the contrast according to the gray distribution of local area to obtain second tomographic image; Perform gray level normalization processing on the second tomographic image, and use linear stretching method to map the gray value of the second tomographic image to the preset gray range to obtain third tomographic image; Save the third tomographic image in DICOM format, and establish metadata index including patient information and scanning parameters.

3. The method of claim 1, wherein, According to the pre-processed PET image data set, image features are extracted by using a convolutional neural network, a feature vector is constructed, shape indicators, texture features and gray scale statistics of the lesion region are calculated through the feature vector, and morphological features and gray scale distribution features of the lesion region are analyzed, including: Read image data from the pre-processed PET image data set, extract features from the image data using a U-Net network, and obtain feature data; The feature data is subjected to Z-score standardization processing to obtain a standardized feature vector; According to the standardized feature vector, a region growing algorithm is used to segment the image data to obtain a preliminary segmentation result of the lesion region; For the preliminary segmentation result, shape indicators, texture features and gray scale statistics are calculated to construct a lesion region feature descriptor; The lesion region feature descriptor is subjected to standardization processing, and a covariance matrix is calculated; If the cumulative contribution rate of the covariance matrix reaches a preset threshold, the corresponding principal component is selected to reconstruct the feature space to obtain the morphological features and gray scale distribution features of the lesion region; According to the morphological features and gray scale distribution feature representation, a shape factor is calculated, a gray scale distribution histogram is analyzed, and specific feature descriptions of the lesion region are obtained.

4. The method of claim 1, wherein, The design of the segmentation middleware integrates multiple segmentation algorithms, including threshold segmentation, region growing and level set method, and according to the analysis result of the feature vector, appropriate segmentation algorithm is selected for different types of lesion region, including: According to the shape indicators and gray scale distribution features, a segmentation algorithm selector is constructed, and the segmentation algorithm selector is realized by using a decision tree classifier; The decision tree classifier is trained by using a pre-labeled training data set to obtain an optimal segmentation point and a decision rule; If the decision tree classifier determines that the circularity index of the lesion region is within a preset range and the gray scale standard deviation is less than a preset threshold, the region growing algorithm is used for segmentation; The region growing algorithm starts growing from the point with the highest gray value to obtain the segmentation result; If the decision tree classifier determines that the shape of the lesion region is irregular and the gray scale distribution has obvious boundaries, the level set method is used for segmentation; The level set method calculates the level set function by using the fast marching method to obtain the segmentation boundary; If the decision tree classifier determines that the gray scale distribution of the lesion region presents a double-peak or multi-peak feature, the multi-threshold OTSU algorithm is used for segmentation; The multi-threshold OTSU algorithm determines the optimal threshold number by maximizing the inter-class variance, calculates each threshold, and divides the image into multiple gray scale levels; The segmentation middleware integrates the region growing algorithm, the level set method and the multi-threshold OTSU algorithm; The segmentation middleware calls the corresponding segmentation algorithm for processing according to the output result of the segmentation algorithm selector; The segmentation results of different algorithms are post-processed, including morphological operation and boundary smoothing, to obtain the final lesion region segmentation result.

5. The method of claim 1, wherein, The labeled PET image data is generated by using simulation technology, the training data set is constructed by combining real case data, the sample size is expanded by using data enhancement technology, and a large-scale data set for algorithm training is generated, including: Simulate a positron annihilation process according to a Monte Carlo method to obtain simulated PET raw data; Reconstruct an image by using a maximum likelihood expectation maximization algorithm on the simulated PET raw data to obtain a simulated PET image; Automatically generate corresponding lesion region annotation information for the simulated PET image; Segment a real case PET image by using a U-Net deep learning algorithm to extract a lesion region and obtain annotation information of the real case; If the simulated PET image and the real case PET image are obtained, mix the simulated PET image and the real case PET image according to a ratio of 7:3 to construct an initial training data set; For each image in the initial training data set, generate five variants, including rotating the image by -15° to 15°, scaling the image by 0.9 to 1.1 times, translating the image by -10 to 10 pixels, adjusting the brightness of the image by ±20%, and enhancing the contrast of the image by ±20%; Obtain a large-scale training data set containing 5 times the number of original samples by using an image enhancement method; Evaluate the representativeness and diversity of the large-scale training data set by using a cross-validation method; Calculate the inter-class distance and intra-class distance of the large-scale training data set; Determine whether the inter-class distance and intra-class distance meet a preset standard; If the inter-class distance and intra-class distance do not meet the preset standard, return to an image enhancement process for adjustment.

6. The method of claim 1, wherein, The deep learning model U-Net is used to preliminarily segment a lesion region to obtain a coarse segmentation result, the U-Net model is trained by using the generated large-scale data set, and the segmentation result is optimized by morphological operation to eliminate isolated small regions and fill in holes, including: A U-Net neural network model is constructed according to training set, validation set and test set data, and the U-Net neural network model includes a 4-layer encoder and a 4-layer decoder structure; A PET image to be segmented is input into the U-Net neural network model, and a lesion region probability map is obtained by forward propagation; An Otsu algorithm is used to automatically calculate an optimal threshold, the lesion region probability map is binarized to obtain a coarse segmentation result; The coarse segmentation result is morphologically post-processed, including: a 3x3 circular structural element is used for open operation to remove isolated small regions with an area less than 0.1% of the total area of the image, a close operation is performed to fill in internal holes with an area less than 5% of the area of the lesion region, a Gaussian filter is used for edge smoothing to obtain an optimized lesion region segmentation result; The Dice coefficient, Jaccard index and average surface distance of the optimized lesion region segmentation result and the artificial annotation result are calculated; If the Dice coefficient is greater than 0.8, the Jaccard index is greater than 0.7, and the average surface distance is less than 2 pixels, it is determined that the optimized lesion region segmentation result meets the quality requirements.

7. The method of claim 1, wherein, The segmentation result of the U-Net is refined by using a segmentation middleware, the lesion region edge is focused on, the lesion boundary is accurately positioned by using an edge detection algorithm, and a fine segmentation result is obtained, including: Receiving the segmentation result of the U-Net and inputting the segmentation middleware, the segmentation middleware calculates the average value of the multi-channel PET image to obtain a single-channel image; According to the single-channel image, an edge detection is performed by using a gradient-based Sobel operator to calculate the gradient in the horizontal and vertical directions, and an edge intensity map and a direction map are obtained; An Otsu algorithm is used on the edge intensity map to automatically calculate the optimal threshold value, and a preliminary edge point set is extracted; A non-maximum suppression algorithm is used for the preliminary edge point set to remove non-edge points, and a refined edge point set is obtained; An edge tracking algorithm is used to connect the refined edge point set, set the maximum connection distance, and connect adjacent edge points into continuous contour lines; Morphological thinning and bridging operations are used on the continuous contour lines to optimize the edge connection and form a closed lesion region boundary; For the closed lesion region boundary, a cubic B-spline curve fitting algorithm is used for smoothing processing, control points are selected by equidistant sampling, the control point interval is set, and the boundary is interpolated and smoothed to obtain a refined lesion region segmentation result; The Hausdorff distance and the average contour distance between the refined lesion region segmentation result and the original U-Net segmentation result are calculated; If the Hausdorff distance is less than a preset first threshold value and the average contour distance is less than a preset second threshold value, it is determined that the edge refinement is effective.

8. The method of claim 1, wherein, The refined segmentation result is quantitatively evaluated, and the Dice coefficient and Jaccard index evaluation indicators are calculated. If the evaluation indicators are lower than the preset threshold value, the feature vector analysis result is used to select a segmentation algorithm for optimization for different types of lesion regions. If the preset threshold value is still not reached after multiple optimizations, the case is recorded and marked for manual review, including: The refined segmentation result is quantitatively evaluated to obtain the Dice coefficient and Jaccard index; According to the Dice coefficient and Jaccard index, it is determined whether the preset threshold value is reached; If the Dice coefficient is less than the preset threshold value or the Jaccard index is less than the preset threshold value, a random forest algorithm is used to select a new algorithm from the segmentation algorithm library; The lesion region is re-segmented by the new algorithm to obtain an optimized segmentation result; The Dice coefficient and Jaccard index of the optimized segmentation result are calculated to determine whether the preset threshold value is reached; If the Dice coefficient and Jaccard index do not reach the preset threshold value, the optimization process is repeated; If the Dice coefficient and Jaccard index still do not reach the preset threshold value after multiple optimization iterations, the case is recorded in the list to be reviewed.

Citation Information

Patent Citations

  • Automatic tumor area partition method based on improved level set

    CN104715484A

  • Systems and methods for segmentation and processing of tissue images and feature extraction from same for treating, diagnosing, or predicting medical conditions

    US20130230230A1