English | Data Augmentations API Docs | ZhiHu Page | Pypi Downloads
torchlm is aims to build a high level pipeline for face landmarks detection, it supports training, evaluating, exporting, inference(Python/C++) and 100+ data augmentations, can easily install via pip.
- High level pipeline for training and inference.
- Provides 30+ native landmarks data augmentations.
- Can bind 80+ transforms from torchvision and albumentations with one-line-code.
- Support PIPNet, YOLOX, ResNet, MobileNet and ShuffleNet for face landmarks detection.
- [2022/03/08]: Add PIPNet: Towards Efficient Facial Landmark Detection in the Wild, CVPR2021
- [2022/02/13]: Add 30+ transforms and bind 80+ transforms from torchvision and albumentations.
| Model | Backbone | Head | 300W | COFW | AFLW | WFLW | Download |
|---|---|---|---|---|---|---|---|
| PIPNet | MobileNetV2 | Heatmap+Regression+NRM | 3.40 | 3.43 | 1.52 | 4.79 | link |
| PIPNet | ResNet18 | Heatmap+Regression+NRM | 3.36 | 3.31 | 1.48 | 4.47 | link |
| PIPNet | ResNet50 | Heatmap+Regression+NRM | 3.34 | 3.18 | 1.44 | 4.48 | link |
| PIPNet | ResNet101 | Heatmap+Regression+NRM | 3.19 | 3.08 | 1.42 | 4.31 | link |
you can install torchlm directly from pypi.
pip install torchlm>=0.1.6.10 # or install the latest pypi version `pip install torchlm`
pip install torchlm>=0.1.6.10 -i https://pypi.org/simple/ # or install from specific pypi mirrors use '-i'or install from source if you want the latest torchlm and install it in editable mode with -e.
git clone --depth=1 https://github.com/xlite-dev/torchlm.git
cd torchlm && pip install -e .torchlm provides 30+ native data augmentations for landmarks and can bind with 80+ transforms from torchvision and albumentations. The layout format of landmarks is xy with shape (N, 2).
Use almost 30+ native transforms from torchlm directly
import torchlm
transform = torchlm.LandmarksCompose([
torchlm.LandmarksRandomScale(prob=0.5),
torchlm.LandmarksRandomMask(prob=0.5),
torchlm.LandmarksRandomBlur(kernel_range=(5, 25), prob=0.5),
torchlm.LandmarksRandomBrightness(prob=0.),
torchlm.LandmarksRandomRotate(40, prob=0.5, bins=8),


