Whole Slide Image Analysis Using Deep Learning Helps Map Colon Mucosal Immune Cells in Inflammatory Bowel Disease

by Christos Evangelou, MSc, PhD – Medical Writer and Editor.

Inflammatory bowel diseases (IBDs) are a group of diseases of the gastrointestinal system caused by immunological dysfunction. Ulcerative colitis and Crohn’s disease are associated with significant histopathological alterations in the intestinal mucosal immune cells and are among the most common IBDs. However, determining the differences in the number and distribution of immune cells between the two conditions is challenging because of the lack of high-resolution quantitative methods for analyzing colon mucosal immune cells.

In a recent study, researchers from the Norwegian University of Science and Technology (NTNU) and St. Olav’s Hospital, Trondheim University Hospital, used deep learning to analyze inflammatory patterns on whole slide images (WSIs) of colon mucosal tissues from patients with IBD and healthy controls. The results of the study suggest that the number and distribution of CD3 and γδ T cells differ significantly between patients with ulcerative colitis and those with Crohn’s disease.1

“We found significant differences in the number and distribution of T lymphocytes and the subset of γδ T lymphocytes in colon mucosa between patients with ulcerative colitis, Crohn’s disease, and healthy controls,” said Ingunn Bakke, MD, PhD, Associate Professor at the Department of Clinical and Molecular Medicine and corresponding author of the study.

“Crohn’s mucosa, regardless of disease activity, had significantly fewer γδ T lymphocytes in the epithelium than the uninflamed mucosa of patients with ulcerative colitis. In contrast, patients with Crohn’s disease generally had more T lymphocytes in all parts of the mucosa. During active disease, ulcerative colitis patients had a clear loss of γδ T lymphocytes in the epithelium, while this was not seen in Crohn’s patients,” she added.

Commenting on the clinical relevance of their findings, Dr. Bakke said: “There is a theory that Crohn’s disease represents a deficiency state of innate immunity. Reduced numbers of intraepithelial γδ T cells could fit into such a theory. Our study also provides proof of concept that it is possible for the pathology departments to develop deep learning-based models for diagnostics.”

The study was published in The Journal of Pathology: Clinical Research.


Rationale: Exploring the Distribution of Colon Mucosal Immune Cells

CD3 and intraepithelial γδ T cells patrol the intestinal epithelium and initiate immune responses and tissue repair mechanisms in case of injury or infection. Nevertheless, their role in different disease states in patients with IBD remains unclear. The aim of this study was to develop a machine learning method to assess the distribution of CD3 and γδ T cells in different colon mucosal compartments in patients with histologically inactive and active IBD.

“Manual counting of lymphocytes in the epithelium on WSIs is not very practical nor objective, so we decided to use image analysis software. To be cost-effective and in control, we avoided commercial solutions and based the work entirely on freely available open-source software,” Dr. Bakke noted. “We wanted to develop an easy-to-use pipeline, which included both training and deployment of deep learning networks on WSIs, without the need to hire programmers or buy commercial software,” she explained.


Approach: Using a Machine Learning Segmentation Model

Automated segmentation and quantification provide more objective and reproducible results than semi-quantitative visual estimates and can be performed on a potentially unlimited number of WSIs in a short time. To enable automated segmentation, the team has previously developed a generalizable code-free pipeline for deep learning-based segmentation models, with annotations in QuPath, training of deep neural networks in DeepMIB, and visualization of trained models on WSIs with Qupath and FastPathology.

Their publication was followed by a YouTube tutorial video with step-by-step instructions on the use of their deep segmentation models for digital pathology. The pipeline allows pathologists to perform deep learning-based segmentation without extensive experience in scripting and coding.

“In the current study, we used this segmentation model together with the QuPath deep learning-based extension StarDist to quantitate CD3 and γδ T lymphocytes in mucosal compartments,” Dr. Bakke said. “By extracting quantitative data from histological images of colon mucosa in IBD, we hoped to reveal differences in inflammation patterns that are otherwise unavailable to the human eye and the predominantly qualitative histological assessments done by pathologists. We believe that this method is useful in research on the role of epithelial microenvironment in IBD and in other colon mucosal diseases.”


The Number of Intraepithelial γδ T Cells Differs Between Crohn’s Disease and Ulcerative Colitis

Deep learning-based segmentation of WSIs from patients with IBD (37 patients with Crohn’s disease and 58 with ulcerative colitis) and healthy controls (n=33) showed that the number of intraepithelial γδ T cells was significantly lower in inactive Crohn’s disease than in inactive ulcerative colitis. However, the total number of CD3 T cells was higher in all compartments in inactive Crohn’s disease than in inactive ulcerative colitis or healthy controls.

Disease activity was associated with a significant decrease in the number of intraepithelial γδ T cells in patients with ulcerative colitis, but not in those with Crohn’s disease. In contrast, the number of intraepithelial CD3 T cells was not associated with disease activity in patients with Crohn’s disease or ulcerative colitis.

“The clear difference in the number of intraepithelial γδ T cells between patients with Crohn’s disease and those with ulcerative colitis was the most exciting part of the study,” said Dr. Bakke. “This novel knowledge can help us better understand immune functions in the epithelial microenvironment in IBD.”


Unanswered Questions

Although the mucosal epithelium of the colon contains different subsets of T lymphocytes, little is known about variations in these subsets during the different stages of IBD. Future studies are required to determine whether differences in epithelial immune cells are correlated with clinical outcomes and whether they affect prognosis.

“As we found that colon mucosa of Crohn’s patients had more intraepithelial T cells in general, but fewer γδ T cells, the most pressing question is, what type of T cells dominate in the epithelium in Crohn’s disease? Future studies should map the different subsets of immune cells in the epithelial layer and assess regional differences along the length of the colon, at different stages of disease activity, and between groups of patients,” Dr. Bakke added.



  1. Røyset ES, Sahlin Pettersen HP, Xu W, et al. Deep learning-based image analysis reveals significant differences in the number and distribution of mucosal CD3 and γδ T cells between Crohn’s disease and ulcerative colitis. J Pathol Clin Res. 2023;9(1):18-31. doi:10.1002/cjp2.301

Share This Post

Leave a Reply