An unofficial implementation of CVPR2016 paper Single-Image Crowd Counting via Multi-Column Convolutional Neural Network
My source for the files train_preprocessing.m
, get_density_map_gaussian.m
and weight.h5
are from uestcchicken. This is the link to his github about the implementation of this paper too.
I wholeheartly thank him for his contribution. Without him(or her) this project wouldn't be complete.
We use Keras as an implementation ONLY
- Install Keras, Tensorflow.
pip3 install keras
pip3 install tensorflow
- Install Jupyter.
pip3 install jupyter
- Clone this repository.
git clone https://github.com/tann9949/vCanteen-crowd-estimator.git
- In
vCanteen.py
, line 141, delete argumentvideopath
. - Run this command on your terminal/command prompt
python3 vcanteen.py
- Add your video to
icanteen_video
directory. - In
vCanteen.py
, change thevideopath
variable (line 140) as your video. - Run this command on your terminal/command prompt
python3 vcanteen.py
- Launch jupyter notebook and open
Crowd Count MCNN_icanteen.ipynb
. - Change the
img_path
of every cell to be the PATH to your images. - Change the
name
of the loaded image (see the line withcv2.imread
). - Enjoy estimating the crowd.
- Launch
image_preprocessor/Head_Labeler.m
with Matlab. - Change
num_images
,img_path
andimg_name
to match with your dataset. - Run
Head_Labeler.m
- Mark the head on your images by clicking on the head (one point per head is enough).
- To exit, close the figure.
- To delete the latest label, press
backspace
. - To finish labeling, press
return
.
It is recommended to read the paper before try using this code to guarantee an understanding of the topics. Prerequisites include:
- Neural network.
- Convolutional Neural Network.
- Keras.
- Python Programming.
- Chompakorn Chaksangchaichot (5931229821)
- Peeramit Masana (5931316721)
- Akekamon Boonsith (5931393021)