-
Clone this repository.
-
Install requirements:
pip install -r requirements.txt -
If input face images are in directory
example/input/dirand output direcotryexample/output/dirthen run the following command which will preserve input directory structure for further tasks.python crop_eye_pair.py --input_dir 'example/input/dir' --output_dir 'example/output/dir' --method 'mtcnn' --device 'cuda' -
Supported
methodoptions:haar-cascadeandmtcnn -
Supported
deviceoptions:cpuandcuda.
Notes: Setting device to cuda has no effect while using haar-cascade method.
- MTCNN code borrowed from https://github.com/khrlimam/mtcnn-pytorch
- HAAR Cascade code inspired from https://github.com/zekeriyafince/EyePair