Giter VIP home page Giter VIP logo

face_alignment_opencv's Introduction

Introduction

This repository contains a minimal-dependency facial alignment method. We re-implement a state-of-the-art landmark detection method (2D-FAN) using only OpenCV. Thus, we refer to the software in this repository as FAO (Facial Aligment with OpenCV).

Installation

The simplest way to install FAO is to use pip as follows. But, this will be slow (~7-8 FPS) because the default opencv-python package has no CUDA support, therefore FAO will run on CPU. (See more below for GPU processing)

git clone https://github.com/sariyanidi/face_alignment_opencv.git
cd face_alignment_opencv
pip install --upgrade pip
pip install -r requirements_cpu.txt 

If you want to use FAO with GPU support (~100 FPS), you need to manually compile OpenCV with CUDA and CUDNN support. In this case, you should make sure that the repository does not use the OpenCV installed through pip, but the one that you manually compiled. Once you manually install OpenCV, then the following lines will suffice to use FAO with cuda support.

git clone https://github.com/sariyanidi/face_alignment_opencv.git
cd face_alignment_opencv
pip install -r requirements_gpu.txt 

Testing

FAO comes with three scripts for testing. The first one is for single-image processing, which can be tested as

python3 process_image.py samples/corb.jpeg
python3 process_image.py samples/barca.jpg

The second script is for video processing, which can be tested as:

python3 process_video.py samples/la_boheme.mp4

The third script is for processing all images in a directory, which can be tested as:

python3 process_image_dir.py samples/testdir

face_alignment_opencv's People

Contributors

sariyanidi avatar

Stargazers

 avatar

Watchers

 avatar  avatar

face_alignment_opencv's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.