Giter Site home page Giter Site logo

tyoungroy / vanillacnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ishay2b/vanillacnn

0.0 1.0 0.0 966 KB

Implementation of the Vanilla CNN described in the paper: Yue Wu and Tal Hassner, "Facial Landmark Detection with Tweaked Convolutional Neural Networks", arXiv preprint arXiv:1511.04031, 12 Nov. 2015. See project page for more information about this project. http://www.openu.ac.il/home/hassner/projects/tcnn_landmarks/ Written by Ishay Tubi : ishay2b [at] gmail [dot] com https://www.l

Shell 0.28% Python 20.35% Jupyter Notebook 79.38%

vanillacnn's Introduction

Implementation of the Vanilla CNN described in the paper Yue Wu and Tal Hassner, "Facial Landmark Detection with Tweaked Convolutional Neural Networks", arXiv preprint arXiv:1511.04031, 12 Nov. 2015. See project page for more information about this project. http://www.openu.ac.il/home/hassner/projects/tcnn_landmarks/

Written by Ishay Tubi : ishay2b [at] gmail [dot] com https://www.linkedin.com/in/ishay2b

This software is provided as is, without any warranty, with no legal constraints. The data is provided to allow easy deployment, is it not mine, a link to the original owners of the data is provided.

=============================================== Prerequisites:

Caffe, Python, Numpy, dlib

=============================================== Environment variables

To run the code on OSX (i.e. anaconda python), where ROOT means repository main folder export PYTHONPATH=$(ROOT):$PYTHONPATH export PYTHONHOME=/Applications/anaconda # To resolve issues running python layers from command line.

=============================================== Paths needed in PYTHONPATH

CAFFE_ROOT the path to the caffe distribute folder. CAFFE_ROOT+"/python" will be added to PYTHONPATH DLIB_ROOT - Dlib’s python module - if not already in PYTHONPATH. ROOT is the git main path.

=============================================== How to run this script? use mainLoop.py

To run all steps assign STEPS with FULL_STEPS: STEPS = FULL_STEPS

Or run a partial script like this: STEPS = ['testset']

The steps needed to run:

  1. Calculate train data mean matrix or load already calculated trainMean.png.
  2. Calculate train data std matrix or load already calculated trainSTD.png.
  3. Create train set hdf.
  4. Create test set hdf.
  5. Train from random initialization by running this command from ROOT path, dump both stdout and error to log.txt: caffe.bin train -caffeData/solver solver_adam_vanilla.prototxt >>log.txt 2>&1
  6. Plot the error by parsing the log (from ROOT directory): python python/parseLog.py log.txt
  7. Create benchmarks once using STEPS=['createAFLW_TestSet', 'createAFW_TestSet']
  8. Run benchmarks test by: STEPS=['testAFW_TestSet', 'testAFLW_TestSet']

=============================================== Main functions used

BBox - generic box class with helpers. ErrorAcum - accumulates the error DataRow is a class with landmarks, image and parsed from CSV. Can accept bounding box and crop/scale to desired size. createDataRowsFromCSV - translates CSV file into a list of DataRow. Passing the CSV parser as a parameter for each format. Predictor - a wrapper for caffe network. Call predictor.preprocess() to get image subtracted by mean and divided by std image. Also returns the landmarks scaled -0.5..+0.5.

vanillacnn's People

Contributors

ishay2b avatar neuron-vision avatar

Watchers

James Cloos 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.