This is the MXNet implementation for CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes in CVPR 2018. And we also provide the Caffe implementation in this repo. :-)
ShanghaiTech Dataset: Google Drive
Using the official model and testing ShanghaiTech Dataset by the code:
Mean Value: [92.8207477031, 95.2757037428, 104.877445883] by BGR order
Testing in this repo vs the report of paper
| MAE(Part_A) | MSE(Part_A) | MAE(Part_B) | MSE(Part_B) |
|---|---|---|---|
| 68.9 vs 68.2 | 116.1 vs 115.0 | 10.6 vs 10.6 | 16.0 vs 16.0 |
The author used Caffe to train the model.
I use the MXNet implementation to test so there is a little of precision error.
Using Caffe to test will match the result as the paper reported.
This is the model for test. The results should be similar to the results shown in the paper(slightly better or worse).
-
ShanghaiTech_Part_A: Google Drive
-
ShanghaiTech_Part_B: Google Drive
git clone https://github.com/wkcn/CSRNet-mx
git submodule update --init --recursivePlease install pycaffe for converting model Download the model to models directory.
python caffe2mx.py
data/
ShanghaiTech/
part_A_final/
part_B_final/
The prediction result will be saved in the file predict.txt.
- MXNet
python test.py
- Caffe
python test_caffe.py
python evaluate.py
@article{li2018csrnet,
title={CSRNet: Dilated convolutional neural networks for understanding the highly congested scenes},
author={Li, Yuhong and Zhang, Xiaofan and Chen, Deming},
journal={arXiv preprint arXiv:1802.10062},
year={2018}
}