Code for FCHD - A fast and accurate head detector
Switch branches/tags
Nothing to show
Clone or download
Aditya Vora
Latest commit 26176e6 Oct 6, 2018
Failed to load latest commit information.
data First commit Sep 23, 2018
src First commit Sep 23, 2018
LICENSE Create License Sep 27, 2018 Update Sep 27, 2018 hollywood dataset conversion script Oct 5, 2018 First commit Sep 23, 2018
precision_recall.png Second commit Sep 23, 2018 First commit Sep 23, 2018 First commit Sep 23, 2018


Code for FCHD - A fast and accurate head detector

This is the code for FCHD - A Fast and accurate head detector. See the paper for details and video for demo.


  • The code is tested on Ubuntu 16.04.

  • install PyTorch >=0.4 with GPU (code are GPU-only), refer to official website

  • install cupy, you can install via pip install cupy-cuda80 or(cupy-cuda90,cupy-cuda91, etc).

  • install visdom for visualization, refer to their github page


  1. Install Pytorch

  2. Clone this repository

git clone
  1. Build cython code for speed:
cd src/nms/
python build_ext --inplace


  1. Download the caffe pre-trained VGG16 from the following link. Store this pre-trained model in data/pretrained_model folder.

  2. Download the BRAINWASH dataset from the official website. Unzip it and store the dataset in the data/ folder.

  3. Make appropriate settings in src/ file regarding the updated paths.

  4. Start visdom server for visualization:

python -m visdom.server
  1. Run the following command to train the model: python


  1. Download the best performing model from the following link.

  2. Store the head detection model in checkpoints/ folder.

  3. Run the following python command from the root folder.

python --img_path <test_image_name> --model_path <model_path>


Method AP
Overfeat - AlexNet [1] 0.62
ReInspect, Lfix [1] 0.60
ReInspect, Lfirstk [1] 0.63
ReInspect, Lhungarian [1] 0.78
Ours 0.70


  • Runs at 5fps on NVidia Quadro M1000M GPU with 512 CUDA cores.


This work builds on many of the excellent works:


[1] Stewart, Russell, Mykhaylo Andriluka, and Andrew Y. Ng. "End-to-end people detection in crowded scenes." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.