AI Real time face Detection using WebCam (PYTHON)
For Real Time Face Detection we are going to use opencv library:-
Let's get started-
- To Installing the library simply open the terminal window and type - "pip install opencv-python"
- Then we have to import library
- For this we are going to use Haarcascade algorithm (you can download the package from below)
- We will use the cv::CascadeClassifier class to detect objects in a video stream. Particularly, we will use the functions: cv::CascadeClassifier::load to load a .xml classifier file. cv::CascadeClassifier::detectMultiScale to perform the detection.
- The image or the frames are then turned to grayscale Because it is a one layer image from 0-255 whereas the RGB have three different layer image, thus it makes it easier to detect faces.
- Now download the package and code from here
- Run the code in Terminal.
If you want to change the colour of box detecting the face you can change the RGB values
(To End the Program you need to Kill the Terminal)
And it's done.
hey that's a quit impressive work u did wanna see more of ur work keep onto ur efforts man !
ReplyDeletethanks man
Delete