-
Clone this repository.
-
Install requirements:
pip install -r requirements.txt
-
If input face images are in directory
example/input/dir
and output direcotryexample/output/dir
then 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
method
options:haar-cascade
andmtcnn
-
Supported
device
options:cpu
andcuda
.
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