This is a PyTorch Lightning implementation of CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes in CVPR 2018 which is one of the most popular crowd counting methods. The original implementation is here.
ShanghaiTech Dataset: Google Drive
We strongly recommend Anaconda as the environment.
Python: 3.8.13
PyTorch: 1.13.1
CUDA: 11.7
An example of how to generate the density maps can be found in the density_map_generation.py file.
Run python train.py to start training process.
python test.py --model [path to model] To be added soon.
If you find this implementation useful, please give stars and cite the original paper:
@inproceedings{li2018csrnet,
title={CSRNet: Dilated convolutional neural networks for understanding the highly congested scenes},
author={Li, Yuhong and Zhang, Xiaofan and Chen, Deming},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
pages={1091--1100},
year={2018}
}
Please cite the Shanghai datasets and other works if you use them.
@inproceedings{zhang2016single,
title={Single-image crowd counting via multi-column convolutional neural network},
author={Zhang, Yingying and Zhou, Desen and Chen, Siqin and Gao, Shenghua and Ma, Yi},
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
pages={589--597},
year={2016}
}