Some simple computer vision implementations using OpenCV.
In this project, I build an object detection system. The system consists of a face detector and object detector that uses Haar Cascades, a Convolutional Neural Network (CNN), and Histograms of Oriented Gradients (HOG) that predict the faces and objects like cars, clocks, and full body.
Using OpenCV and dlib inbuilt functions to recognize faces. The code uses Dlib frontal face detector to identify facial features. LBPH Face Recognizer is used to recognize differences between faces. LBPH (Local Binary Patterns Histogram) algorithm is used to identify faces. and dlib face recognition resnet model v1 is used to recognize differences between faces with higher accuracy than LBPH algorithm.
Implementing object tracker using KCF and CSRT trackers from OpenCV. Amongst all the tracking methods available KCF and CSRT are the most accurate considering all the pros and cons. KCF is very fast when it comes to processing the video while the CSRT is a bit slow but the tracking of the object is precise.
In this project, first, the landmarks of both faces are given by the user, so that from them we can find the external boundaries of the face. Be careful that the order of landmarks in both faces should be the same. Then save landmark points in a JSON file. In the second part, split the face into triangles using Delaunay Triangulation. split both the faces into triangles and then we swap the triangles in the correspondent region.
This project files requires Python 3 and the following Python libraries installed:
Following are some links to install OpenCV and dlib on mac, windows and linux: