Skip to content

Get texts from a smart computer that notifies you who is at your door

Notifications You must be signed in to change notification settings

daytonschuh/whodat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whodat Build Status

Get texts from a smart computer that notifies you who is at your door

Here's the gist:

  • A Raspberry Pi with a camera could be attached to the front of a door, the peephole on the back of the door, or maybe even inside something placed on your doorstep.
  • The Pi would attempt to scan the faces of those coming up to your door, and will notify you via text who's there.
  • We will need to train a facial-recognition model with pictures of people we'd like to recognize.
    • This could be done at time of setup, with pictures of roommates and family members, or we could attempt to train iteratively with photos taken from the Pi.
    • Hardware constraints may prevent us from training on-device. Due to scope of project we probably should avoid implementing offloading the training to another device.
  • Send output from facial-recognition model to user via text-message using the Twilio Python library

Table of contents

Installation

Linux

TODO

macOS

// face detection uses dlib 
// when we install dlib through `pip install -r requirements` we will need to have cmake on our path.

brew install cmake

git clone https://github.com/diddlypop/whodat.git
cd whodat

// download python3.7.6 or use pyenv (not available in pip / will need to compile from source)
//    to change global python version to python3.7.6

// activate virtualenv or use pipenv (`pip install pipenv` outside of virtual environment)

pip install -r requirements.txt

Windows

TODO

https://cmake.org/download/

Setup

Encodings

// place directories inside profiles/ that are named after the person you are looking to encode for
// place all photos of that person in their named directory

cd assets
mkdir profiles/

// place photos inside profiles

python encode_faces.py --dataset profiles/ --encodings encodings.pickle --detection-method hog

python pi_face_recognition.py -c haarcascade_frontalface_default.xml -e encodings.pickle

Flask

// to run flask test server run the WebApp/main.py

python main.py

// direct browser to 127.0.0.1:5000/

Testing

// call pytest to run test suite
pytest

Dependencies

  • twilio Build Status PyPI PyPI
    • Don't forget that you should never commit your API key for twilio. Use the environment varibles: TWILIO_ACCOUNT_SID TWILIO_AUTH_TOKEN
  • PySimpleGui DOCS
  • pytest DOCS

Pi Setup

Pi Setup

Docs

Pi Hardware

Pi Software

The raspberry pi will use a lightweight version of Raspbian. Our goal is to include the project within a docker image to eliminate the possibility of enviroment issues.

Image Classifier

We are using OpenCV with the dlib library to recognize faces. The dlib library has been trained on over 3 million faces.

GUI

PySimpleGui is an awesome and easy-to-use tkinter wrapper. It is great for Raspberry Pi's and simple applications.

Continuous Integration

Using Travis CI for automatic testing

About

Get texts from a smart computer that notifies you who is at your door

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 59.7%
  • HTML 40.3%