An open API service indexing awesome lists of open source software.

https://github.com/karanjangid8656/face_landmark_detection

Real-time face landmark detection using a webcam
https://github.com/karanjangid8656/face_landmark_detection

dlib dlib-face-detection dlib-face-recognition opencv opencv-python problem-solving python

Last synced: 29 days ago
JSON representation

Real-time face landmark detection using a webcam

Awesome Lists containing this project

README

          

Face Landmark Detection

### Real-time face landmark detection using a webcam.

Overview

Face Landmark Detection is a computer vision project that uses the Dlib library to detect and visualize key facial landmarks on a live video feed. This project identifies 68 facial landmarks, including the eyes, nose, mouth, and jawline, and marks them on the user's face in real-time. The project leverages OpenCV for capturing the video feed and Dlib for detecting and predicting the facial landmarks.

Features

68 facial landmarks detected and visualized.
Face detection using Dlib's frontal face detector.
Landmark visualization with circles on the detected points.
Optional mirroring of the webcam feed.
Easy-to-use and light-weight.

Prerequisites

To run the project, you'll need:

- `opencv-python`
- `numpy`
- `dlib`

How It Works

- **Capture Video Feed**: The script uses OpenCV's `cv2.VideoCapture` to access the webcam.
- **Face Detection**: The Dlib's frontal face detector (`dlib.get_frontal_face_detector()`) is used to detect faces in each frame.
- **Landmark Prediction**: Once a face is detected, the `dlib.shape_predictor()` is used to predict the 68 facial landmarks.
- **Visualize Landmarks**: For each detected landmark, a small circle is drawn on the face to visualize the points.

Change Detection Quality: You can experiment with different face detection and landmark prediction models in Dlib.

Known Issues

The project may not work well under low-light conditions or poor camera quality.
Some landmarks might be inaccurate if the face is at an unusual angle.