Giter VIP home page Giter VIP logo

mmm-facial-recognition-tools's Introduction

Facetrainer Tool

This repository contains tools to setup and train the facial recognition module for the MagicMirror.

Facetrainer Tool

The scripts in this directory are based on scripts from pi-facerec-box and should be used on a computer (with a webcam). You need OpenCV installed on your computer. It may work on a Pi but is probably pretty slow.

Usage

Capturing training images

  1. Make sure you have all dependencies (see below) installed.
  2. Run python capture.py.
  3. Decide whether you want to capture images from your web cam or convert existing .jpg images.
  4. Enter the name of the person you are about to capture. Images will be stored in a folder named after the captured person in training_data/.
  5. Follow screen instructions.

Training model

  1. Make sure you have all dependencies (see below) installed.
  2. Make sure you have captured all your images.
  3. Run python train.py. The script will automatically scan the directory training_data/ for your images.
  4. Wait. You will end up with a training.xml file in the current directory.
  5. Copy down the ['name', 'name2','name3'] part because you will later need it for setting up your mirror's face recognition and to test your face recognition model.

Facerecognition Test Tool

With this tool you can test if your facerecognition model is working.

Usage

  1. Make sure you have all dependencies (see below) installed.
  2. Make sure your training.xml from running train.py is in this directory
  3. specify the face recognition algorithm in the environment with
export FACE_ALGORITHM=1
  1. specify your user labels in the environment with
export FACE_USERS=Alice,Bob,Casey,Doug
  1. Run python facerecognition.py.

Dependencies

  • OpenCV (sudo apt-get install libopencv-dev python-opencv)

Open Source Licenses

###pi-facerec-box The MIT License (MIT)

Copyright (c) 2014 Tony DiCola

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The negative training data is from the ORL face database. Please see the file tools/facetrainer/training_data/negative/README for more information on this data.

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.