Address correspondence to: Gil Y. Melmed, MD, MS, Director of Inflammatory Bowel Disease Clinical Research, Cedars-Sinai Medical Center, 8720 Beverly Blvd, West Hollywood, CA, 90048, USA (310-423-4100, 310-423-0146,  gil.melmed@cshs.org ).
Stool characteristics are used as a measure of ulcerative colitis (UC) disease activity, but they have not been validated against objective inflammation. We aimed to determine whether stool characteristics measured by trained artificial intelligence (AI) and physicians correlate with inflammation in UC.
Patients hospitalized with acute severe UC (ASUC) were asked to capture images of all bowel movements using a smartphone application (Dieta®). Validated AI was used to measure five stool characteristics including the Bristol stool scale. Additionally, four physicians scored each image for blood amount, mucus amount, and whether stool was in a toilet or commode. AI measurements and mean physician scores were rank-normalized and correlated with rank-normalized CRP values using mixed linear regression models. Mann–Whitney tests were used to compare median CRP values of images with and without mucus and with and without blood.
We analyzed 151 stool images collected from 5 patients admitted with ASUC (mean age 42 years, 40% male). Overall, Bristol stool scale and fragmentation positively correlated with CRP, while stool consistency negatively correlated with CRP. The median CRP of images with mucus was higher than that of images without mucus.
Smartphone application AI measurements of Bristol stool scale, stool consistency, and stool fragmentation significantly correlate with CRP values in hospitalized patients with ASUC. Additionally, median CRPs are higher when mucus is seen. Further training of smartphone-based AI algorithms to validate the association of stool characteristics with objective inflammation may yield a novel, noninvasive tool for UC disease monitoring.
Keywords:  Ulcerative Colitis, artificial intelligence, C-reactive protein, disease monitoring
Received 2024 Jan 2; Collection date 2024 Jul.
The management of acute, severe ulcerative colitis (ASUC) in the hospital warrants daily assessment and evaluation of disease activity to determine the appropriateness of continuing corticosteroids, initiating rescue therapy, or surgery. 1  Daily changes in patient-reported rectal bleeding, stool frequency, and form assist with clinical decision-making in the context of objective changes in inflammatory markers, but may be subject to interpretation and recall bias. Smart toilet technology may mitigate recall bias 2 ; however, this requires the installation of special technology into existing plumbing. We previously study that more easily accessible technology, smartphone-based artificial intelligence (AI), could determine stool characteristics with high accuracy and was superior to patient self-reporting. 3  We aimed to explore the clinical utility of AI applied to stool images acquired  via  smartphone application in patients hospitalized with ASUC.
This prospective observational pilot study was reviewed and approved by the Cedars-Sinai Institutional Review Board. Informed consent was obtained prior to patient participation. Consecutive patients admitted to the hospital with ASUC captured images of each bowel movement using a smartphone application (Dieta®). The Dieta® mobile application was designed for patients to capture images of stool that are then classified by computer vision AI into multiple continuous data points for five different visual characteristics of stool. The AI classified stool image characteristics were Bristol stool scale (1 to 7), consistency (0, liquid to 100, solid), edge fuzziness (0, very clear to 100, very fuzzy), fragmentation (0, single piece to 100, many pieces), and volume (0, very small volume to 100, very large volume). Representative images of these characteristics can be found in Pimental et al. 3
Stool images were also annotated by humans using the Dieta Stool Annotation Portal. This web application allows users to observe multiple views of each stool image and adjust brightness, contrast, saturation, and resolution. Using an annotation guide developed for this study, four physicians, including an inflammatory bowel disease specialist, labeled stool images for blood amount, mucus amount, and whether stool was in a toilet or bedside commode. Representative images of these characteristics can be found in  Supplementary Figure 1 . Discrepancies were resolved by consensus.
For each participant, patient demographics and relevant clinical information were recorded. Demographics included age, gender, race, and ethnicity. On admission, vitals signs, stool frequency, quantity of blood in stool, hemoglobin, and erythrocyte sedimentation rate were recorded to establish Truelove and Witts Severity Index for ulcerative colitis. Serum C-reactive protein (CRP) was measured on admission and daily while hospitalized. We additionally recorded fecal calprotectin, the presence of enteric infections, treatment received, and length of hospitalization.
Each stool image obtained was associated with a serum CRP value obtained within 12 hours of the image. Image characteristics determined by AI and physician ratings were rank-normalized and correlated with rank-normalized CRP values using mixed linear regression models. We additionally used Mann–Whitney tests to compare median CRP values of images with the presence or absence of blood and/or mucus.
Area Under the Receiver Operating Characteristic was calculated to evaluate the predictive performance of the linear mixed models used to correlate AI-assessed stool characteristics and CRP levels. CRP levels were dichotomized by median, tagging levels as below or equal and above median. Subsequently, predicted values were derived from each fitted linear mixed-effects model. The ROC curve was constructed utilizing the predicted values and the dichotomized CRP variable. The AUC value was calculated to provide a quantitative measure of the model’s discriminative ability in distinguishing between CRP levels below and above the median based on each AI-classified stool image characteristic.
In total, 151 stool images were collected from 5 patients (mean age 42 years, 40% male). Detailed demographics and clinical information can be found in  Table 1 . Each patient provided between 1 and 98 stool images, with a mean of 30.2 images per patient. On admission, patients had a mean CRP of 51.46 mg/L and a mean fecal calprotectin of 1684.8 μg/g. The baseline Truelove and Witts Severity Index was either moderate or severe. Patients were hospitalized for an average of 12.4 days. Campylobacter infection was detected in 1 patient and cytomegalovirus viral inclusions were present in 2 patients. 4 of the 5 patients received intravenous corticosteroids and infliximab. Fifty-three images were captured in a toilet; the remaining images were captured in a bedside commode.
Demographics and clinical information.
Serum CRP was positively correlated with AI-interpreted Bristol stool scale ( P  = .026), stool consistency ( P  = .047), and stool fragmentation ( P  = .049), but not with stool volume or edge fuzziness. On subgroup analysis, only images obtained in a toilet maintained a statistically significant association ( Table 2 ). Additionally, the median CRP corresponding to images without blood was marginally higher than that of images with blood ( P  = .07502;  Figure 1A ) and the median CRP of images with mucus was significantly higher than that of images without mucus ( P  = .01083;  Figure 1B ).

 P -values obtained by mixed linear regression models of CRP versus stool characteristics.

 * Represents statistically significant  P -value.
Median serum CRP (mg/L) of stool images in which blood was or was not observed (A) and median serum CRP (mg/L) of stool images in which mucus was or was not observed (B).
The AUC values for CRP with the Bristol scale, consistency, and fragmentation were 0.70, 0.691, and 0.70, respectively. Specifically focusing on images captured within a toilet environment, the AUC values for CRP in combination with the Bristol scale, consistency, and fragmentation were notably higher, measuring 0.81, 0.80, and 0.82, respectively ( Figure 2 ).
Area under the receiver operating characteristic (AUROC) curves of the artificial intelligence (AI) model for prediction of CRP by the AI-predicted stool characteristics (Bristol, consistency, and fragmentation). Predictive performance of the AI model in the classification of CRP above or below the median. True positive rate of CRP classification performance as the  x -axis and false positive rate as the  y -axis. AUC ranges from ~0.7 to 0.8 when evaluating each model, which indicates a good rate of True positive CRP predictions.
We found that AI classification of stool Bristol scale, consistency, and fragmentation obtained via smartphone application may correlate well with serum CRP in ASUC patients, with AUCs ranging from 0.6891 to 0.8211. The AI performed best using images of stools in toilets compared to images obtained in commodes likely due to the AI having been trained using images of stools in toilets alone. In the future, AI could also be trained to classify stool images for blood and mucus amounts. Notably, interpretation of the results of this study is limited by the small sample size and potentially confounding infections identified. Additionally, the AI utilized in this study was validated in a population of irritable bowel syndrome patients and therefore may not directly translate to the ASUC population. Large studies should be pursued to further validate the use of AI classification of stool images for use in ASUC disease monitoring.
Jeff Liang, MD, Cedars-Sinai Medical Center, contributed to the investigation. Eden Sharabi, MD, Cedars-Sinai Medical Center, contributed to the investigation. Ryan Urbanowicz, PhD, Cedars-Sinai Medical Center, contributed to the formal analysis.
Sarah Rotondo-Trivette, 
F. Widjaja Inflammatory Bowel Disease Institute, Department of Medicine, Cedars-Sinai, Los Angeles, CA, USA.
Viankail Cedillo Castelan, 
F. Widjaja Inflammatory Bowel Disease Institute, Department of Medicine, Cedars-Sinai, Los Angeles, CA, USA.
Kushagra Mathur, 
F. Widjaja Inflammatory Bowel Disease Institute, Department of Medicine, Cedars-Sinai, Los Angeles, CA, USA.
Pauline Yasmeh, 
Department of Medicine, Olive View-UCLA Medical Center, Sylmar, CA, USA.
Asaf Kraus, 
Dieta Health, Los Angeles, CA, USA.
Addison Lynch, 
Dieta Health, Los Angeles, CA, USA.
Dermot P B McGovern, 
F. Widjaja Inflammatory Bowel Disease Institute, Department of Medicine, Cedars-Sinai, Los Angeles, CA, USA.
Gil Y Melmed, 
F. Widjaja Inflammatory Bowel Disease Institute, Department of Medicine, Cedars-Sinai, Los Angeles, CA, USA.
Sarah Rotondo-Trivette contributed to conceptualization, methodology, formal analysis, investigation, resources, data curation, project administration, and writing. Viankail Cedillo Castelan contributed to formal analysis, data curation, and visualization. Kushagra Mathur contributed to the investigation, data curation, and review/editing. Pauline Yasmeh contributed to the investigation, data curation, and review/editing. Asaf Kraus contributed to methodology, software, resources, and writing. Addison Lynch contributed to software and resources. Dermot P.B. McGovern contributed to conceptualization, methodology, and review/editing. Gil Y. Melmed contributed to conceptualization, methodology, formal analysis, investigation, resources, writing, supervision, and project administration. All authors have approved the final draft submitted.
None.
Sarah Rotondo-Trivette, Viankail Cedillo Castelan, Kushagra Mathur, and Pauline Yasmeh have no conflicts of interest to disclose. Asaf Kraus discloses their position as shareholder, board member, and employee of Dieta Health. Addison Lynch discloses position as an employee of Dieta Health. Dermot P.B. McGovern discloses position as consultant to MERCK, Palisade Bio, Prometheus Biosciences, Prometheus Labs, and Takeda. Gil Y Melmed discloses position as consultant to Abbvie, Arena, Boehringer-Ingelheim, Bristol-Myers Squibb, Celgene, Dieta Health, Entasis, Ferring, Fresenius Kabi, Janssen, Medtronic, Oshi Health, Pfizer, Takeda, Shionogi, Samsung Bioepis, and Viatris.
Data is not publicly available but a limited dataset could be provided upon reasonable request to the corresponding author.
Data is not publicly available but a limited dataset could be provided upon reasonable request to the corresponding author.