Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.9.0rc1

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.9.0rc1
File Size Uploaded Provenance Actions
menpofit-0.9.0rc1.tar.gz 2.3 MB With provenance Details for menpofit-0.9.0rc1.tar.gz

Built distribution (wheel)

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

Total release size: 2.6 MB

Release files / menpofit-0.9.0rc1.tar.gz

Download URL menpofit-0.9.0rc1.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
d708f9cec161464029260954c45708f11c7d56fdd82333287b68efa1077fc591
BLAKE2b-256 checksum
How to use checksums
e8f4efa689934bb8e35506295c873bf7760d61907fef507a5e182970e5a65954
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 30, 2026.

Transparency log

Release files / menpofit-0.9.0rc1-py3-none-any.whl

Download URL menpofit-0.9.0rc1-py3-none-any.whl
Size 227.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2249c1d54d363834f908b4fa8b4e18503d0bd7de47f4bdf48b25ee959a2ac24e
BLAKE2b-256 checksum
How to use checksums
68d3bb03a67f51b0ccd0887fdde1b1e85ae3ca092a531b2b1a877d0eb4948de1
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 30, 2026.

Transparency log

Security for menpofit 0.9.0rc1

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.9.0rc1.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 30, 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