  The use of deep learning for medical imaging has seen tremendous growth in
the research community. One reason for the slow uptake of these systems in the
clinical setting is that they are complex, opaque and tend to fail silently.
Outside of the medical imaging domain, the machine learning community has
recently proposed several techniques for quantifying model uncertainty (i.e.~a
model knowing when it has failed). This is important in practical settings, as
we can refer such cases to manual inspection or correction by humans. In this
paper, we aim to bring these recent results on estimating uncertainty to bear
on two important outputs in deep learning-based segmentation. The first is
producing spatial uncertainty maps, from which a clinician can observe where
and why a system thinks it is failing. The second is quantifying an image-level
prediction of failure, which is useful for isolating specific cases and
removing them from automated pipelines. We also show that reasoning about
spatial uncertainty, the first output, is a useful intermediate representation
for generating segmentation quality predictions, the second output. We propose
a two-stage architecture for producing these measures of uncertainty, which can
accommodate any deep learning-based medical segmentation pipeline.
