Smart CCTV Camera (with Face Recognition) using Raspberry Pi 4 | Full Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

All these YouTube DIYers are banging on the NLP hard.

Click here, smash this, algorithm comment, gimme money, make me famous. So smoove.

👍︎︎ 1 👤︎︎ u/Rawesome 📅︎︎ Jul 16 2020 🗫︎ replies
Captions
this is the smart cctv camera it's a home automation surveillance camera that helps you keep track of your valuable assets and many more featuring the new raspberry pi high quality camera we're able to make the most of face recognition so you know who's at the door as well as adding multiple profiles whether it's a friend or a stranger it can be placed indoors or on your front porch with this dedicated monitor you can interact with who's at the door you can also control home appliances that's not only it you can also view those blind spots and access a live stream whether you're indoors or outdoors oh and if you're not at home you'll be notified who turned up at your door today well that's enough from me in this video we're gonna find out how to build one with the raspberry pi 4 and the new raspberry pi high quality camera let's go somewhere a bit more comfortable can you let me in right before we start if you like this type of content let me know by smashing the like button also if you're new here subscribe welcome let's beat this youtube algorithm by leaving a comment also turn on post notifications to keep you updated on the latest release thanks for subscribing let's see where we can take this this is the overview of what we're going to cover [Music] list of parts [Music] the bear essentials you'll need is a raspberry pi 4 the 4 gig version a camera enclosure a micro sd card our raspberry pi 4 charger make sure it's usbc the new high quality raspberry pi camera and its associated six millimeter lens and for the display a raspberry pi 3 a micro sd a 7 inch display which is a touch screen interactive a pi 3 charger a hdmi cable and a micro usb to power the seven inch display links to the part are in the description below how it works the theory the bare essentials we need to complete the camera build is a camera module and a raspberry pi simply insert the camera module into the camera port of the raspberry pi to complete the build here's a live stream demo of the pi4 with the wide-angle camera lens question unlike normal cctv cameras how can we view the live stream on other devices [Music] well turns out this is the answer we're capturing live footage from the camera build and using flask to create a live stream to our client devices whether it's your pi or your mobile phone devices connected to the same network of the camera build will also be able to visit the url and see the live footage of the stream so you may be wondering how does this compare with the version 2.1 camera module for starters it's definitely got a wider viewing angle and the ability to switch out camera lenses for a higher resolution here's a side-by-side comparison of the two now when you're making a smart cctv camera security is one of the most important things to keep in mind and that's why today's video is brought to you by assembly of parts the camera build shopping around the goal was to find a plastic cctv camera [Music] and we found one now the advantage of a plastic cctv camera is that it could be easily broken apart for his enclosure in this build you can simply open it by twisting the cap open it looks like this one featured night vision capabilities with his ir led ring you can probably use this for later [Music] now the original color was quite obvious i wanted something a bit more stealthier [Music] this was spray painted in matte black [Music] i was pretty pleased with the look some holes were drilled in a box to thread in the ribbon cable of the camera lens [Music] this was eventually screwed in and luckily for this enclosure the dimensions fit this camera build is now being slowly reassembled and put back into the base enclosure here's the final build of it so you may be wondering that's cool and all but how do we make this camera rotate to do this we'll be using a servo motor which is really good for accurate movement this is the current setup of the wires we'll be soldering these onto female pins and adding them to the raspberry pi header to do this we're just going to strip the wires and soldered them onto the female header pins we're gonna add some electrical wires to avoid any short circuits the servo motor also has a screw whereby we can drill a hole through the camera and screw it right through this servo motor is going to cause the camera to be able to move with precise precision so now we're just reassembling everything back together with the servo motor this is the type of movement we'll expect from the servo motor let's plug the wires in the three pins used are the five volt ground and the gpio pin [Music] ensure that the pwm wire of the servo is set at pin 11 and five volt and ground respectively we're gonna use a cctv camera stand enclosure to tuck the raspberry pi in luckily for this one it offers good ventilation we're now gonna plug in our micro sd card with pre-installed raspbian os if you're unfamiliar with this process the previous video of the smart mirror details this and there you have it we've completed the camera build of the smart cctv the touchscreen interactive now this part of the video is pretty optional but it's nice to have its own dedicated monitor for the smart cctv webstream in order to do this we're going to have some wooden planks to build a case the dimensions are given so once assembled this was painted black and some interior varnish was applied to give it a nice shiny finish now to assemble the display these are the current ports we'll be using [Music] we're going to be using some nice l-shaped hdmi connectors to keep it nice and compact [Music] the raspberry pi case was also assembled on top next up we're gonna have to power the seven inch display using a micro usb the power will be provided by the raspberry pi itself [Music] now we're using another l connector to keep it nice and compact we're using a hdmi cable to connect the raspberry pi to the display [Music] lastly we're going to plug in the micro usb power supply [Music] this is all going to be assembled in this case it's good to drill some holes for ventilation as the raspberry pi does get quite warm over time lastly we're gonna add the cover to finish the whole build all together now going back to your camera build let's install the face recognition and the d-lib library so plug in your pi and let's get to the software build so we've logged in remotely via vnc the first thing we want to do is complete the setup and make sure it has internet access [Music] next up we're going to go into the raspbian config and make sure that the camera port is enabled this would require a reboot once rebooted we can do a quick check to make sure that the camera port is working and we can take a picture this is the current output i've got if it's too blurry you can adjust the camera lens to make it more sharper right we're now good to download the dlib library dependencies and the face recognition library you can find the d-lib library dependencies on our site this is pretty much the updated d-lib library dependencies based on the face recognition library for the raspberry pi 4 all credits goes to this repo [Music] what we're going to do now is now copy and paste the specific library dependencies you'll find that most of these library dependencies may be already installed but this is just in case now this process took roughly around 40 minutes to install on the raspberry pi 4 but for other models this can take longer [Music] [Music] the next part we're going to increase the swap size from 100 to 1024 so we can help with the installation of the dlip library [Music] once installed we're going to decrease the swap size back from one zero two four to one hundred [Music] we're now installing the support and dlip libraries and finally the face recognition library [Music] once installed we can see the dlib library in our directory if we click into it and we go into build we can see the face recognition library also there [Music] the next part of this video we're going to set up the smart cctv so we're going to head off to the repo [Music] and as always you can find more information in the description below we're now going to get clone the repo to our directory [Music] we can do this by opening the terminal window and git cloning and adding the github repo url once done we'll be able to see the smart cctv camera reverb in our directory you'll see a series of files in the directory the main.py file is what will start the web stream via flask inside the profiles folder this is where you'll upload your profile faces so they can be recognized via the facial recognition library here are some examples already in the folder and here's the test we're now going to open the main.py file which is a python code which allows for the web stream [Music] the main.py file relies on the camera file as well as other files within the directory also now switching to a device on the same network and typing in the ip we're now able to see the live web stream as well as control the motor and we got face recognition hey you made it to the end great if you like this type of content you may enjoy our building process and behind the scenes that could be seen on the instagram channel smart builds link below peace
Info
Channel: Eben Kouao
Views: 70,730
Rating: 4.9588962 out of 5
Keywords: Raspberry Pi Smart Camera, Smart CCTV, Smart CCTV Camera, Raspberry Pi Camera, Raspberry Pi 4, Raspberry Pi High Quality Camera, Face recognition Raspberry Pi, Face detection Raspberry Pi, Raspberry Pi Project, Eben Kouao, smartbuilds, smartbuilds.io, opencv, diy, Surveillance Camera, hq cam, raspberry pi HQ camera, pi security camera
Id: 6nY-V_WG7oI
Channel Id: undefined
Length: 15min 19sec (919 seconds)
Published: Thu Jul 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.