Table of Contents
Fetching ...

Learning from landmarks, curves, surfaces, and shapes in Geomstats

Luís F. Pereira, Alice Le Brigant, Adele Myers, Emmanuel Hartman, Amil Khan, Malik Tuerkoen, Trey Dold, Mengyang Gu, Pablo Suárez-Serrato, Nina Miolane

TL;DR

The paper presents the shape module of Geomstats, a Python library for intrinsic shape analysis that treats shapes as quotient spaces arising from group actions on object spaces (landmarks, curves, surfaces). It provides an object-oriented, back-end agnostic implementation of fiber bundles, quotient metrics, and alignment to enable geodesic interpolation, averaging, and statistics on shape data, including Kendall shape spaces, elastic geometry for curves, and discrete surface metrics. Key contributions include seamless integration with the existing manifold framework, support for multiple backends ($\mathbb{N}$uMPy, Autograd, PyTorch), and concrete use cases such as geodesic regression on landmark shapes and geodesics between cell curves and surfaces. The work enables practitioners to perform intrinsic statistical learning on shape data across biology, medicine, and vision, while highlighting ongoing challenges in curve and surface computations, reparametrization alignment, and parameter sensitivity of elastic metrics.

Abstract

We introduce the shape module of the Python package Geomstats to analyze shapes of objects represented as landmarks, curves and surfaces across fields of natural sciences and engineering. The shape module first implements widely used shape spaces, such as the Kendall shape space, as well as elastic spaces of discrete curves and surfaces. The shape module further implements the abstract mathematical structures of group actions, fiber bundles, quotient spaces and associated Riemannian metrics which allow users to build their own shape spaces. The Riemannian geometry tools enable users to compare, average, interpolate between shapes inside a given shape space. These essential operations can then be leveraged to perform statistics and machine learning on shape data. We present the object-oriented implementation of the shape module along with illustrative examples and show how it can be used to perform statistics and machine learning on shape spaces.

Learning from landmarks, curves, surfaces, and shapes in Geomstats

TL;DR

The paper presents the shape module of Geomstats, a Python library for intrinsic shape analysis that treats shapes as quotient spaces arising from group actions on object spaces (landmarks, curves, surfaces). It provides an object-oriented, back-end agnostic implementation of fiber bundles, quotient metrics, and alignment to enable geodesic interpolation, averaging, and statistics on shape data, including Kendall shape spaces, elastic geometry for curves, and discrete surface metrics. Key contributions include seamless integration with the existing manifold framework, support for multiple backends (uMPy, Autograd, PyTorch), and concrete use cases such as geodesic regression on landmark shapes and geodesics between cell curves and surfaces. The work enables practitioners to perform intrinsic statistical learning on shape data across biology, medicine, and vision, while highlighting ongoing challenges in curve and surface computations, reparametrization alignment, and parameter sensitivity of elastic metrics.

Abstract

We introduce the shape module of the Python package Geomstats to analyze shapes of objects represented as landmarks, curves and surfaces across fields of natural sciences and engineering. The shape module first implements widely used shape spaces, such as the Kendall shape space, as well as elastic spaces of discrete curves and surfaces. The shape module further implements the abstract mathematical structures of group actions, fiber bundles, quotient spaces and associated Riemannian metrics which allow users to build their own shape spaces. The Riemannian geometry tools enable users to compare, average, interpolate between shapes inside a given shape space. These essential operations can then be leveraged to perform statistics and machine learning on shape data. We present the object-oriented implementation of the shape module along with illustrative examples and show how it can be used to perform statistics and machine learning on shape spaces.
Paper Structure (46 sections, 37 equations, 12 figures, 1 table)

This paper contains 46 sections, 37 equations, 12 figures, 1 table.

Figures (12)

  • Figure 1: Abstract Python classes of the shape module in Geomstats. A manifold can be equipped with a group action and a Riemannian metric through the methods equip_with_group_action() and equip_with_metric(). When those are compatible, a quotient structure can be put on the manifold through the method equip_with_quotient(). The quotient structure consists of a fiber bundle, and a quotient manifold equipped with a quotient metric, which inherits from the class RiemannianMetric (arrow represents inheritance). QuotientManifold is dashed because it may be the same class (but different instance) as Manifold when points are represented via their representatives. The variables listed under each Python class represent the main attributes of an object instantiated from this class.
  • Figure 2: Example of fiber bundle induced by a group action. The group of rotations $G$ acting on the space of triangles $M$ induces a fiber bundle with total space $M$, base space $M/G$ and fiber $G$. The fiber over $[p]$ is the orbit $p\cdot G$ composed of all triangles that can be obtained by rotating $p$. They all project on the same shape $[p]\in M/G$.
  • Figure 3: Landmark sets. Consider an object defined as a set of 3 landmarks in 2D (left). We transform this object into a shape, i.e., into a point in Kendall shape space via the following operations: center the landmark set by placing its barycenter at the origin, resize the landmark set so that its 'size' equals 1, and then quotient by the group of rotations such that the difference in rotation will not contribute to distance between points in Kendall shape space. "Equivalent shapes" in the figure all correspond to the same point in Kendall shape space
  • Figure 4: Landmark sets and their shapes in the shape module of Geomstats. The Python class Landmarks (left) represents a space of objects, a pre-shape space, or a Kendall shape space depending on the Riemannian metric that equips it: with the product Euclidean metric, the pre-shape metric, or the Kendall shape metric, respectively (right). Each of these metrics quotients specific group actions: translations, scalings, and rotations, as shown by the purple arrows (right). We indicate the abstract Python classes from which each class inherits, with empty black arrows representing inheritance.
  • Figure 5: Prediction of rat's skull shapes using the shape module of Geomstats. Each rat skull is represented by a set of $k=8$ landmarks in $d=2$ dimensions. Left: Skull shape of rats at 8 time points, at ages of 7, 14, 21, 30, 40, 60, 90, and 150 days (different times shown by different color) Bookstein1991. A anatomical drawing of a rat skull is shown under the scatter plot for reference. Right: Predicted shape of the rat skull after 4.5 days after geodesic regression on Kendall shape space.
  • ...and 7 more figures