  Background. Eosinophilic esophagitis (EoE) is an allergic inflammatory
condition of the esophagus associated with elevated numbers of eosinophils.
Disease diagnosis and monitoring requires determining the concentration of
eosinophils in esophageal biopsies, a time-consuming, tedious and somewhat
subjective task currently performed by pathologists. Methods. Herein, we aimed
to use machine learning to identify, quantitate and diagnose EoE. We labeled
more than 100M pixels of 4345 images obtained by scanning whole slides of
H&E-stained sections of esophageal biopsies derived from 23 EoE patients. We
used this dataset to train a multi-label segmentation deep network. To validate
the network, we examined a replication cohort of 1089 whole slide images from
419 patients derived from multiple institutions. Findings. PECNet segmented
both intact and not-intact eosinophils with a mean intersection over union
(mIoU) of 0.93. This segmentation was able to quantitate intact eosinophils
with a mean absolute error of 0.611 eosinophils and classify EoE disease
activity with an accuracy of 98.5%. Using whole slide images from the
validation cohort, PECNet achieved an accuracy of 94.8%, sensitivity of 94.3%,
and specificity of 95.14% in reporting EoE disease activity. Interpretation. We
have developed a deep learning multi-label semantic segmentation network that
successfully addresses two of the main challenges in EoE diagnostics and
digital pathology, the need to detect several types of small features
simultaneously and the ability to analyze whole slides efficiently. Our results
pave the way for an automated diagnosis of EoE and can be utilized for other
conditions with similar challenges.
