Python facial landmarking and analysis
Project description
pfla: Python Facial Landmark Analysis
A simple command line interface to automate facial analysis. pfla
uses a
pre-trained neural networks to detect faces and annotate them with 68
landmarks. The program also compyte four commonly used facial metrics. The
output is saved to a file to allow for easy statistical analysis by the user.
Publication
This software was published in JOSS. Since version 1.0.0, the packaged has changed considerably. The publication release is still available here.
Citing
If you use this software please use this citation:
@article{Rousseau_2018,
doi = {10.21105/joss.00855},
url = {https://doi.org/10.21105%2Fjoss.00855},
year = 2018,
month = {dec},
publisher = {The Open Journal},
volume = {3},
number = {32},
pages = {855},
author = {Maxime Rousseau and Jean-Marc Retrouvey},
title = {pfla: A Python Package for Dental Facial Analysis using Computer Vision and Statistical Shape Analysis},
journal = {Journal of Open Source Software}}
Features
- Face detection using mtcnn
- Landmark placement
- Facial metric calculations
Requirements and Dependencies
- Python 3.5 (or higher)
- Python packages:
- numpy
- pandas
- pytest
- pillow
- facenet-pytorch
- face-alignment
- pytest-cov
- pytorch
Installation
Install with pip:
pip install -r requirements-pytorch.txt \ # pytorch for CPU
-f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt # other dependencies
pip install pfla
Usage
usage: pfla [-h] [-d] [-l] [-m] [-o OUTPUT] [-v] path
PFLA: python facial landmark analysis. This program will read the image(s)
given as input and can apply a face detection algorithm, landmark placement
and computation of metrics. The results are returned as a text stream.
positional arguments:
path path to the image or directory of images
optional arguments:
-h, --help show this help message and exit
-d, --detect detect faces and output bounding box
-l, --landmark annotate detected faces and output coordinates
-m, --metrics compute metrics and output results
-o OUTPUT, --output OUTPUT
specify output filename and format/filetype of the
data
-v, --verbose increase output verbosity
AUTHOR: Maxime Rousseau LICENSE: MIT
Testing
To test your installation run the following commands:
cd [PATH_TO_PACKAGE_INSTALLATION]
pytest
Documentation
Documentation of the package can be found here: https://pfla.readthedocs.io/en/master
Contribute
- Contribution guidelines: https://github.com/maxrousseau/pfla/blob/master/contributing.md
- Issue Tracker: https://github.com/maxrousseau/pfla/issues
- Source Code: https://github.com/maxrousseau/pfla
License
The project is licensed under the MIT license.
Contact
Maxime Rousseau, DMD candidate 2020 McGill University, Faculty of Dentistry
- Email: maximerousseau08@gmail.com
- Website: https://maxrousseau.github.io/portfolio/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pfla-1.0.0.tar.gz
.
File metadata
- Download URL: pfla-1.0.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd694161071c409b65c116fa5bf3309c35d4d8d68fcc1d4fa14fd7a10b257bc4 |
|
MD5 | d62b22f7c6606d2c37841246227280dc |
|
BLAKE2b-256 | 4664aa4aa489a0456dc9af95b6be1343256ead6bc3c573dbd8c1d9c3df95f942 |
File details
Details for the file pfla-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pfla-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 279474d64fce0b1247effcd1c201346df7f6ce234900866c83f53d15152e44e2 |
|
MD5 | 94ad858cfad1b43bde0feba2a463866f |
|
BLAKE2b-256 | c4ba75af0a9f57fba3d4cf0b5db2201fcc0a7a800ede568aa5f5960b800234f1 |