Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iothings:proiecte:2022:smart_home_security_system [2023/01/19 23:43]
cornelia.alecu1003 [Button]
iothings:proiecte:2022:smart_home_security_system [2023/01/20 00:43] (current)
cornelia.alecu1003 [6. References]
Line 1: Line 1:
 ====== Smart Home Security System ====== ====== Smart Home Security System ======
-Author: **Gabriela Alecu** +Author ​     : **Gabriela Alecu** ​\\ 
- +Master ​     : **AAC2** \\ 
-Master: **AAC2**+Code + demo : **[[https://​github.com/​Gabriela1003/​IoT|Gabriela_IoT]]**
  
 ====== 1. Overview ====== ====== 1. Overview ======
Line 79: Line 79:
  
 {{ :​iothings:​proiecte:​2022:​buton_gabi_a.jpeg?​200 |}} {{ :​iothings:​proiecte:​2022:​buton_gabi_a.jpeg?​200 |}}
 +
 +====== 3. Raspberry Pi ======
 + The raspberry pi has been configured using [[https://​www.tomshardware.com/​how-to/​raspberry-pi-facial-recognition|Facial recognition guide]], ​
 +and it uses code provided by this [[https://​github.com/​carolinedunn/​facial_recognition|git repository]],​ that uses the OpenCV library for the facial detection.
 +{{ :​iothings:​proiecte:​2022:​camera_gabi_a.jpeg?​250 |}}
 +
 +===== Flow of the project ​ =====
 +  - Create Dataset folders containing photos of the people that need to be later detected by the project.
 +  - Run the "​train_model.py"​ script, which uses the Haar Cascade algorithm to create encodings.pickle - a file that describes the facial features of each person in the dataset folder.
 +  - Run the facial_req.py script, which takes photos with the camera and analyses them using the OpenCV library and the pickle file created in the previous step. The names of the people in the picture are stored in a list called "​names"​. Using this list, I can send the names of the detected people to the Arduino over the serial connection. The logic behind sending the text to the Arduino is as follows:
 +    - If a person is recognised and known - send the name of the person via the serial connection
 +    - If a person is detected and not known - send "Nu stiu cine" through the serial connection, which will result in "Nu stiu cine e la usa" on the Arduino screen
 +    - If no one is detected - send "​Nimeni nu" over the serial connection, which results in "​Nimeni nu e la usa" on the Arduino screen.
 +<code C>
 +#The default value for name is "Nu stiu cine" that gets updated every frame. ​
 + if not names:
 + if oldName != "​Nimeni nu\n":
 + oldName = "​Nimeni nu\n"f
 + ser.write(oldName.encode('​utf-8'​))
 + else:
 + if oldName != names[0]:
 + oldName = names[0]
 + ser.write(oldName.encode('​utf-8'​))
 +</​code>​
 +
 +====== 4. The box ======
 +The box has been designed in Fusion 360, sliced using Prusa Slicer and printed on a Prusa Mini.
 +{{:​iothings:​proiecte:​2022:​bot_gabi_a.png |Bottom }}
 +{{ :​iothings:​proiecte:​2022:​top_gabi_a.png |Top }}
 +{{ :​iothings:​proiecte:​2022:​but_gabi_a.png |Button}}
 +
 +====== 5. Conclusion ======
 +  * This project is a prototype to show that IoT can make our lives easier without us having to spend a lot of money.
 +  * After building the box, I learned that sometimes you have to take a step back and look carefully at what you are doing (many logic errors were not realized until after the box was built, such as the fact that the display does not say "Gabi e la usa", or the fact that the LED is on the Arduino side instead of the Raspberry Pi)
 +  * The button was really fun to make 
 +====== 6. References ======
 +  - https://​www.tomshardware.com/​how-to/​raspberry-pi-facial-recognition
 +  - https://​docs.arduino.cc/​library-examples/​tft-library/​TFTDisplayText
 +  - https://​github.com/​carolinedunn/​facial_recognition
iothings/proiecte/2022/smart_home_security_system.1674164626.txt.gz · Last modified: 2023/01/19 23:43 by cornelia.alecu1003
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0