  The skeleton of a digital image is a compact representation of its topology,
geometry, and scale. It has utility in many computer vision applications, such
as image description, segmentation, and registration. However, skeletonization
has only seen limited use in contemporary deep learning solutions. Most
existing skeletonization algorithms are not differentiable, making it
impossible to integrate them with gradient-based optimization. Compatible
algorithms based on morphological operations and neural networks have been
proposed, but their results often deviate from the geometry and topology of the
true medial axis. This work introduces the first three-dimensional
skeletonization algorithm that is both compatible with gradient-based
optimization and preserves an object's topology. Our method is exclusively
based on matrix additions and multiplications, convolutional operations, basic
non-linear functions, and sampling from a uniform probability distribution,
allowing it to be easily implemented in any major deep learning library. In
benchmarking experiments, we prove the advantages of our skeletonization
algorithm compared to non-differentiable, morphological, and
neural-network-based baselines. Finally, we demonstrate the utility of our
algorithm by integrating it with two medical image processing applications that
use gradient-based optimization: deep-learning-based blood vessel segmentation,
and multimodal registration of the mandible in computed tomography and magnetic
resonance images.
