Download data_preprocess.py from datnguyentien204/FaceRecognition: direct link, hf CLI and curl.
- Browser
- Download file 348 Bytes
-
https://huggingface.co/datasets/datnguyentien204/FaceRecognition/resolve/main/data_preprocess.py
- Command line
-
hf download hf://datasets/datnguyentien204/FaceRecognition/data_preprocess.py
-
curl -L -o data_preprocess.py https://huggingface.co/datasets/datnguyentien204/FaceRecognition/resolve/main/data_preprocess.py
348 Bytes
| from preprocess import preprocesses | |
| input_datadir = './train_img' | |
| output_datadir = './aligned_img' | |
| obj=preprocesses(input_datadir, output_datadir) | |
| nrof_images_total, nrof_successfully_aligned=obj.collect_data() | |
| print('Total number of images: %d' % nrof_images_total) | |
| print('Number of successfully aligned images: %d' % nrof_successfully_aligned) |