https://github.com/1adrianb/binary-face-alignment
Real time face alignment
https://github.com/1adrianb/binary-face-alignment
binary-convolutions computer-vision convolutional-neural-networks deep-learning face-alignment torch7
Last synced: about 1 year ago
JSON representation
Real time face alignment
- Host: GitHub
- URL: https://github.com/1adrianb/binary-face-alignment
- Owner: 1adrianb
- License: other
- Created: 2017-02-12T16:33:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-27T17:35:10.000Z (about 5 years ago)
- Last Synced: 2025-04-11T03:51:37.935Z (about 1 year ago)
- Topics: binary-convolutions, computer-vision, convolutional-neural-networks, deep-learning, face-alignment, torch7
- Language: Lua
- Homepage:
- Size: 16.6 KB
- Stars: 147
- Watchers: 13
- Forks: 45
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Binarized Convolutional Landmark Localizers for Human Pose Estimation and Face Alignment with Limited Resources (Face Alignment demo)
This code implements a demo of the Binarized Convolutional Landmark Localizers for Human Pose Estimation and Face Alignment with Limited Resources paper by Adrian Bulat and Georgios Tzimiropoulos.
For the human pose estimation demo please see [https://github.com/1adrianb/binary-human-pose-estimation](https://github.com/1adrianb/binary-human-pose-estimation)
**[2021 Update]: PyTorch repo with training code for BNN available here: [https://github.com/1adrianb/binary-networks-pytorch](https://github.com/1adrianb/binary-networks-pytorch)**
## Requirements
- Install the latest [Torch7](http://torch.ch/docs/getting-started.html) version (for Windows, please follow the instructions avaialable [here](https://github.com/torch/distro/blob/master/win-files/README.md))
### Packages
- [cutorch](https://github.com/torch/cutorch)
- [nn](https://github.com/torch/nn)
- [cudnn](https://github.com/soumith/cudnn.torch) (cudnn5 preffered)
- [xlua](https://github.com/torch/xlua)
- [image](https://github.com/torch/image)
- [gnuplot](https://github.com/torch/gnuplot)
- [cURL](https://github.com/Lua-cURL/Lua-cURLv3)
- [paths](https://github.com/torch/paths)
```bash
for pkg in cutorch nn cudnn xlua image gnuplot lua-cURL paths; do luarocks install ${pkg}; done
```
## Setup
Clone the github repository
```bash
git clone https://github.com/1adrianb/binary-face-alignment --recursive
cd binary-face-alignment
```
Build and install the BinaryConvolution package
```bash
cd bnn.torch/; luarocks make; cd ..;
```
Install the modified optnet package
```bash
cd optimize-net/; luarocks make rocks/optnet-scm-1.rockspec; cd ..;
```
Run the following command to prepare the files required by the demo. This will download the AFLW2000-3D dataset alongside the converted dataset structure.
```bash
th download-content.lua
```
## Usage
In order to run the demo simply type:
```bash
mkdir models && wget https://www.adrianbulat.com/downloads/BinaryHumanPose/facealignment_binary_aflw.t7 -O models/facealignment_binary_aflw.t7
th main.lua
```
## Pretrained models
| Layer type | Model Size | AFLW2000-3D NME error |
| ------------- | ----------- | ----------- |
| [AFLW2000-3D](https://www.adrianbulat.com/downloads/BinaryHumanPose/facealignment_binary_aflw.t7) | 1.4MB |3.28 |
Note: More pretrained models will be added soon.
## Notes
For more details/questions please visit the [project page](https://www.adrianbulat.com/binary-cnn-landmarks) or send an email at adrian.bulat@nottingham.ac.uk