  For many biological image segmentation tasks, including topological
knowledge, such as the nesting of classes, can greatly improve results.
However, most `out-of-the-box' CNN models are still blind to such prior
information. In this paper, we propose a novel approach to encode this
information, through a multi-level activation layer and three compatible
losses. We benchmark all of them on nuclei segmentation in bright-field
microscopy cell images from the 2018 Data Science Bowl challenge, offering an
exemplary segmentation task with cells and nested subcellular structures. Our
scheme greatly speeds up learning, and outperforms standard multi-class
classification with soft-max activation and a previously proposed method
stemming from it, improving the Dice score significantly (p-values<0.007). Our
approach is conceptually simple, easy to implement and can be integrated in any
CNN architecture. It can be generalized to a higher number of classes, with or
without further relations of containment.
