Skip to content

NajmeHabibi/real-time-face-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-time face landmarks detection using face-alignment library and opencv

In this Project we used face-alignment library and opencv to detect face landmarks on a realtime/offline video. One can use either camera (realtime) or an input video (offline) to do the inference.

ezgif com-gif-maker (1)

How to run

Instructions to run in linux bash:

  • Having the environment ready:
    • Using conda
      • conda create -n rtfd_env python=3.9
      • conda activate rtfd_env
    • Using pip
      • virtualenv -p python3.9 rtfd_env
      • source rtfd_env/bin/activate
  • Install dependencies:
    • Using conda
      • conda install pytorch torchvision cudatoolkit=11.3 -c pytorch (See pytorch installation guide)
      • conda install -c 1adrianb face_alignment (see face-alignment Github repo)
    • Using pip
      • pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
      • pip install face_alignment
  • Run:
    • Inference from camera: python main.py
    • Inference from an input video: python main.py ./input/v1.MP4

(Alternatively, one can use run.sh as a stand-alone script to do the above)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published