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
- Host: GitHub
- URL: https://github.com/karanjangid8656/face_landmark_detection
- Owner: KaranJangid8656
- License: mit
- Created: 2025-01-17T16:37:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-05T13:26:33.000Z (over 1 year ago)
- Last Synced: 2025-02-05T14:28:56.390Z (over 1 year ago)
- Topics: dlib, dlib-face-detection, dlib-face-recognition, opencv, opencv-python, problem-solving, python
- Language: Python
- Homepage: https://github.com/KaranJangid8656/face_landmark_detection
- Size: 71.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.