Real-time facial landmark detection with OpenCV, Python, and dlib (Assignment Sample)

Опубликовано: 01 Октябрь 2024
на канале: ICT UoM
314
3

By Kirvansh Kallaram
BSc Computer Science Year 3
CVBPR S1 Facial Landmark RealTime
CSE 3093Y Assignment March 2021
In the program demo.py, we will detect facial landmarks in a video stream from the camera in real-time.
We used a shape predictor which is a dlib’s pre-trained facial landmark detector.
We capture the frame and we resize it and convert it to grayscale for image processing. The examine the frame whether is has a face-like structure in it using the dlib.get_frontal_face_detector() and if is has, we use the above mentioned shape predictor to predict facial landmarks in the frame, a dlib model identify all those landmarks as 68 coordinates points. Computer Vision application can identify a human face with these 68 points. For
manipulating and processing these locations of the points, Numpy library is used for handling these complex data and calculations. The points data consisting pixel coordinates are stored in a 68 by 2 array named shape. We used the circle() function to draw onto the points.
References:
https://www.pyimagesearch.com/2017/04...
https://www.csd.uoc.gr/~hy371/bibliog...
https://pdfs.semanticscholar.org/bac2...