Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jul 23:2025:1506567.
doi: 10.1155/grp/1506567. eCollection 2025.

Use of Modified YOLOv5 Algorithm in the Differential Diagnosis of Colonic Crohn's Disease and Ulcerative Colitis on CTE Images

Affiliations

Use of Modified YOLOv5 Algorithm in the Differential Diagnosis of Colonic Crohn's Disease and Ulcerative Colitis on CTE Images

Mingbo Bao et al. Gastroenterol Res Pract. .

Abstract

Background: Inflammatory bowel disease (IBD) is an immune-mediated disorder characterized by intestinal inflammation and includes two subtypes: Crohn's disease (CD) and ulcerative colitis (UC). The computed tomography manifestations of colonic CD (cCD) and UC are similar, and differential diagnosis is challenging. Our study aimed to investigate the feasibility of using a modified YOLOv5 algorithm for differentiating between cCD and UC on computed tomography enterography (CTE) images. Methods: This multicenter retrospective study analyzed data from a total of 29 cCD patients and 29 UC patients. Five submodels (YOLOv5n, YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x) of YOLOv5 were trained and evaluated on the datasets. The CTE images of the cCD group and UC group were divided into a training set, validation set, and test set at a ratio of 8:1:1. Finally, the precision (Pr), recall rate (Rc), and mean average precision (mAP_0.5 and mAP_0.5:0.95) of the models were compared. Results: The YOLOv5x model showed the best performance among the five submodels, with mAP_0.5 of 0.97 and mAP_0.5:0.95 of 0.97 and 0.84 in the validation set and mAP_0.5 and mAP_0.5:0.95 of 0.97 and 0.83 in the test set, respectively. These results demonstrated similar diagnostic accuracy to the two radiologists (84.5%). Conclusion: The modified YOLOv5 algorithm is a feasible approach to distinguish between cCD and UC on CTE images. These findings may facilitate the early detection and differential diagnosis of IBD.

Keywords: artificial intelligence; diagnosis; inflammatory bowel disease; machine learning.

PubMed Disclaimer

Conflict of interest statement

The authors declare no conflicts of interest.

Figures

Figure 1
Figure 1
Flow chart of this study.
Figure 2
Figure 2
Distribution plot of the labeled data. X, Y: label coordinates in the CTE images. Width, height: width and height of the label. Instances: the number of labels. cCD and UC refer to the cCD group and UC group, respectively. A darker color indicates more data.
Figure 3
Figure 3
The architecture of YOLOv5, mainly involving the input, calculation process, and output.
Figure 4
Figure 4
Schematic view of the loss function and IoU/GIoU calculation. (a) The coordinates used to calculate S1 and S2. (b) The calculation method for S1 and IoU. (c) The calculation method for GIoU.
Figure 5
Figure 5
Learning curves of YOLOv5x. Train/Val/box_loss: bounding box detection loss of training set/testing set; Train/Val/obj_loss: object detection loss of training set/testing set; Train/Val/cls_loss: classification loss of training set/testing set. mAP_0.5:0.95: denotes the mean mAP at the GIoU threshold from 0.5 to 0.95 with a step width of 0.0 (0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, and 0.95). mAP_0.5: mAP with GIoU threshold set at 0.5.
Figure 6
Figure 6
Feature map of a cCD CTE image in the C3x module. Different feature maps from different convolutional layers can be observed in the figure.
Figure 7
Figure 7
The results of five submodels of YOLOv5 in the detection and classification of cCD (top row) and UC (bottom row) on computed tomography enterography (CTE) images. The CT signs of those two cases were very similar on CTE images. YOLOv5n obtained the lowest confidence score among the submodels, while the confidence score of YOLOv5x was the highest.

Similar articles

References

    1. Alatab S., Sepanlou S. G., Ikuta K., et al. The Global, Regional, and National Burden of Inflammatory Bowel Disease in 195 Countries and Territories, 1990-2017: A Systematic Analysis for the Global Burden of Disease Study 2017. Lancet Gastroenterology and Hepatology . 2020;5(1):17–30. doi: 10.1016/S2468-1253(19)30333-4. - DOI - PMC - PubMed
    1. Singh S., Qian A. S., Nguyen N. H., et al. Trends in U.S. Health Care Spending on Inflammatory Bowel Diseases, 1996-2016. Inflammatory Bowel Diseases . 2022;28(3):364–372. doi: 10.1093/ibd/izab074. - DOI - PMC - PubMed
    1. Lewis J. D., Parlett L. E., Jonsson Funk M. L., et al. Incidence, Prevalence, and Racial and Ethnic Distribution of Inflammatory Bowel Disease in the United States. Gastroenterology . 2023;165(5):1197–1205.e2. doi: 10.1053/j.gastro.2023.07.003. - DOI - PMC - PubMed
    1. Gilliland A., Chan J. J., De Wolfe T. J., Yang H., Vallance B. A. Pathobionts in Inflammatory Bowel Disease: Origins, Underlying Mechanisms, and Implications for Clinical Care. Gastroenterology . 2024;166(1):44–58. doi: 10.1053/j.gastro.2023.09.019. - DOI - PubMed
    1. Satsangi J., Silverberg M. S., Vermeire S., Colombel J. F. The Montreal Classification of Inflammatory Bowel Disease: Controversies, Consensus, and Implications. Gut . 2006;55(6):749–753. - PMC - PubMed

LinkOut - more resources