Image contains lot of information. So, processing image is quite tricky but it can be very fun as well. One method of processing images is via face detection. Face detection is a branch of image processing that uses machine learning to detect faces in images.
Dlib's shape detection method allows us to locate certain part in an image. In this tutorial, you will learn to detect certain part of an image using DLIB and use OpenCV to mask an different image on the detected portion of the parent image. OpenCV is an open-source programming library that is used to process images.
Make sure to have below libraries installed in your system -
- OpenCV
- DLIB
- Matplotlib
Note: You can get the shape_predictor_68_face_landmarks.dat trained model file from here.
Next, Download the entire add_mask_on_face repository into your local system. Keep the shape_predictor_68_face_landmarks.dat file inside the root folder. Now You are all set to run your experiment.
Happy Learning 👍