Note: Thanks to Author for providing PyramidBox model and test script. The ogirinal git is here.
Here we explain how to process AI_Challenger dataset using PyramidBox model.
-
Download AI_Chellenger keypoint dataset using this script. Or you can download manually. Keep in mind that you need to register first in order to get access to the dataset.
-
Download PyramidBox Model. Authors provide pretrained model in Biadu. If you have trouble downloading here we provide alternative download link in Google Drive.
-
Now follow these steps to process AI_Challenger dataset.
git clone https://github.com/ghimiredhikura/PyramidBox.git
face_detection_wider_format.py
is the script to process AI_Challenger dataset. Default path of dataset and model weigts file are the current dir, i.e, ./PyramidBox
.
Once the dataset and model download are completed you can use command below to process dataset.
# usage example #
python2.7 face_detection_wider_format.py --data_dir=ai_challenger_keypoint_test_a_20180103 --out_dir=cropped --image_dir=keypoint_test_a_images_20180103 --json_file=keypoint_test_a_annotations_20180103.json --confidence=0.1
It will search face in each image and store the detection result in wider face format with detection score of each detection box. The detection results will be stored in ./annotations/
dir followed by dir with data subset name (ex. ./annotations/ai_challenger_keypoint_test_a_20180103/keypoint_test_a_images_20180103/
).
You can use this script to crop faces from AI_Challenger dataset. In some cases the head/face is not visible, therefore probably you need to filter out those corpped faces which do not include actual face.