shape_project — SHAPESTAT model op

• Data kinds: shapemodel × points → signal

• Call: import fullseye as fs; fs.ledger.shape_project(model, shape, align: 'bool' = True) (to call the implementation directly, import shapestats; shapestats.shape_project(model, shape, align: 'bool' = True); from the registry, opsshapestat.get("shape_project"))

Usage

Maps a shape into model coordinates (principal-component scores). → (k,).

With align=True it first aligns to the mean shape by Procrustes. Projecting without aligning leaks the differences in position and orientation into the scores, and the same shape looks like a different individual.

Formula: scores = components @ (shape - mean).ravel() (components are (k, N*3) orthonormal rows, mean is (N, 3)). With align=True, procrustes_align(shape, mean) (with scale, no mirroring) is applied first.

• model: return value of shape_pca (dict with mean / components / variance / n_points). If anything is missing, ValueError.

• shape: (N, 3), N == model["n_points"], finite. The points must be in the same order as the landmarks used for training (a different correspondence raises no exception).

• align: default True. When projecting onto a model made with shape_pca(align=False) (which counts size as a trait), set this to False too, or the scale disappears.

• Returns: (k,) float64. Each component has the same unit as the coordinates. Dividing by sqrt(variance) gives standard-deviation units (how many σ off).

• Failure: ValueError (model format, point-count mismatch, non-finite).

The inverse mapping is shape_reconstruct; the 1 number for how far off it is, shape_mahalanobis.

Detailed usage guide

• shape_statistics family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• shapestat_landmark_tour — py -3.11 examples/shapestat_landmark_tour.py

Ops the type connects to (they accept signal as input)

shape_reconstruct

Same category (model)

shape_pca · shape_reconstruct · shape_mahalanobis · shape_explained_variance · shape_synthesize


*Provenance: shapestats.py — SHAPESTAT operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.