Code Monkey home page Code Monkey logo

facialrecognition's Introduction

Facial Detection Over IP

forthebadge

The goal of this project is to detect Faces in live IP Camera footage. We use Tensorflow as our back end and build off of the SSD MobileNet Architecture. Versions using YOLOv3 and other Single Shot Detectors or Unified Detection Models are being explored for speed-accuracy trade-offs.

Video Exposition

Motivation

We take in a live video stream from a network connected camera and perform image classification on the frames of this video. This video is then sent over LAN to an embedded device for display purposes (i.e. ARM Processor).

By taking this approach, we can allow users to explore image classification output on devices not powerful enough to perform these computations themselves. Additionally, any smartphone can act as the video source.

Tech/framework used

Built with

To Do List

  • Make Install Guide for Linux (CPU Only)
  • Make Install Guide for Linux (GPU)
  • Reduce calls to frozen graph
  • Rebuild to utilize Intel MKL-DNN, AVX2, JIT
  • Extract frames from video at system edge
  • Apply Transfer Learning and train using LFW Database

Environment Installation / Setup - TensorFlow CPU

Windows

  • Install Anaconda and add it to $PATH if you dont already have it.
  • Install Tensorflow CPU and all dependencies:
    conda create --name tf python=3.5
    activate tf
    conda install scipy
    pip install tensorflow
    
  • If everything is installed correctly then this test code
    >> import tensorflow as tf
    >> hello = tf.constant('Hello, TensorFlow!')
    >> sess = tf.Session()
    >> print(sess.run(hello))
    Should return
    Hello, TensorFlow!

Linux

Coming soon.

Environment Installation / Setup - TensorFlow + NVIDIA GPU

Disclaimer

Setting Up TensorFlow GPU will take a long time, and there are no guarantees. The code will run much better on the GPU Version, however installation of TF-GPU on Windows is tedious at best and maddening at worst. Use this guide at your own risk.

Windows

  • Ensure you have Microsoft C/C++ Build Tools 2015 installed. If you have Visual Studio 2017 installed, these tools are not installed by default. Make sure these are in your $PATH as well.
  • Ensure that your NVIDIA Base Drivers are up to date. At time of writing, the current driver set is Release 390. Reboot after this step.
  • Install the NVIDIA Cuda Toolkit. This must be version 9.0, version 9.1 is not yet supported. Add the bin folder and enclosing CUDA folder to $PATH.
  • Install CuDNN version 7.0 and add that to $PATH.
  • Reboot. If you got all of this installed correctly, the tedious part is over.
  • Install Anaconda and add it to $PATH if you dont already have it.
  • Install Tensorflow GPU and all dependencies:
    conda create --name tf-gpu python=3.5
    activate tf-gpu
    conda install scipy
    pip install tensorflow-gpu
    
  • If everything is installed correctly then this test code
    >> import tensorflow as tf
    >> hello = tf.constant('Hello, TensorFlow!')
    >> sess = tf.Session()
    >> print(sess.run(hello))
    Should return
    Hello, TensorFlow!
  • Go take a walk because you're done and you deserve it.

Linux

  • Ensure you have the latest nvidia drivers, this can be determined using
nvidia-smi
  • Install Tensorflow-GPU
pip install tensorflow-gpu

Project Dependencies

A full list of dependencies can be found in env.yml. Anaconda maintains that an equivalent enviroment to mine can be built using:

conda env create -f env.yml -n tf-gpu 

I have been unable to independenly verifiy this functionality. If anyone finds success with this method, let me know and I will update this to reflect any new information.

Troubleshooting

  • If you get the following error:
     ModuleNotFoundError: No module named 'object_detection'
  • Go to the repo parent directory (it should contain a folder 'object_detection') and execute the following commands:
     cd path/to/parent/dir/
     python setup.py setup
     python setup.py install

Credits

Inspired by TensorFlow Model Zoo

License

MIT License. Provided AS IS.

MIT © Noah Johnson

facialrecognition's People

Watchers

Noah Johnson 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.