Skip to main content

pfla: Python Facial Landmark Analysis

GitHub release PyPI license PyPI version fury.io PyPI pyversions Documentation Status Build Status DOI

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

License

The project is licensed under the MIT license.

Contact

Maxime Rousseau, DMD candidate 2020 McGill University, Faculty of Dentistry

Metadata

Release files for pfla 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pfla 1.0.0
File Size Uploaded
pfla-1.0.0.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pfla 1.0.0
File Interpreter ABI Platform
pfla-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / pfla-1.0.0.tar.gz

Download URL pfla-1.0.0.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cd694161071c409b65c116fa5bf3309c35d4d8d68fcc1d4fa14fd7a10b257bc4
BLAKE2b-256 checksum
How to use checksums
4664aa4aa489a0456dc9af95b6be1343256ead6bc3c573dbd8c1d9c3df95f942
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pfla-1.0.0-py3-none-any.whl

Download URL pfla-1.0.0-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
279474d64fce0b1247effcd1c201346df7f6ce234900866c83f53d15152e44e2
BLAKE2b-256 checksum
How to use checksums
c4ba75af0a9f57fba3d4cf0b5db2201fcc0a7a800ede568aa5f5960b800234f1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page