This repository contains the implementation of PIPNet, a robust approach for facial landmark detection using a deep learning model based on ResNet architectures.
conda create -n PyTorch python=3.8
conda activate PyTorch
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch-lts
pip install opencv-python==4.5.5.64
pip install PyYAML
pip install tqdm
Datasets: 300W
- Download the datasets from official sources. The folder structure should look like this:
Run the below command for dataset preparation
$ python -c 'from utils.util import DataGenerator; gen = DataGenerator("../Datasets_path/"); gen.run()'
To train the model, run:
- Configure your dataset path in main.py for training
$ python main.py --train
For testing the model, use:
- Configure your dataset path in main.py for testing
$ python main.py --test
To run the real-time facial landmark detection:
$ python main.py --demo
### Results
| Backbone | Epochs | Test NME | Pretrained weights |
|:----------:|:------:|---------:|-----------------------------------------------------------------------------------:|
| MobileOne | soon | soon | [model]() |
| MobileOne | soon | soon | [model]() |
| MobileOne | soon | soon | [model]() |
##### Reference
* https://github.com/jhb86253817/PIPNet