The images in the above gif are obtained from running the model on the validation set of the Wider Faces dataset.
A fast multi scale multi face detector based on SSD 512 model. The model has been trained on the Wider Faces Dataset.
The best performing versions of the model have attained Average Precision of 72% on the easy validation set and 63% on the medium validation set.
Download the model weights from Google drive links for weights and place them in the ssd_512 folder.
Creating a new conda virtual enivronment for the project is recommended.
conda create -n yourenvname python=3.5
If you have cuda compatable gpu with cuda version==9.0 or 9.1 install packages from requirements-gpu.txt.
conda activate yourenvname
pip install -r requirements-gpu.txt
Else install packages from requirements.txt to run the model on cpu.
conda activate yourenvname
pip install -r requirements.txt
To run the face detector on webcam's input stream : live_demo.py.
python live_demo.py
To run the detector on a video of choice, provide path to the video file as command line argument.
python demo.py ./path/to/video/file.avi
ipython notebooks for training various model versions will be uploaded soon. Currently the plain SSD_512 version of the model has been uploaded.
The keras code for SSD and its utilities have been based on GitHub - pierluigiferrari/ssd_keras: A Keras port of Single Shot MultiBox Detector.