Code Monkey home page Code Monkey logo

jda's Introduction

JDA

C++ implementation of Joint Cascade Face Detection and Alignment.

Build

$ git clone https://github.com/luoyetx/JDA.git
$ cd JDA
$ mkdir build && cd build
$ cmake ..
$ make

If you are on Windows, make sure you have set environment variable OpenCV_DIR to OpenCV's build directory like D:/3rdparty/opencv2.4.11/build. You may also need Visual Studio to compile the source code. If you are on Linux or Unix, install the development packages of OpenCV via your system's Package Manager like apt-get on Ubuntu or yum on CentOS. However, Compile the source code of OpenCV will be the best choice of all.

Data

You should prepare your own data and all data should be under data directory. You need two kinds of data, face with landmarks and background images. You also need to create two text file train.txt and nega.txt (you can change the name of these two text file by editing the code in common.cpp).

Every line of train.txt stores a face image's path with its landmarks. The number of landmarks can be changed in common.cpp and the order of landmarks does not matter.

../data/train/00001.jpg x1 y1 x2 y2 ........
../data/train/00002.jpg x1 y1 x2 y2 ........
....
....

The face images should be resized to the pre-defined size and you should do any data augmentation by yourself, the code will exactly use the face images you provide.

nega.txt is much more simpler. Every line stores where the background image in the file system.

../data/nega/000001.jpg
../data/nega/000002.jpg
../data/nega/000003.jpg
....
....

Background images should have no face and we will do data augmentation during the hard negative mining.

You may refer to script/gen.py for more detail.

Train

$ ./jda train

If you are using Visual Studio, make sure you know how to pass command line arguments to the program. The model will be saved to model directory. The model file is stored in binary form and I may change the data format later, so training the model on your own risk. However, I will try to make sure that the further code can load the model parameter correctly.

Attention

This project is not completed yet and may has some hidden bugs. Welcome any question or idea through the issues.

QQ Group

There is a QQ group 347185749. If you are using Tencent QQ, welcome to join this group and we can discuss more there.

License

BSD 3-Clause

References

jda's People

Contributors

luoyetx avatar pletessier avatar

Watchers

James Cloos avatar  avatar

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.