Intrinsic Deformation
Intrinsic deformations are defined as sequences of speed vectors applied to the points of a shape. The length of such a sequence is computed thanks to a Riemannian metric, whose role is to penalize certain transformation. Choosing such a metric roughly corresponds to penalize some distortions of the shape.
Math
In intrinsic deformation is determined by a sequence of velocity vector fields \(V = (V^t)_{1 \leq t \leq T}\). The shape after deformation is defined as:
We also define intermediate states \((X^m)_{1 \leq m \leq T}\) of the deformation:
The length of the deformation is determined by a Riemannian metric:
where \(\ll V^t, V^t \gg_{X^t}\) is a Riemannian metric depending on the position of the points and the topology (edges, triangles) of the shape. This term informs about the “distortion” of the shape caused by the transformation:
$$ X^t \rightarrow X^{t+1} = X^t + V^{t}$$
Code
Intrinsic Deformation is accessible in scikit-shapes through the class IntrinsicDeformation
. The argument n_steps
controls the number of time steps \(T\), the higher n_steps
is, the more flexible is the model. However, the memory impact grows linearly in n_steps
and the running time is also impacted. The Riemannian metric is given with the argument metric
. Available metrics are:
as-isometric-as-possible
(requires points and edges)shell-energy
(requires triangles)
import skshapes as sks
loss = ...
metric = sks.ShellEnergyMetric
model = sks.IntrinsicDeformation(n_steps=10, metric=metric)
registration = sks.Registration(loss=loss, model=model)
registration.fit(source=source, target=target)
path = registration.path_
morphed_source = registration.morphed_shape_