Coder Social home page Coder Social logo

baucheng / hyperface Goto Github PK

View Code? Open in Web Editor NEW

This project forked from takiyu/hyperface

0.0 2.0 0.0 8.31 MB

Deep Neural Network (DNN) which predicts face/non-face, landmarks, pose and gender simultaneously with Chainer.

License: MIT License

Python 84.70% JavaScript 13.20% HTML 2.10%

hyperface's Introduction

Hyper Face

Hyper Face implementation which predicts face/non-face, landmarks, pose and gender simultaneously.

This is NOT official implementation.

This software is released under the MIT License, see LICENSE.txt.

Features

  • Chainer implementation
  • Image viewer on web browsers

Testing Environments

Ubuntu 16.04

  • Python 2.7
  • Chainer 1.14.0
  • OpenCV 2.4.9
  • Flask 0.11.1
  • Flask_SocketIO 2.4
  • Dlib 19.1.0

Arch Linux

  • Python 3.5
  • Chainer 1.14.0
  • OpenCV 3.1.0
  • Flask 0.10.1
  • Flask_SocketIO 2.2
  • Dlib 19.1.0

Configuration

Important variables are configured by config.json.

Set gpu positive number to use GPU, port numbers of web servers and so on.

Train

Preparation

Download AFLW Dataset and AlexNet Caffe Model, expand them and set aflw_sqlite_path, aflw_imgdir_path, and alexnet_caffemodel_path in config.json

Pre-training

Pre-training with RCNN_Face model.

python ./scripts/train.py --pretrain

Open http://localhost:8888/, http://localhost:8889/ and http://localhost:8890/ with your web browser to see loss graphs, network weights and predictions. Port numbers are configured by config.json.

Main training

python ./scripts/train.py --pretrainedmodel result_pretrain/model_epoch_40

Use arbitrary epoch number instead of 40.

Test

To skip training, please use trained model from here (or here (Don't expand as zip)).

AFLW test images

python ./scripts/use_on_test.py --model model_epoch_190

Open http://localhost:8891/ to see predictions.

Your image file

Set your image file with --img argument. The dependence are less than other tests and demos.

python ./scripts/use_on_file.py --model model_epoch_190 --img sample_images/lena_face.png

Input images are contained in sample_images directory.

Demos with post-processes

Open http://localhost:8891/ to see demos.

AFLW test images

python ./scripts/demo_on_test.py --model model_epoch_190

Demo using AFLW test images

Web camera on your browser

python ./scripts/demo_live.py --model model_epoch_190

ToDo

  • Tune training parameters.
  • Fix pose drawing.
  • Implement post processes.
  • Tune post processes parameters.

hyperface's People

Contributors

takiyu avatar

Watchers

 avatar paper2code - bot 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.