Using OpenCV's inbuilt model for Face Detection.
OpenCV provides a very accurate inbuilt face detection model. In this project, I've used that model and created my own face detection project.
- The script to detect faces (face_detector.py) from images is inside the image folder. The image must also be placed inside this folder with the name image.png
- The script to detect faces (face_detector.py) in video is inside the video folder
- The information about the model is present inside model_data folder
- Pipfile, Pipfile.lock and requirements.txt are useful for setting up the environment.
- Readme.md includes project's documentation
You can setup using either of the two methods below.
- Clone the project to your local system
- Navigate inside the project directory on your local system inside the terminal
- Install all dependencies using
pipenv install --ignore-pipfile
- Start environment with
pipenv shell
- Clone the project to your local system
- Navigate inside the project directory on your local system inside the terminal
- Install all dependencies using
pip3 install -r requirements.txt
- Place the image in the folder image with the name
image.png
- Run the face_detector.py inside image folder using
python image/face_detector.py
- Run the face_detector.py inside video folder using
python video/face_detector.py