Close
0%
0%

GuardMyPi

A reliable security system costing less than £50 using a Raspberry Pi and NoIR camera.

Public Chat
Similar projects worth following
GuardMyPi is a home security system centred around the Raspberry Pi 3. It utilises the Pi NoIR Camera to monitor a room or entrance point in a house. Facial recognition software is used to distinguish between house members (including pets) and intruders. If an intruder is detected, a notification is sent to the user via a web application. All image processing is completed using OpenCV

x-yaml - 7.08 MB - 04/14/2021 at 09:59

Download

XML - Extensible Markup Language - 41.17 kB - 04/14/2021 at 09:58

Download

plain - 476.00 bytes - 04/14/2021 at 09:46

Download

x-c++src - 570.00 bytes - 04/14/2021 at 09:46

Download

x-c++src - 536.00 bytes - 04/14/2021 at 09:46

Download

View all 6 files

  • Release v. 1.0

    Aidan Porteous04/18/2021 at 15:04 0 comments

    GuardMyPi version 1.0 is now live! After many hours on zoom (and coffee) the team have finalised the source code that can turn any Raspberry Pi and Camera into a robust security system!
    https://github.com/phgelado/guardmypi/releases/tag/1.0

  • Gesture Recognition

    Aidan Porteous03/24/2021 at 12:01 0 comments

    Smile and wave ! Another method to unlock our system as you enter your residence is through gesture detection. Hand recognition by waving or holding your hand up the camera is also a method we can integrate into our code so the system knows all is well! It is also a potential method we are considering implementing in the locking function for our code (coming shortly!)

  • Facial Recognition

    Aidan Porteous03/22/2021 at 20:10 0 comments

    It's been a mad couple of weeks! However, a quick update with our Facial Recognition software.

    While its has been tricky to refine, there has been a lot of progress using facial recognition as one of the methods (other ways coming up!) to unlock the device when entering the premises. Using HAAR cascades for face detection and a trained Fisher Face algorithm, we have began to refine the facial recognition process in our system. Here is a quick screen grab from the latest test of our code.

  • Facial Recognition Classifier Training

    Aidan Porteous03/05/2021 at 13:27 0 comments

    An essential part of the Guardmypi project is facial recognition allowing the system to distinguish between residents and intruders. The first method of facial recognition being tested utilises the HAAR Cascade, a machine learning-based approach where we have used many positive and negative photos to train the classifier. Running a more relaxed training model (see left, run time: 30mins) will allow the classifier to make more false positives during the training stages and allow for quicker model testing. Conversely, we have a stricter classifier training stage (see right run time 72+ hours) that will ideally train the model to have very few false alarms and ideally implemented in our final solution.

  • Human Detection

    Aidan Porteous03/05/2021 at 13:19 0 comments

    A glimpse of our human detection software in action! Using "You Only Look Once" (YOLO) pre-trained object detection models, we are able to detect when a human has entered the frame from a variety of distances and angles.

    https://www.facebook.com/guardmypi/videos/478785569807010/

    Cheer up Magnus your code works! :)

  • Motion Detection

    Aidan Porteous03/05/2021 at 13:14 0 comments

    A quick snippet of our motion detection software! This will act as a trigger for the system to engage the object classifier and facial recognition using YOLO and HAAR Cascades respectively!
    https://www.facebook.com/guardmypi/videos/138217028079622/

View all 6 project logs

  • 1
    Building OpenCV from source for Raspberry Pi

    1. Downloading pre-built OpenCV4

    wget https://github.com/sol-prog/raspberry-pi-opencv/releases/download/opencv4rpi2.1/opencv-4.1.0-armhf.tar.bz2

    2.  Extract the archive

    tar xvf opencv-4.1.0-armhf.tar.bz2

    3. Move the extracted archive to the /opt folder

    sudo mv opencv-4.1.0 /opt

    4. Remove the archive (optional)

    rm opencv-4.1.0-armhf.tar.bz2

     5. Install video and image support packages

    sudo apt install libjpeg-dev libtiff-dev libjasper-dev libpng-dev libwebp-dev libopenexr-dev
    sudo apt install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libdc1394-22-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev

    6. Install packages needed for OpenCV's interface

    sudo apt install libgtk-3-dev libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5 
    

    7. Install other OpenCV related packages

    sudo apt install libatlas-base-dev liblapacke-dev gfortran

    8. Add OpenCV to the system path

    cd ~
    echo 'export LD_LIBRARY_PATH=/opt/opencv-4.1.0/lib:$LD_LIBRARY_PATH' >> .bashrc
    . .bashrc

    9. Restart the terminal or log back into the RPi if using a SSH

    10. Install git if necessary

    sudo apt-get install git

    11.  Clone a config file to use OpenCV for C++

    git clone https://gist.github.com/sol-prog/ed383474872958081985de733eaf352d opencv_cpp_compile_settings
     cd opencv_cpp_compile_settings/
     sudo cp opencv.pc /usr/lib/arm-linux-gnueabihf/pkgconfig
     cd ~
     rm -rf opencv_cpp_compile_settings/

     12. Check OpenCV has installed and been correctly added to the system path

    pkg-config --modversion opencv
  • 2
    Building an OpenCV Project In C++

    1. Install CMake on the Raspberry Pi

    sudo apt-get -y install cmake

    2. Save the following under CMakeLists.txt (within the same directory as the project)

    cmake_minimum_required(VERSION 2.8)
    project( Project )
    find_package( OpenCV REQUIRED )
    include_directories( ${OpenCV_INCLUDE_DIRS} )
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
    add_executable( Project main.cpp )
    target_link_libraries( Project ${OpenCV_LIBS} )

    3. Run cmake then make, and finally the output file

    $ cmake .
    ....
    $ make 
    ...
    $ ./Project

View all instructions

Enjoy this project?

Share

Discussions

Dan Maloney wrote 03/04/2021 at 19:47 point

Good timing, I need a security camera in my shop. Also thinking about putting one looking out the window to see if anyone is approaching. Thanks!

  Are you sure? yes | no

Aidan Porteous wrote 03/05/2021 at 13:00 point

Hi Dan, I'm glad this project fits into what you need as well. Currently still a work in progress with features still being tested. Once it is completed you will be able to try it for yourself! Aidan.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates