← 开源

Menpo's 2D deformable modelling toolkit (AAMs/CLMs/SDMs)

Model DevelopmentClassical MLPython
增长势头
+024 小时新增 Star0.0%
132
Star
61
Fork
+0
本周
10
贡献者
创建于 2014-10-27 · 更新于 2026-11-30 · 今日第 28117 名
主要开发者
README



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.11 or newer and Menpo 0.13 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.

排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载