Your new experience awaits. Try the new design now and help us make it even better

TECHNOLOGY AND CODE article

Front. Vet. Sci.

Sec. Veterinary Clinical, Anatomical, and Comparative Pathology

Volume 12 - 2025 | doi: 10.3389/fvets.2025.1620338

Machine-learning for quantitative histopathology of piglet intestinal tissues: Challenges with limited training data

Provisionally accepted
  • University of Copenhagen, Copenhagen, Denmark

The final, formatted version of the article will be published soon.

Introduction: Use of Machine learning (ML) is rapidly expanding in histopathology, offering the potential to reduce interobserver variability and improve quantitative assessment. However, large datasets and computational resources commonly used in toxicology and human medicine are often unavailable to the veterinary pathologist. This study aimed to evaluate the feasibility and limitations of applying supervised ML on histopathological samples with limited training data, exemplified by training an ML model to segment the intestinal wall into its histological layers. Materials and Methods: The study included 145 piglets from five age groups (4, 14, 25, 49, and 67 days). Full-wall samples from duodenum, jejunum and ileum were collected post-mortem, stained with H&E and digitized. A three-step ML model was trained on 8-15 images: Step 1 identified tissue, Step 2 segmented mucosa from submucosal layers, and Step 3 separated lamina propria from epithelium. Model performance was assessed by comparing AI-generated areas to manual annotations, calculating relative deviation, categorized agreement levels, Intersection over Union, and Pearson correlation coefficients. Qualitative error analyses were used as directions for future training options. Results: A three-step separation model was successfully developed, but showed a significant amount of age-related performance variation, depicted as larger inaccuracies in samples from the younger age-groups, reflecting additional tissue heterogeneity from immature morphology. Classification errors could be categorized into intrinsic limitations (e.g., thresholding issues in tissue identification) and training deficits (e.g., misclassification of goblet cells and crypt abscesses), of which only the latter category could be corrected by adding additional training data. Conclusion: This study demonstrates the feasibility of ML-based histopathology with limited sample sizes, providing a viable option for veterinary pathologists. Models trained on small datasets require careful supervision, with special emphasis on age-diverse tissue heterogeneity and overfitting. In these cases, ML should be seen as a tool to augment, not replace, expert oversight, ensuring reliable and reproducible quantitative histopathological measures.

Keywords: digital pathology, intestinal segmentation, machine learning, histopathology, pigs

Received: 29 Apr 2025; Accepted: 28 Aug 2025.

Copyright: © 2025 Brandt Becker, Hansen, Nielsen and Jensen. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Cecilie Brandt Becker, University of Copenhagen, Copenhagen, Denmark

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.