Skip to main content

menpo

BSD License CI PyPI

menpofit - A deformable modelling toolkit

The Menpo Project package for state-of-the-art 2D deformable modelling techniques. Currently, the techniques that have been implemented include:

Affine Image Alignment

  • Lucas-Kanade Image Alignment
    • Optimization algorithms: Forward Additive, Forward/Inverse Compositional
    • Residuals: SSD, Fourier SSD, ECC, Gradient Correlation, Gradient Images

Deformable Image Alignment

  • Active Template Model
    • Model variants: Holistic, Patch-based, Masked, Linear, Linear Masked
    • Optimization algorithm: Lucas-Kanade Gradient Descent (Forward/Inverse Compositional)

Landmark Localization

  • Active Appearance Model
    • Model variants: Holistic, Patch-based, Masked, Linear, Linear Masked
    • Optimization algorithms: Lucas-Kanade Gradient Descent (Alternating, Modified Alternating, Project Out, Simultaneous, Wiberg), Casaded-Regression
  • Active Pictorial Structures
    • Model variant: Generative
    • Optimization algorithm: Weighted Gauss-Newton Optimisation with fixed Jacobian and Hessian
  • Constrained Local Model
    • Active Shape Models
    • Regularized Landmark Mean-Shift
  • Unified Active Appearance Model and Constrained Local Model
    • Alternating/Project Out Regularized Landmark Mean-Shift
  • Ensemble of Regression Trees
    • [provided by DLib]
  • Supervised Descent Method
    • Model variants: Non Parametric, Parametric Shape, Parametric Appearance, Fully Parametric

Installation

MenpoFit requires Python 3.10 or newer and Menpo 0.12 or newer:

> pip install menpofit

or from conda-forge:

> conda install -c conda-forge menpofit

Optional extras: pip install "menpofit[dlib]" (the menpofit.dlib wrapper, needs dlib) and pip install "menpofit[fft]" (faster FFTs with pyFFTW).

Documentation

See our documentation on ReadTheDocs

Pretrained Models

Any pretrained models are provided under the assumption that they are used only for academic purposes and may not be used for commercial applications. Please see the license of the 300W project - upon which our pretrained models are trained.

Specifically, the pretrained models in menpofit.aam.pretrained may only be used for academic purposes.

Development

With uv installed, uv run pytest sets up an environment and runs the unit and smoke tests, and uv run ruff check . lints and uv run ruff format . formats the code (CI checks both). To keep git blame useful after the one-off reformatting, run git config blame.ignoreRevsFile .git-blame-ignore-revs (GitHub does this automatically). The docs are built with Sphinx (pip install -r docs/requirements.txt, then sphinx-build docs/source docs/_build).

Releasing

Versions come from git tags (via setuptools-scm). To release, tag the commit on master (git tag -a v0.8.1 -m "menpofit 0.8.1" && git push origin v0.8.1) and approve the pypi deployment on the resulting Release workflow run. Before anything is published the workflow validates .readthedocs.yaml and builds the docs on the tagged commit (Read the Docs reads its configuration from the tag, so a broken docs setup cannot be repaired afterwards); it then uploads the sdist and wheel to PyPI with trusted publishing, creates a GitHub release (tags like v0.8.1rc1 or v0.8.1.dev1 are pre-releases), and finally waits for Read the Docs to build stable. A manual run with publish: testpypi is a dry run. Do not put two release tags on the same commit: the version is derived from the tag.

Metadata

Release files for menpofit 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for menpofit 0.8.0
File Size Uploaded Provenance Actions
menpofit-0.8.0.tar.gz 2.3 MB With provenance Details for menpofit-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for menpofit 0.8.0
File Interpreter ABI Platform Actions
menpofit-0.8.0-py3-none-any.whl Python 3 none any Details for menpofit-0.8.0-py3-none-any.whl

Total release size: 2.5 MB

Release files / menpofit-0.8.0.tar.gz

Download URL menpofit-0.8.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
45e36bb0f24d0b684ebc91395a48da8452f9135b0bcb515de099fbef727ee55a
BLAKE2b-256 checksum
How to use checksums
aa30432f005ddeed622541ffa913e33b96056ab0c1f1dbb36212ed0afd218329
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / menpofit-0.8.0-py3-none-any.whl

Download URL menpofit-0.8.0-py3-none-any.whl
Size 214.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56be54c07a67b76e9a86fd61915b436c70571d753f9aed885a5fa270e9eed951
BLAKE2b-256 checksum
How to use checksums
9a8b86abecb9b43527500dc9d8c578cd7b64d2a39e9610e4b6bcfbb1ff0850af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for menpofit 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for menpofit-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page