Giter Site home page Giter Site logo

shavenet's Introduction

ShaveNet

Do you forget to shave your face when you are busy programming?

This is a light-hearted project which I conceived of when shaving my beard. I often skip shaving until I realize I look like a chimpanzee.

This project was conceived to remind myself when to shave. Since there are no existing labelled datasets for male faces showing days since last shaved, I created a script which allows one to generate their own labelled data.

Bro, did you just assume my gender?

No, I didn't. I am not sexist or beardist. If you do not sport a beard, fear not! By making a few changes, mainly to data collection and test scripts, you can adapt ShaveNet to recognize emotions. You can save data with different emotions as labels and train your own emotion detector! If you are Kristen Stewart and the ConvNet cannot detect your emotions, please raise an issue.

Who is this for?

The code in this repo is a good guide for a beginner to neural networks and tensorflow. The scripts are a good tutorial for an end to end machine learning project involving data collection, augmentation, low level implementation of a ConvNet in tensorflow with tf.nn API, evaluation of training with tensorboard and evaluation on a live camera feed. From a practitioner's point of view, it is more satisfying to see how machine learning works on your own face data, rather than arbitrary objects from a well known dataset.

How to use?

Here are the four basic steps to use this repo:

Step 1. Shave your beard on day 0. From day 0 to about one week, record training data using collect_data.py.

Step 2. Apply data augmentation with hey-daug.

Step 3. Train a fairly shallow ConvNet with train.py.

Step 4. Test on your face with test.py.

Results

Yes, it has been 6 days!

alt text Fake smile for the internet

Caution

Most of the tensorflow syntax is very old (written for tf 1.1) and low-level. This is nowhere near an optimal architecture for solving the problem. The basic demonstration is complete, but this is still a work in progress.

Missing dependency

The scripts use a haar cascade object detector to detect faces. This requires a file called haarcascade_frontalface_default.xml, which can be found in your OpenCV installation. Since it is the intellectual property of Intel, I cannot provide it on this repo.

Next steps

Train a model to advise when to bathe.

shavenet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shavenet'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.