Using OpenCV Face Detection Neural Network to separate faces from list of images.
This project uses OpenCV's Face Detecttion Neural Network to detect faces in images and perform two tasks:
- Create images with rectange around faces using data_generator.py and store them in the folder updated_images
- Extract faces from a set of images using face_extractor.py and store them in the folder faces This would make labelling/extarcting faces very easy and could be used for further analysis.
- Open the terminal
- Clone the repository to your local machine
- Navigate inside the folder
- Install all dependencies using
pipenv install --ignore-pipfile
- Activate environment using
pipenv shell
- Open the terminal
- Clone the repository to your local machine
- Navigate inside the folder
- Install all dependencies using
pipenv install -r requirements.txt
- Create a folder with the name images
- Put all the images inside the folder images
- In the terminal, use the command
python data_generator.py
to generate the images - The generated images will be in the folder updated_images
- Create a folder with the name images
- Put all the images inside the folder images
- In the terminal, use the command
python face_extractor.py
to grab and export faces - The faces will be in the folder faces