A reliable security system costing less than £50 using a Raspberry Pi and NoIR camera.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
guardingthepi.ymlx-yaml - 7.08 MB - 04/14/2021 at 09:59 |
|
|
haarcascade_dogface.xmlXML - Extensible Markup Language - 41.17 kB - 04/14/2021 at 09:58 |
|
|
CMakeLists.txtplain - 476.00 bytes - 04/14/2021 at 09:46 |
|
|
newmain.cppx-c++src - 570.00 bytes - 04/14/2021 at 09:46 |
|
|
main.cppx-c++src - 536.00 bytes - 04/14/2021 at 09:46 |
|
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
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!)
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.
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.
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! :)
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/
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
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
Create an account to leave a comment. Already have an account? Log In.
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.
Become a member to follow this project and never miss any updates
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!