Acute pancreatitis early stage grading prediction method
By automatically segmenting the pancreatic region using the nnU-Net model and extracting features using radiomics tools, the objectivity and consistency issues in early grading prediction of acute pancreatitis are resolved, improving the accuracy of early identification and risk assessment of acute pancreatitis and assisting clinical decision-making.
Patent Information
- Application Number
- CN202511812745.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-01-02
AI Technical Summary
Existing technologies cannot achieve early grading and prediction of acute pancreatitis. Traditional methods are time-consuming and easily influenced by experience. Their performance degrades significantly in multi-institutional and multi-device scenarios, failing to meet clinical needs.
By collecting CT image data from different equipment sources, the pancreatic region is automatically segmented using the nnU-Net model. Multi-dimensional image features are extracted using radiomics tools, and key predictive features are selected using a feature selection algorithm. These features are then input into a machine learning model for risk prediction.
This achieves objectivity and consistency in the early grading of pancreatitis, provides scientific evidence to assist clinical decision-making, and improves patient survival rates.
Smart Images

Figure CN121260481A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of medical image processing, in particular to an acute pancreatitis early-stage grading prediction method. BACKGROUND
[0002] The severity assessment of acute pancreatitis (AP) is a core problem in clinical diagnosis and treatment. Traditional methods mainly rely on clinical scoring systems (such as APACHE-II and Ranson score) and manual image evaluation (such as Balthazar CT score). These methods have the following problems: (1) APACHE-II score needs to rely on ICU parameters, and Ranson score needs 48 hours to complete, which cannot realize early prediction and delays the treatment window; (2) traditional image evaluation needs doctors to manually draw the pancreas region, which is time-consuming and easily affected by experience, resulting in inconsistent results; (3) existing AI models are mostly based on single-center data, and in the cross-institutional and multi-device scene, the performance is significantly reduced due to the difference in data distribution, and the external validation AUC is often lower than 0.70. SUMMARY
[0003] The application aims to overcome the shortcomings of the prior art and provide an acute pancreatitis early-stage grading prediction method.
[0004] The purpose of the application is achieved by the following technical scheme: an acute pancreatitis early-stage grading prediction method, comprising the following steps:
[0005] S1: Collect CT image data of AP patients in different clinical situations and from different devices, perform resampling standardization processing on the CT image data, combine the CT image and the corresponding pancreas mask image into two-channel data and save them;
[0006] S2: input the CT image into the nnU-Net model optimized by training, optimize the model parameters through five-fold cross-validation, automatically segment the pancreas region, and generate a pancreas segmentation mask;
[0007] S3: use an imageomics tool to extract multi-dimensional image features from the CT image corresponding to the pancreas segmentation mask, and use a feature screening algorithm to screen out key prediction features;
[0008] S4: input the screened key prediction features into a pre-trained machine learning model, and output the risk prediction result of the AP patient to the SAP progression and the corresponding evaluation index.
[0009] Preferably, in step S1, the standardization processing of the CT image data is specifically resampling all data with 1mmx1mmx1mm, and eliminating data that does not meet the standard.
[0010] Preferably, in step S2, the optional network structure of the nnU-Net model includes 2d, 3d_cascade_fullres, 3d_fullres, or 3d_lowers, and a dynamic learning rate adjustment strategy is adopted during training, with the output pancreas segmentation mask having a Dice coefficient ≥ 0.72.
[0011] Preferably, in step S3, after automatic segmentation is completed, the PyRadiomics library extracts radiomics features from the segmented pancreatic region. The extracted multi-dimensional image features include wavelet transform features, gray-level co-occurrence matrix features, first-order statistical features, and multi-scale filtering features.
[0012] Preferably, in step S3, the initial number of extracted features is 985, and after screening, 15 key prediction features are obtained.
[0013] Preferably, in step S3, feature selection further includes the following steps:
[0014] S31: Select the appropriate t-test method to compare the means of the two groups of data by using the normality test and the homogeneity of variance test;
[0015] S32: Use Optuna to optimize the hyperparameters of the machine learning model, and select the optimal parameter combination for 10-fold cross-validation;
[0016] S33: Weight the duplicate features that appear during cross-validation and select the top 15 key features based on their importance.
[0017] Preferably, in step S4, the evaluation metrics include AUC, accuracy, precision, recall, and F1 score.
[0018] The present invention has the following advantages: The present invention automatically segments the pancreatic region through the nnU-Net model, and then uses radiomics tools to extract multi-dimensional image features from the CT images corresponding to the pancreatic segmentation mask, ensuring the objectivity and consistency of feature extraction. The present invention uses a feature screening algorithm to select key predictive features, providing a scientific basis for the early identification and risk assessment of SAP, thereby assisting clinical decision-making and improving patient survival rate. Attached Figure Description
[0019] Figure 1 A schematic diagram of the technical route for early grading and prediction of acute pancreatitis;
[0020] Figure 2 A diagram illustrating the comparison between manual segmentation and automatic segmentation based on nnUNet;
[0021] Figure 3 A diagram illustrating the ranking of the top 15 most important features for LightGBM.
[0022] Figure 4 A diagram illustrating the ranking of the top 15 most important features for a logistic regression model;
[0023] Figure 5 A diagram illustrating the ranking of the top 15 most important features for random forest selection;
[0024] Figure 6 A schematic diagram illustrating the ranking of the top 15 features by importance using a combination of t-test and Lasso analysis;
[0025] Figure 7 A schematic diagram illustrating the ranking of the top 15 features by importance in the joint elasticity network screening using the t-test;
[0026] Figure 8 This is a schematic diagram of the Data B confusion matrix;
[0027] Figure 9 This is a schematic diagram of the Data C confusion matrix. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0029] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0030] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other.
[0031] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0032] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use, or the orientation or positional relationship commonly understood by those skilled in the art. They are only used for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0033] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0034] In this embodiment, as Figure 1 As shown, a method for predicting the early grading of acute pancreatitis includes the following steps:
[0035] S1: CT image data of AP patients with different clinical conditions and from different equipment sources were collected. The CT image data underwent resampling and standardization, and the CT images were combined with the corresponding pancreatic mask images into two-channel data and saved. Specifically, CT image data of AP patients with different clinical conditions and from different equipment sources were collected to ensure sample diversity and enhance the generalizability and representativeness of the research results. To ensure data quality and consistency and prevent model bias in single-center model development, rigorous preprocessing was performed on data from different medical centers, with clear inclusion and exclusion criteria established. This resulted in a standardized AP dataset: Data A, Data B, and Data C were graphically standardized, and all data were resampled to 1mm×1mm×1mm, discarding data that did not meet the standards. Simultaneously, enhanced CT images of AP patients and their corresponding pancreatic mask images were combined into two-channel images and saved. This was done to enhance data diversity and avoid model overfitting.
[0036] S2: Input CT images into the trained and optimized nnU-Net model, optimize model parameters through five-fold cross-validation, automatically segment the pancreatic region, and generate a pancreatic segmentation mask;
[0037] S3: Use radiomics tools to extract multi-dimensional image features from CT images corresponding to pancreatic segmentation masks, and use feature filtering algorithms to select key predictive features.
[0038] S4: Input the selected key predictive features into the pre-trained machine learning model, and output the risk prediction results of AP patients progressing to SAP and the corresponding evaluation indicators. Preferably, the evaluation indicators include AUC, accuracy, precision, recall, and F1 score. The pancreatic region is automatically segmented using the nnU-Net model, and then multi-dimensional image features are extracted from the CT images corresponding to the pancreatic segmentation mask using radiomics tools to ensure the objectivity and consistency of feature extraction. A feature selection algorithm is used to select key predictive features, providing a scientific basis for the early identification and risk assessment of SAP, thereby assisting clinical decision-making and improving patient survival rates. In this embodiment, 157 non-severe AP patients and 57 severe AP patients from hospital data from January 1, 2016 to June 30, 2024 were selected as development data. In all AP patients, significant differences were found in the distribution of AP type, MODS, and ICU incidence between the non-severe and severe groups in both the training and test sets. Statistically significant differences were also found in age (P=0.021) and mortality (P<0.001) between the two groups in both the training and validation sets. No significant differences were found in gender between the two groups in the training, validation (P=0.579), and test (P=0.609) sets. Baseline clinical data of patients in the Date A test set are shown in Table 1.
[0039] Table 1
[0040]
[0041]
[0042]
[0043] Table 2 shows the baseline clinical data of patients in Data B and Data C datasets.
[0044] Table 2
[0045]
[0046] Furthermore, in step S2, the optional network structures of the nnU-Net model include 2d, 3d_cascade_fullres, 3d_fullres, or 3d_lowers. A dynamic learning rate adjustment strategy is employed during training, and the Dice coefficient of the output pancreatic segmentation mask is ≥0.72. Specifically, the pancreatic segmentation is trained using the nnUNet framework, automatically adjusting the network architecture and training parameters to improve the model's generalization ability. After training, the model automatically segments unlabeled AP patient CT images to obtain a segmentation mask for the pancreatic region, providing a foundation for subsequent radiomics feature extraction. The optional network structures of the nnU-Net model include 2d, 3d_cascade_fullres, 3d_fullres, or 3d_lowers. Table 3 shows a comparison of different nnU-Net structures and training results on the Data A training set, evaluating the impact of different parameters and model configurations on segmentation performance.
[0047] Table 3
[0048]
[0049] The results show that the model performance gradually improves during the optimization process, and the segmentation effect under each configuration is significantly improved. This provides an efficient and accurate technical guarantee for the automatic segmentation process combined with nnU-Net, laying a solid foundation for subsequent clinical applications and the development of auxiliary diagnostic and treatment systems. The accuracy of the segmentation results is evaluated by comparing them with manually annotated pancreatic masks. Figure 2 As shown, red represents the gold standard for manual segmentation, and green represents automatic segmentation by nnUNet. Figure 2 Comparing the results of manual and automatic segmentation, automatic segmentation yielded better results on the pancreatic body.
[0050] Furthermore, in step S3, after automatic segmentation, the PyRadiomics library extracts radiomics features from the segmented pancreatic region. The extracted multi-dimensional image features include wavelet transform features, gray-level co-occurrence matrix features, first-order statistical features, and multi-scale filtering features. Specifically, after the automatic segmentation model is completed, the PyRadiomics library is used to extract radiomics features from the segmented pancreatic region. For the extracted multi-dimensional image features, this invention further investigates the effectiveness of different feature selection methods, including filter methods and statistical methods, to screen out key features closely related to the severity of acute pancreatitis (AP). The selected radiomics features are input into various machine learning models, including support vector machines (SVM) and random forests (RF). By comparing with different algorithms, their classification performance in predicting the severity of AP patients, especially severe acute pancreatitis (SAP), is evaluated. Through methods such as cross-validation, the most effective model is constructed. To develop an accurate early AP severity classification prediction model, a selection of machine learning models was undertaken. These models included vector machines, logistic regression, gradient boosting, CatBoost, XGBoost, and AdaBoost. During the model selection phase, a grid search method was used to find the optimal model parameter configuration. Under the same feature selection mechanism, 10-fold cross-validation was employed to calculate the AUC performance of each model on the training set. The performance of different models was compared based on the cross-validation results to select the best model. The best-performing fold in the validation set was selected as the model. Finally, the model was evaluated on an internal test set to obtain the specific AUC and accuracy. The Date A test set was used as the internal test set to evaluate the predictive ability of the constructed model. Data from Date B and Date C were fed into the constructed system to observe its accuracy, F1 score, recall, precision, and AUC in AP severity classification prediction, thereby evaluating the effectiveness, robustness, and generalizability of the developed model.
[0051] In this embodiment, in step S3, the initial number of extracted features is 985, and after screening, 15 key prediction features are obtained. Furthermore, step S3, the feature screening also includes the following steps:
[0052] S31: Select the appropriate t-test method to compare the means of the two groups of data by using the normality test and the homogeneity of variance test;
[0053] S32: Use Optuna to optimize the hyperparameters of the machine learning model, and select the optimal parameter combination for 10-fold cross-validation;
[0054] S33: Duplicate features encountered during cross-validation are weighted to select the top 15 most important features. Specifically, compared to feature selection methods such as LightGBM, Random Forest, Logistic Regression, simple LASSO joint t-test, and pure Elastic Network joint t-test, the LightGBM method achieves the best average AUC for cross-validation, with results of 0.8784, 0.7773, 0.6672, and 0.711 respectively. The importance ranking of the selected features for each method is shown below. Figures 3-7 As shown, the common features analysis is presented in Table 4.
[0055] Table 4
[0056]
[0057] This combined model identified 15 predictive features, specifically: "Wavelet-LLL gray-level region size matrix small area emphasis," "Wavelet-LLL gray-level region size matrix region size non-uniformity normalization," "Wavelet-LLL gray-level co-occurrence matrix maximum probability," "Wavelet-LHL gray-level co-occurrence matrix information metric correlation 1," "Wavelet-LLH gray-level co-occurrence matrix information metric correlation 1," "Wavelet-LHL gray-level region size matrix small area low gray-level emphasis," "Wavelet-HLH gray-level co-occurrence matrix information metric correlation 1," "Wavelet-HHL gray-level region size matrix region variance," "Wavelet-HHH gray-level region size matrix small area high gray-level emphasis," "Original image gray-level dependency matrix large dependency emphasis," "Wavelet-HHL gray-level region size matrix small area low gray-level emphasis," "Wavelet-LHH gray-level region size matrix region entropy," "Gaussian Laplacian-3 mm-3D first-order statistic minimum," "Original image morphological feature elongation," and "Wavelet-HLH..." The "High Gray-Level Emphasis" feature in the gray-level dependency matrix is explained in detail below: Wavelet-XXX at the beginning of the feature name indicates that the feature was extracted from a specific sub-band image after a 3D wavelet transform; LLL represents low-frequency filtering in all three directions, primarily capturing the large-scale smooth structure and overall trend of the image; LHL, HLH, LLH, HHL, HHH, etc., contain one or more high-frequency filters, primarily capturing details, edges, and texture variations in specific directions. Features based on the gray-level region size matrix: These features analyze the size and gray-level distribution of connected regions (called "regions") with the same gray-level value in an image. Specifically: Small Area Emphasis: Measures the proportion and dominance of small-sized regions in the image. Higher values indicate that the image is composed of many small, fragmented regions, with finer or more chaotic textures. Region Size Non-uniformity Normalization: Evaluates whether the distribution of regions of different sizes in the image is uniform. Lower values indicate more uniform region sizes; higher values indicate greater size differences and more uneven distribution. Small Area Low Gray-Level Emphasis: Comprehensively measures small and dark regions in the image. High values indicate the presence of many dark spots or fine structures. Region variance: Measures the dispersion of all region sizes. A large variance indicates significant differences in region size and a wide size distribution range. Small area high grayscale emphasis: A comprehensive measure of small, bright areas in an image; a high value indicates the presence of many bright spots or highlight details. Region entropy: Measures the randomness and complexity of the joint distribution of region size and grayscale. A higher entropy value indicates a more complex and unpredictable region pattern. Features based on the gray-level co-occurrence matrix: These features quantify the texture roughness, contrast, and regularity of an image by analyzing the spatial relationships of pixel pairs in specific directions and distances. Specifically: Maximum probability: Identifies the most common pixel pair combinations in the image (i.e., the strongest spatial relationship); a high value indicates that a specific texture pattern is highly repetitive and dominant in the image.Information Measurement Correlation 1: This feature comprehensively evaluates the complexity of image texture and the linear dependencies between pixels, integrating entropy and correlation. Changes in values reflect the regularity of texture patterns. Features based on the gray-level dependency matrix: These features analyze the gray-level dependency of each pixel with its neighboring pixels, describing the roughness and contrast of the image. Specifically: High Dependency Emphasis: Emphasizes large, uniform gray-level areas in the image. Higher values indicate the presence of large areas with similar gray-level values, suggesting a potentially rougher and more uniform texture. High Gray-Level Emphasis: Emphasizes high-brightness (high gray-level) pixel groups in the image. Higher values indicate that bright pixels tend to cluster together, forming bright areas. First-Order Statistical Features: These features are calculated directly from the image's gray-level histogram, without involving spatial relationships, describing the overall distribution characteristics of pixel values. Specifically: Minimum Value: The lowest gray-level value among all pixels in the image, directly reflecting the intensity of the darkest part of the image. Morphological Features: These features describe the geometric shape characteristics of the segmented target region in three-dimensional space. Specifically: Elongation: Describes the degree of elongation or flattening of the target shape. The closer the value is to 1, the closer the shape is to a sphere or cube; the larger the value, the more the shape resembles a stick or a flat sheet. It quantifies the ratio of the length of the principal axis to the length of the secondary axis of the shape. This shows that wavelet transform features dominate in all five methods, indicating that multi-scale texture analysis is crucial for prediction tasks; gray-level co-occurrence matrix features (such as glcm_Correlation) and first-order statistics (such as mean and kurtosis) are repeatedly selected in various methods, reflecting the robust predictive power of the basic statistics; multi-scale filtering features are preserved in both nonlinear models (random forest) and sparse linear models (Lasso+T), indicating their effectiveness under different modeling assumptions.
[0058] In this embodiment, the TabPFN model is used as the classification model, and the model that performs best on the validation set is selected for evaluation. Evaluation results on the internal test set show that the model achieves an AUC of 0.74 and an accuracy of 0.75. These results demonstrate that the predictive model based on radiomics features and machine learning algorithms exhibits high performance and stability in predicting the risk of severe acute pancreatitis. This research not only provides strong technical support for the early identification of acute pancreatitis but also offers a feasible reference framework for the future radiological prediction of related diseases, possessing significant academic value and practical clinical application potential. As shown in Tables 5 and 6, Table 5 presents the best-fit results for each model's training and validation sets, and Table 6 details the specific results for each model's test set.
[0059] Table 5
[0060]
[0061] Table 6
[0062]
[0063] The model was evaluated using an external test set (Data B and Data C) and through a confusion matrix, such as... Figure 8 and Figure 9 As shown in Table 7, the evaluation indicators are as follows.
[0064] Table 7
[0065]
[0066] The results show that the trained model performs stably on different datasets, exhibiting high prediction accuracy and robustness. A comprehensive analysis of the evaluation coefficients further validates the model's effectiveness in image analysis of acute pancreatitis.
[0067] This invention is currently in the implementation phase. The backend for automatic segmentation, feature selection, feature extraction, and AP prediction has been integrated. An integrated automatic AP segmentation and prediction system has been developed based on the PyQ5k architecture. The upcoming automatic segmentation model will be integrated with a machine learning prediction model, forming a complete AP severity prediction system based on a B / S architecture. This system will provide automated pancreatic segmentation and severity assessment functions to assist clinicians in developing early diagnostic plans. The system will undergo comprehensive evaluation of its effectiveness, generalization, and clinical applicability on an external test set to ensure its applicability in different clinical environments. PyQ5k is a Python binding library based on the Qt framework, employing a local client / server architecture. It provides developers with a complete solution for building cross-platform desktop applications using Python. This architecture perfectly combines the ease of use of Python with the high performance of the Qt framework by encapsulating the powerful C++ low-level functions of Qt5 into a Python interface. PyQt5's core advantage lies in its modular design structure, including core modules such as QtCore, QtGui, and QtWidgets. It supports an event-driven mechanism using signals and slots, achieving efficient decoupling between business logic and the user interface. Its cross-platform nature allows the same code to run seamlessly on operating systems such as Windows, macOS, and Linux. It also provides support for both traditional QWidgets and modern QML interface development methods, and can embed web content through QtWebEngine.
[0068] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for early grading and prediction of acute pancreatitis, characterized in that: Includes the following steps: S1: Collect CT image data of AP patients with different clinical conditions and different equipment sources, perform resampling and standardization processing on CT image data, combine CT images with corresponding pancreatic mask images into two-channel data and save them. S2: Input CT images into the trained and optimized nnU-Net model, optimize model parameters through five-fold cross-validation, automatically segment the pancreatic region, and generate a pancreatic segmentation mask; S3: Use radiomics tools to extract multi-dimensional image features from CT images corresponding to pancreatic segmentation masks, and use feature filtering algorithms to select key predictive features. S4: Input the selected key predictive features into the pre-trained machine learning model, and output the risk prediction results of AP patients progressing to SAP and the corresponding evaluation indicators.
2. The method for early grading and prediction of acute pancreatitis according to claim 1, characterized in that: In step S1, the standardization of CT image data specifically involves resampling all data at 1mm×1mm×1mm and removing data that does not meet the standard.
3. The method for early grading and prediction of acute pancreatitis according to claim 2, characterized in that: In step S2, the optional network structure of the nnU-Net model includes 2d, 3d_cascade_fullres, 3d_fullres or 3d_lowers. During training, a dynamic learning rate adjustment strategy is adopted, and the Dice coefficient of the output pancreas segmentation mask is ≥0.
72.
4. The method for early grading and prediction of acute pancreatitis according to claim 3, characterized in that: In step S3, after automatic segmentation is completed, the PyRadiomics library extracts radiomics features from the segmented pancreatic region. The extracted multi-dimensional image features include wavelet transform features, gray-level co-occurrence matrix features, first-order statistical features, and multi-scale filtering features.
5. The method for early grading and prediction of acute pancreatitis according to claim 4, characterized in that: In step S3, the initial number of extracted features is 985, and after screening, 15 key prediction features are obtained.
6. The method for early grading and prediction of acute pancreatitis according to claim 5, characterized in that: In step S3, feature filtering also includes the following steps: S31: Select the appropriate t-test method to compare the means of the two groups of data by using the normality test and the homogeneity of variance test; S32: Use Optuna to optimize the hyperparameters of the machine learning model, and select the optimal parameter combination for 10-fold cross-validation; S33: Weight the duplicate features that appear during cross-validation and select the top 15 key features based on their importance.
7. The method for early grading and prediction of acute pancreatitis according to claim 6, characterized in that: In step S4, the evaluation metrics include AUC, accuracy, precision, recall, and F1 score.
Citation Information
Patent Citations
Severe pancreatitis prediction model construction method based on machine learning method
CN114141363A
Data processing method and device for early prediction of severe pancreatitis and storage medium
CN115240840A
Pancreas segmentation model construction method based on enhanced CT and three-dimensional mask
CN119313692A
Method for constructing acute pancreatitis severity prediction model based on liquid neural network
CN120015340A
Automatic blood vessel segmentation method and system for CT (Computed Tomography) image
CN120707850A