Crowd counting on the ShanghaiTech dataset, using multi-column convolutional neural networks.
This is an unofficial implementation of CVPR 2016 paper "Single Image Crowd Counting via Multi Column Convolutional Neural Network". Note: Predictions can be made. The work on heatmap generation in under progress.
Download ShanghaiTech Dataset from:
Dropbox: https://www.dropbox.com/s/fipgjqxl7uj8hd5/ShanghaiTech.zip?dl=0
Baidu Disk: http://pan.baidu.com/s/1nuAYslz Create a folder: ROOT/data/original/shanghaitech/ Here ROOT is the folder conatining all files, it's the main folder. (Don't create a folder called ROOT!)
Save "part_A" under ROOT/data/original/shanghaitech/
Save "part_B" under ROOT/data/original/shanghaitech/
Got to ROOT/data_preparation/
There, run create_gt_test_set_shtech.m in matlab/octave to create ground truth files for test data.
Then go to ROOT/data_preparation/ again.
run create_training_set_shtech.m in matlab to create training and validataion set along with ground truth files.
Save the ground truth csv files in ROOT/data/ That completes data-setup!
Not recommended unless you have a great processor, or a GPU, because training takes a lot of time. Load the pre-trained model and test it on the test set instead.
For tensorflow: run from prompt: python3 train.py A(or B) Model is saved to modelA/ or modelB/.
For keras: run: python3 keras_train.py B model is saved to keras_modelB/