1.Constructing and validation of a predictive model and application program for stone recurrence after endoscopic retrograde cholangiopancreatography based on machine learning algorithms in patients with common bile duct stones
Jian CHEN ; Kaijian XIA ; Fuli GAO ; Yu DING ; Ganhong WANG ; Xiaodan XU
Chinese Journal of Postgraduates of Medicine 2025;48(5):452-460
Objective:To construct and validate a predictive model and application program for stone recurrence after endoscopic retrograde cholangiopancreatography (ERCP) based on machine learning algorithms in patients with common bile duct stones (CBDS).Methods:A multicenter retrospective cohort study was conducted, 862 CBDS patients underwent ERCP from June 2020 to September 2023 in Changshu First People′s Hospital (data set 1, 759 cases, including a training set of 588 cases and a validation set of 171 cases) and Changshu Hospital of Traditional Chinese Medicine (data set 2, 103 cases, used as a test set). The demographics, medical history, ERCP procedural records and laboratory indices were collected. All patients were followed up for 1 year, and the stone recurrence was recorded. In training set, the feature selection was conducted by the least absolute shrinkage and selection operator (LASSO) algorithm, and a conventional Logistic regression model was constructed based on selected features. The 3 machine learning algorithms (gradient boosting machine model, extreme gradient boosting model and random forest model) and a conventional Logistic regression model (LASSO model) were trained to fit predictive models. The model performance was assessed by area under curve (AUC) of receiver operating characteristic curve. The model interpretability was analyzed by feature importance evaluation, Shapley additive explanations (SHAP) and force plots. The best-performing model was deployed as an online application by Streamlit framework (V1.36.0).Results:Among the 862 patients, 158 patients (18.33%) developed stone recurrence after ERCP. There were no statistical difference in demographics, medical history, ERCP procedural records and laboratory indices between training set and a validation set ( P>0.05). LASSO regression analysis result showed that 6 key variables (in descending order of significance: endoscopic sphincterotomy, common bile duct angulation, stone diameter, stone count, common bile duct diameter, and periampullary diverticulum) influencing stone recurrence. ROC curve analysis result showed that the random forest model exhibited the highest predictive performance (it had the largest AUC of 0.900). SHAP analysis result showed that common bile duct angulation, common bile duct diameter, stone diameter, endoscopic sphincterotomy and stone count were the top 5 contributing factors in the random forest model. Using Python, the random forest model was implemented into a Streamlit-based application with a user-friendly visual interface, providing predictive outcomes, confidence levels, SHAP force diagram and health recommendations. In the test set, the application program achieved an accuracy of 84.5% (87/103), sensitivity of 82.6% (19/23), and specificity of 85.0% (68/80). SHAP plots and force diagram intuitively illustrated the impact of key features on stone recurrence prediction, offering a clear visualization of each variable′s role within the model. Conclusions:The predictive model and application program based on the random forest machine learning algorithms demonstrate excellent predictive performance and practical usability in predicting stone recurrence after ERCP in patients with CBDS.
2.Construction of artificial intelligence models for multi-category lesion detection in small bowel capsule endoscopy based on various YOLO neural networks
Jian CHEN ; Ganhong WANG ; Jianjun DAI ; Kaijian XIA ; Xiaodan XU ; Ying SUN
Chinese Journal of Medical Physics 2025;42(5):693-700
Objective To construct YOLOv10 based artificial intelligence(AI)models for the automatic detection in small bowel capsule endoscopy(SBCE)images.Methods SBCE data from two centers was collected,including 23 115 images and 35 412 annotated labels covering 11 categories of small bowel lesions.The images were annotated using the LabelMe tool and converted into the YOLO format required for deep learning model development.The pre-trained YOLOv10 and YOLOv8 models were used for transfer learning training on the constructed dataset.Model performance was comprehensively evaluated using metrics such as precision,accuracy,sensitivity,specificity,false-positive rate,and detection speed.Finally,the models were deployed on local computers for real-time detection of SBCE images and videos.Results Six different versions of YOLO object detection models were developed,namely YOLOv8n,YOLOv8s,YOLOv8m,YOLOv10n,YOLOv10s,and YOLOv10m.On the validation set,YOLOv10s model achieved the best mAP50(0.795);although its inference latency was not the fastest(4.803 ms/img),it met the requirements for clinical application.On the test set,YOLOv10s performed well,with an accuracy of 92.69%,a sensitivity of 89.23%,and a false-positive rate of 4.78%.Especially,in category-specific inference,the highest sensitivity was for"bleeding"at 96.41%,while the lowest was for"narrowing"at 82.29%.Conclusion The model constructed based on YOLOv10 neural network can rapidly and accurately detect and classify various small bowel lesions,exhibiting significant clinical application potential.
3.Development of a predictive model and application for spontaneous passage of common bile duct stones based on automated machine learning
Jian CHEN ; Kaijian XIA ; Fuli GAO ; Luojie LIU ; Ganhong WANG ; Xiaodan XU
Journal of Clinical Hepatology 2025;41(3):518-527
ObjectiveTo develop a predictive model and application for spontaneous passage of common bile duct stones using automated machine learning algorithms given the complexity of treatment decision-making for patients with common bile duct stones, and to reduce unnecessary endoscopic retrograde cholangiopancreatography (ERCP) procedures. MethodsA retrospective analysis was performed for the data of 835 patients who were scheduled for ERCP after a confirmed diagnosis of common bile duct stones based on imaging techniques in Changshu First People’s Hospital (dataset 1) and Changshu Traditional Chinese Medicine Hospital (dataset 2). The dataset 1 was used for the training and internal validation of the machine learning model and the development of an application, and the dataset 2 was used for external testing. A total of 22 potential predictive variables were included for the establishment and internal validation of the LASSO regression model and various automated machine learning models. The area under the receiver operating characteristic curve (AUC), sensitivity, specificity, and accuracy were used to assess the performance of models and identify the best model. Feature importance plots, force plots, and SHAP plots were used to interpret the model. The Python Dash library and the best model were used to develop a web application, and external testing was conducted using the dataset 2. The Kolmogorov-Smirnov test was used to examine whether the data were normally distributed, and the Mann-Whitney U test was used for comparison between two groups, while the chi-square test or the Fisher’s exact test was used for comparison of categorical data between groups. ResultsAmong the 835 patients included in the study, 152 (18.20%) experienced spontaneous stone passage. The LASSO model achieved an AUC of 0.875 in the training set (n=588) and 0.864 in the validation set (n=171), and the top five predictive factors in terms of importance were solitary common bile duct stones, non-dilated common bile duct, diameter of common bile duct stones, a reduction in serum alkaline phosphatase (ALP), and a reduction in gamma-glutamyl transpeptidase (GGT). A total of 55 models were established using automated machine learning, among which the gradient boosting machine (GBM) model had the best performance, with an AUC of 0.891 (95% confidence interval: 0.859 — 0.927), outperforming the extreme randomized tree mode, the deep learning model, the generalized linear model, and the distributed random forest model. The GBM model had an accuracy of 0.855, a sensitivity of 0.846, and a specificity of 0.857 in the test set (n=76). The variable importance analysis showed that five factors had important influence on the prediction of spontaneous stone passage, i.e., were solitary common bile duct stones, non-dilated common bile duct, a stone diameter of <8 mm, a reduction in serum ALP, and a reduction in GGT. The SHAP analysis of the GBM model showed a significant increase in the probability of spontaneous stone passage in patients with solitary common bile duct stones, non-dilated common bile duct, a stone diameter of <8 mm, and a reduction in serum ALP or GGT. ConclusionThe GBM model and application developed using automated machine learning algorithms exhibit excellent predictive performance and user-friendliness in predicting spontaneous stone passage in patients with common bile duct stones. This application can help avoid unnecessary ERCP procedures, thereby reducing surgical risks and healthcare costs.
4.Construction of an artificial intelligence-assisted system for auxiliary detection of auricular point features based on the YOLO neural network.
Ganhong WANG ; Zihao ZHANG ; Kaijian XIA ; Yanting ZHOU ; Meijuan XI ; Jian CHEN
Chinese Acupuncture & Moxibustion 2025;45(4):413-420
OBJECTIVE:
To develop an artificial intelligence-assisted system for the automatic detection of the features of common 21 auricular points based on the YOLOv8 neural network.
METHODS:
A total of 660 human auricular images from three research centers were collected from June 2019 to February 2024. The rectangle boxes and features of images were annotated using the LabelMe5.3.1 tool and converted them into a format compatible with the YOLO model. Using these data, transfer learning and fine-tuning training were conducted on different scales of pretrained YOLO neural network models. The model's performance was evaluated on validation and test sets, including the mean average precision (mAP) at various thresholds, recall rate (recall), frames per second (FPS) and confusion matrices. Finally, the model was deployed on a local computer, and the real-time detection of human auricular images was conducted using a camera.
RESULTS:
Five different versions of the YOLOv8 key-point detection model were developed, including YOLOv8n, YOLOv8s, YOLOv8m, YOLOv8l, and YOLOv8x. On the validation set, YOLOv8n showed the best performance in terms of speed (225.736 frames per second) and precision (0.998). On the external test set, YOLOv8n achieved the accuracy of 0.991, the sensitivity of 1.0, and the F1 score of 0.995. The localization performance of auricular point features showed the average accuracy of 0.990, the precision of 0.995, and the recall of 0.997 under 50% intersection ration (mAP50).
CONCLUSION
The key-point detection model of 21 common auricular points based on YOLOv8n exhibits the excellent predictive performance, which is capable of rapidly and automatically locating and classifying auricular points.
Humans
;
Neural Networks, Computer
;
Artificial Intelligence
;
Acupuncture Points
5.Construction of artificial intelligence models for multi-category lesion detection in small bowel capsule endoscopy based on various YOLO neural networks
Jian CHEN ; Ganhong WANG ; Jianjun DAI ; Kaijian XIA ; Xiaodan XU ; Ying SUN
Chinese Journal of Medical Physics 2025;42(5):693-700
Objective To construct YOLOv10 based artificial intelligence(AI)models for the automatic detection in small bowel capsule endoscopy(SBCE)images.Methods SBCE data from two centers was collected,including 23 115 images and 35 412 annotated labels covering 11 categories of small bowel lesions.The images were annotated using the LabelMe tool and converted into the YOLO format required for deep learning model development.The pre-trained YOLOv10 and YOLOv8 models were used for transfer learning training on the constructed dataset.Model performance was comprehensively evaluated using metrics such as precision,accuracy,sensitivity,specificity,false-positive rate,and detection speed.Finally,the models were deployed on local computers for real-time detection of SBCE images and videos.Results Six different versions of YOLO object detection models were developed,namely YOLOv8n,YOLOv8s,YOLOv8m,YOLOv10n,YOLOv10s,and YOLOv10m.On the validation set,YOLOv10s model achieved the best mAP50(0.795);although its inference latency was not the fastest(4.803 ms/img),it met the requirements for clinical application.On the test set,YOLOv10s performed well,with an accuracy of 92.69%,a sensitivity of 89.23%,and a false-positive rate of 4.78%.Especially,in category-specific inference,the highest sensitivity was for"bleeding"at 96.41%,while the lowest was for"narrowing"at 82.29%.Conclusion The model constructed based on YOLOv10 neural network can rapidly and accurately detect and classify various small bowel lesions,exhibiting significant clinical application potential.
6.Constructing and validation of a predictive model and application program for stone recurrence after endoscopic retrograde cholangiopancreatography based on machine learning algorithms in patients with common bile duct stones
Jian CHEN ; Kaijian XIA ; Fuli GAO ; Yu DING ; Ganhong WANG ; Xiaodan XU
Chinese Journal of Postgraduates of Medicine 2025;48(5):452-460
Objective:To construct and validate a predictive model and application program for stone recurrence after endoscopic retrograde cholangiopancreatography (ERCP) based on machine learning algorithms in patients with common bile duct stones (CBDS).Methods:A multicenter retrospective cohort study was conducted, 862 CBDS patients underwent ERCP from June 2020 to September 2023 in Changshu First People′s Hospital (data set 1, 759 cases, including a training set of 588 cases and a validation set of 171 cases) and Changshu Hospital of Traditional Chinese Medicine (data set 2, 103 cases, used as a test set). The demographics, medical history, ERCP procedural records and laboratory indices were collected. All patients were followed up for 1 year, and the stone recurrence was recorded. In training set, the feature selection was conducted by the least absolute shrinkage and selection operator (LASSO) algorithm, and a conventional Logistic regression model was constructed based on selected features. The 3 machine learning algorithms (gradient boosting machine model, extreme gradient boosting model and random forest model) and a conventional Logistic regression model (LASSO model) were trained to fit predictive models. The model performance was assessed by area under curve (AUC) of receiver operating characteristic curve. The model interpretability was analyzed by feature importance evaluation, Shapley additive explanations (SHAP) and force plots. The best-performing model was deployed as an online application by Streamlit framework (V1.36.0).Results:Among the 862 patients, 158 patients (18.33%) developed stone recurrence after ERCP. There were no statistical difference in demographics, medical history, ERCP procedural records and laboratory indices between training set and a validation set ( P>0.05). LASSO regression analysis result showed that 6 key variables (in descending order of significance: endoscopic sphincterotomy, common bile duct angulation, stone diameter, stone count, common bile duct diameter, and periampullary diverticulum) influencing stone recurrence. ROC curve analysis result showed that the random forest model exhibited the highest predictive performance (it had the largest AUC of 0.900). SHAP analysis result showed that common bile duct angulation, common bile duct diameter, stone diameter, endoscopic sphincterotomy and stone count were the top 5 contributing factors in the random forest model. Using Python, the random forest model was implemented into a Streamlit-based application with a user-friendly visual interface, providing predictive outcomes, confidence levels, SHAP force diagram and health recommendations. In the test set, the application program achieved an accuracy of 84.5% (87/103), sensitivity of 82.6% (19/23), and specificity of 85.0% (68/80). SHAP plots and force diagram intuitively illustrated the impact of key features on stone recurrence prediction, offering a clear visualization of each variable′s role within the model. Conclusions:The predictive model and application program based on the random forest machine learning algorithms demonstrate excellent predictive performance and practical usability in predicting stone recurrence after ERCP in patients with CBDS.
7.Establishment of an artificial intelligence-assisted system for automatic lesion recognition in small intestinal capsule endoscopy based on convolutional networks
Jian CHEN ; Bin SUN ; Ganhong WANG ; Kaijian XIA ; Xiaodan XU
Chinese Journal of Digestive Endoscopy 2025;42(11):853-863
Objective:To develop and validate an artificial intelligence-assisted system based on convolutional neural networks (CNN) for automatic lesion recognition in small intestinal capsule endoscopy.Methods:Three small intestinal capsule endoscopy datasets were used for training ( n=26 638), validating ( n=6 652), and testing ( n=1 013) the deep learning model, covering 12 lesion categories, including vascular malformations, hemorrhage, erosion, erythema, stenosis, lymphangiectasia, submucosal tumors, polyps, lymphoid follicles, foreign bodies, veins, and normal mucosa. CNN performance was measured by area under receiver operating characteristic curve (AUC), sensitivity, specificity, precision, accuracy, and F1 score, with comparisons with endoscopists of different experience levels. Results:The top-performing model (EfficientNet-CE) achieved 86.28% sensitivity, 98.67% specificity, and AUC of 0.987 4 across all categories. It demonstrated high accuracy (86.28%) and a processing speed of 52.43 frames per second, approximately 42.4 times faster than junior endoscopists (<3 years' experience) and 40.3 times faster than senior endoscopists (>5 years' experience).Conclusion:The CNN-based model allows rapid, accurate identification of 12 small intestinal lesion types and effectively supports endoscopists in reviewing capsule endoscopy examinations due to its high sensitivity.
8.Establishment of an artificial intelligence-assisted system for automatic lesion recognition in small intestinal capsule endoscopy based on convolutional networks
Jian CHEN ; Bin SUN ; Ganhong WANG ; Kaijian XIA ; Xiaodan XU
Chinese Journal of Digestive Endoscopy 2025;42(11):853-863
Objective:To develop and validate an artificial intelligence-assisted system based on convolutional neural networks (CNN) for automatic lesion recognition in small intestinal capsule endoscopy.Methods:Three small intestinal capsule endoscopy datasets were used for training ( n=26 638), validating ( n=6 652), and testing ( n=1 013) the deep learning model, covering 12 lesion categories, including vascular malformations, hemorrhage, erosion, erythema, stenosis, lymphangiectasia, submucosal tumors, polyps, lymphoid follicles, foreign bodies, veins, and normal mucosa. CNN performance was measured by area under receiver operating characteristic curve (AUC), sensitivity, specificity, precision, accuracy, and F1 score, with comparisons with endoscopists of different experience levels. Results:The top-performing model (EfficientNet-CE) achieved 86.28% sensitivity, 98.67% specificity, and AUC of 0.987 4 across all categories. It demonstrated high accuracy (86.28%) and a processing speed of 52.43 frames per second, approximately 42.4 times faster than junior endoscopists (<3 years' experience) and 40.3 times faster than senior endoscopists (>5 years' experience).Conclusion:The CNN-based model allows rapid, accurate identification of 12 small intestinal lesion types and effectively supports endoscopists in reviewing capsule endoscopy examinations due to its high sensitivity.
9.Comparative study on methods for colon polyp endoscopic image segmentation and classification based on deep learning
Jian CHEN ; Zhenni WANG ; Kaijian XIA ; Ganhong WANG ; Luojie LIU ; Xiaodan XU
Journal of Shanghai Jiaotong University(Medical Science) 2024;44(6):762-772
Objective·To compare the performance of various deep learning methods in the segmentation and classification of colorectal polyp endoscopic images,and identify the most effective approach.Methods·Four colorectal polyp datasets were collected from three hospitals,encompassing 1 534 static images and 15 videos.All samples were pathologically validated and categorized into two types:serrated lesions and adenomatous polyps.Polygonal annotations were performed by using the LabelMe tool,and the annotated results were converted into integer mask formats.These data were utilized to train various architectures of deep neural networks,including convolutional neural network(CNN),Transformers,and their fusion,aiming to develop an effective semantic segmentation model.Multiple performance indicators for automatic diagnosis of colon polyps by different architecture models were compared,including mIoU,aAcc,mAcc,mDice,mFscore,mPrecision and mRecall.Results·Four different architectures of semantic segmentation models were developed,including two deep CNN architectures(Fast-SCNN and DeepLabV3plus),one Transformer architecture(Segformer),and one hybrid architecture(KNet).In a comprehensive performance evaluation of 291 test images,KNet achieved the highest mIoU of 84.59%,significantly surpassing Fast-SCNN(75.32%),DeepLabV3plus(78.63%),and Segformer(80.17%).Across the categories of"background","serrated lesions"and"adenomatous polyps",KNet's intersection over union(IoU)were 98.91%,74.12%,and 80.73%,respectively,all exceeding other models.Additionally,KNet performed excellently in key performance metrics,with aAcc,mAcc,mDice,mFscore,and mRecall reaching 98.59%,91.24%,91.31%,91.31%,and 91.24%,respectively,all superior to other models.Although its mPrecision of 91.46%was not the most outstanding,KNet's overall performance remained leading.In inference testing on 80 external test images,KNet maintained an mIoU of 81.53%,demonstrating strong generalization capabilities.Conclusion·The semantic segmentation model of colorectal polyp endoscopic images constructed by deep neural network based on KNet hybrid architecture,exhibits superior predictive performance,demonstrating its potential as an efficient tool for detecting colorectal polyps.
10.Constructing an artificial intelligence assisted system for colonoscopy quality control based on various deep learning architectures
Jian CHEN ; Zihao ZHANG ; Ganhong WANG ; Zhenni WANG ; Kaijian XIA ; Xiaodan XU
Chinese Journal of Medical Physics 2024;41(11):1443-1452
Objective To develop deep learning models for colonoscopy quality control using various deep learning architectures,and to delve into the decision-making mechanisms.Methods The colonoscopy images were selected from two datasets separately constructed by the HyperKvasir and Changshu Hospital Affiliated to Soochow University,encompassing intestines of varying degrees of cleanliness,polyps,and cecums.After image preprocessing and enhancement,transfer learning was carried out using the pre-trained models based on convolutional neural network(CNN)and Transformer.The model training adopted cross-entropy loss functions and Adam optimizer,and simultaneously implemented learning rate scheduling.To enhance model transparency,a thorough interpretability analysis was conducted using Grad-CAM,Guided Grad-CAM,and SHAP.The final model was converted to ONNX format and deployed on various equipment terminals to achieve real-time colonoscopy quality control.Results In a dataset of 3 831 colonoscopy images,EfficientNet model outperformed the other models on the test set,achieving an accuracy of 0.992 which was higher than those of the other models based on CNN(DenseNet121,ResNet50,VGG19)and Transformer(ViT,Swin,CvT),with a precision,recall rate,and F1 score of 0.991,0.989,and 0.990.On an external test set of 358 images,EfficientNet model had an average AUC,precision,and recall rate of 0.996,0.948,and 0.952,respectively.Although EfficientNet model is high-performing,some misjudgments still occurred.Interpretability analysis highlighted key image areas affecting decision-making.In addition,EfficientNet model was successfully converted to ONNX format and deployed on multiple platforms and devices,and it ensured real-time colonoscopy quality control with an inference speed of over 60 frames per second.Conclusion Among the 7 models developed for colonoscopy quality control based on CNN and Transformer,EfficientNet demonstrated exemplary performance across all categories and is deployed for real-time predictions on multiple terminals,aiming to provide patients with better medical care.

Result Analysis
Print
Save
E-mail