Skip to content
Flajt edited this page Sep 12, 2017 · 4 revisions

Welcome to the Pi-Secure wiki!

What you can do with Pi_Secure:

Do you are scared that other people enter your living area without you know that? Or you are scared that somebody brake in you house?

You can be helped out!

With this software you can easy setup a camera and connect it with a Raspberry Pi. You add faces in the databank and if somebody that is not listed in the databank you will be notified per mail and with a push message at you phone. (The mail stuff is working, since 12.09.2017).

What you will need:

  1. A computer
  2. A Raspberry Pi (recommended version 3)
  3. A camera with cable
  4. An instapush account
  5. A smartphone
  6. Internet :)
  7. Python 3
  8. a folder on you computer Desktop called pictures

Let`s start:

  1. First we need to go to instapush.im and create an account. Just type some fake data inside ;) (but a real mail adress)

  2. Then go to Apps and then to Add Application. From their you have to enter a name for that type inPy-Secure. Then go to Add Event and type in Warning as title, time for trackers and at last An unknown person enters you area at {time} and go to Add Event. Now we are done here but don`t close the side.

  3. Copy the whole folder "Pi-Secure-master" except the ui.py script to your Raspberry.

  4. Go to Python.org and search for Python 3 and you operating system or you go to Anaconda.com and install this (I recommend the second way).

  5. Read in my install Guide for Windows how to install Openv for Windows. If you are running Debian Ubuntu you can use my script opencv_setup.sh.

  6. After you install it for you Operating System we move to the Raspberry Pi 3. Open the folder that you copied to your Desktop and start the opencv_setup.sh script. This will take some time.

  7. After the installation you have to type ifconfig in a terminal (Black window) and copy your Ip adress. After that open the server.py script and search for host variable and paste your Ip insider the "".

  8. Now you will run Server.py script. This will create a folder at your Desktop called Pi_Secure after that minimize the window and run setup.py and follow the instruction of the script (there is only one ^^). After that you can delete the Pi_Secure-master folder, but make sure you don`t miss something.

  9. Lets move back to our computer, and open up ui.py and search for the host variable again and paste the Ip between the two " ". (Currently there is a Ip inside just remove it.) and then you have to look for the cascade_path variable and paste the path to the cascade. (For that change the D:\DOWNLOADS to the folder were you saved the directory).

  10. If you want to start a script on Windows open a command prompt an type python ui.py and now you can run the script if you add anaconda to you system variables.

  11. Start the script ui.py and follow the steps to setup your account. If you reach the point were you have to enter your Instapush ID open up the Instapush website and go to Apps then Warning and then click on Basic Info and you will see something like that: Application ID : 59b53cdaa4c48aa5ad74xxx and Application Secret : b2a4753b01df8d62c6b0fe2bxxxxxxxx. Write them manualy in in the Boxes first App Id and the the secret.

  12. After the setup is done you can use the simpele interface to do what you want. But first we want to use option 6 to take pictures. Place a Webcam/Camera infront of you (not to close but not to far away) and connect it with your computer. Then look to the cam and press six and enter. After that your Camera will take 21 photos and save them at your Desktop in a folder called pictures. Now you can easy send the images to your raspberry with the Add picture command simple type in 1 and enter now you can send every picture manually by typing the name and the format of the picture (there are 21 images named im_0.jpg till im_21.jpg).

  13. Now switch to your Raspberry again and move to the pictures folder in Pi_Secure. Copy all imges in the posfolder and run find_faces.py this will ask you for the name of the person and an ID take an ID you like (only numbers) (Please only 21 Images from the same person or it will not work).

  14. After you repeat that for your familie and friends go back to the script folder and run the train_recognizer.py script. This script create a database that will be used by the recognizer.

  15. And now finalllllyyyy we are running the handler.py script and the handler starts running with the webcam that is connected to the Rasperry. Test it by hold your face at the camera and look for the name the system is out printing.

  16. Now you can explore the UI or whatever, if you got problems, questions or feedback mail me or/and open an issue. If you read it at the 11.09.2017 be sure the code will be updatet this week. And if you want more, stay ready for the payed Version (if you are interested in this mail me aswell ;) )





Clone this wiki locally