Skip to content

Anandukc/Face_detection_retina_face

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RetinaFace Face Detection and Landmark Recognition

This project demonstrates how to use the RetinaFace library for face detection and facial landmark recognition in images. RetinaFace is a deep learning-based face detector that can accurately locate faces and key facial landmarks (such as eyes, nose, and mouth corners) in images. The script highlights detected faces and their landmarks on the input image.

Features

  • Detects all faces in an image
  • Identifies facial landmarks: left eye, right eye, nose, mouth left, and mouth right
  • Draws bounding boxes and landmark points on the image

Setup Instructions

1. Create and Activate a Virtual Environment

On Windows

python -m venv venv
.\venv\Scripts\activate

On Ubuntu/Linux

python3 -m venv venv
source venv/bin/activate

2. Install Dependencies

Install RetinaFace and OpenCV:

pip install retina-face opencv-python

3. Usage

  1. Place your input image in the project directory and update the img_path variable in retina_face.py with the image filename.
  2. Run the script:
python retina_face.py

The script will display the image with detected faces and facial landmarks highlighted.

Output Example

Below is an example of the output result:

Output Result


References:

About

Face detection using retina face

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages