Code Monkey home page Code Monkey logo

rp_cam_face_recognition's Introduction

Face recognition cam with raspberry pi

This project is based on face_detection_picamera.

The goal of this project is to build a low power face recognition cam using a Raspberry Pi.
Only if the pir sensor detects motion the face recognition algorithm is executed. Faces are assigned names and via Mqtt the information 'motion detected', 'face recognized (with name)' or 'face not recognized' are reported to a home automation system. For better privacy protection video streaming over the network is not used. I personally use openHAB to process the data, but any system with a Mqtt bridge can be used.

Software Installation

For opencv the opencv-python-headless version is used, it comes without UI bindings and uses less resources. Use pip to install all required packages.
Setup the Mqtt server in script facial_req.py

Model Training

Add your images under dataset/<name>/<image>. run the script train_model.py to create the encodings.pickle file with all your training data.

Face recognition

When training is finished run the script facial_req.py.

PIR sensor 287-18001 wiring

PIR wiring

RP3 B+ with PI Cam and PIR sensor

RP Cam with PIR Sensor

Usage example

In my personal setup openHAB executes the following rules:
If a person is not recognized, the person is asked to face the camera (for audio I use a Google Nest).
If the person does not comply or is unknown to the system, an alarm is triggered.
If a face is recognized the system marks this person as present.
If no motion is detected for some time the person is marked as absent.

rp_cam_face_recognition's People

Contributors

klumw avatar

Stargazers

 avatar

Watchers

 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.