Coder Social home page Coder Social logo

joyhuang9473 / face-preprocess-tools Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 1.0 1.91 MB

Face-preprocess-tools is a collection of tools for preprocessing face images. Images will go through FaceDetection, FaceAlignment, FaceCropping processes.

Python 100.00%

face-preprocess-tools's Introduction

Face-preprocess-tools

Face-preprocess-tools is a collection of tools for preprocessing face images. Images will go through FaceDetection, FaceAlignment, FaceCropping processes.

BaseLine

FaceDetection -> FaceAlignment -> FaceCropping

FaceDetection

Haar Feature-based Cascade Classifiers

@param:

  • imageList.txt: a list file, which contains image file paths.

@output:

  • faceDetection.success: a list file, which records successful detection.
  • faceDetection.error: a list file, which records error detection.
  • boundingbox.list: a list file, which contains bounding box information of successful detection images.
$ cat imageList.txt
/workspace/datasets/CASIA-WebFace/5587543/001.jpg
/workspace/datasets/CASIA-WebFace/5587543/002.jpg
...

$ python FaceDetection/faceDetector.py imageList.txt
FaceDetection Done!

FaceAlignment

Deep Convolutional Network Cascade for Facial Point Detection

Two parts:

  1. Landmark Detection
  2. Face Alignment

Landmark Detection

@param:

  • boundingbox.list: the output file boundingbox.list of FaceDetection process.

@output:

  • landmark.list: a list file, which contains five facial points of face images listed in boundingbox.list.
$cat boundingbox.list
/workspace/datasets/CASIA-WebFace/5587543/001.jpg 47 203 46 202
/workspace/datasets/CASIA-WebFace/5587543/002.jpg 39 195 51 207
...

$ python FaceAlignment/detectLandmark.py boundingbox.list
LandmarkDetection Done!

Face Alignment

@param:

  • landmark.list: the output file landmark.list of Landmark Detection process.
  • PATH_Aligned_image_dir: the destination directory path of aligned output images.

@output:

  • faceAlignemnt.list: a list file, which records successful alignment.
  • Aligned_image_dir: a directory, which contains the aligned output images listed in faceAlignemnt.list.
$ cat landmark.list
/workspace/datasets/CASIA-WebFace/5587543/001.jpg 98.1535536766 111.477871895 155.723092651 106.953521013 130.264041901 137.168443489 103.697720623 165.793231583 153.124426651 165.626620483
/workspace/datasets/CASIA-WebFace/5587543/002.jpg 80.4625348091 113.501712513 137.962782669 107.797487926 101.989186478 146.925302696 89.6215407372 172.050915527 136.488462639 161.69779644
...

$ python FaceAlignment/alignment.py landmark.list CASIA-WebFace-Aligned
FaceAlignment Done!

FaceCropping

@param:

  • faceAlignment.list: the output file faceAlignment.list of Face Alignment process.
  • PATH_Cropped_image_dir: the destination directory path of cropped output images.
  • dst_width: the width of cropped output images.
  • dst_heigh: the height of cropped output images.

@output:

  • Cropped_image_dir: a directory, which contains the cropped output images listed in faceAlignemnt.list.
$ cat faceAlignment.list
/workspace/datasets/CASIA-WebFace/5587543/001.jpg
/workspace/datasets/CASIA-WebFace/5587543/002.jpg
...

$ python FaceCropping/facecrop.py faceAlignment.list CASIA-WebFace-Cropped 62 62
FaceCropping Done!

Reference

[1]. zhangjie, luoyetx/deep-landmark, 2016-01-26

[2]. RiweiChen, RiweiChen/FaceTools, 2016-03-11

face-preprocess-tools's People

Contributors

joyhuang9473 avatar

Stargazers

刘凯鑫 avatar Jack avatar shenmayufei avatar Yvonne avatar  avatar Winnerineast Lee avatar Zhixing Zhang avatar Tuan Anh Nguyen avatar Alperen Kantarcı avatar  avatar Sangcheol Park avatar Miracle avatar I'm-Hero avatar  avatar  avatar Fengchun Qiao avatar

Watchers

James Cloos avatar  avatar

Forkers

marc45

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.