An unofficial implementation of CSRNet for crowd counting in Keras-Tensorflow.
- Original_paper: CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes.
Dataset | MAE | RMSE | Sum of Frobenius Norm | MAPE | PSNR | SSIM |
---|---|---|---|---|---|---|
SHB | 8.31 | 14.36 | 5.26e-2 | 6.63% | 29.31 | 0.93 |
SHA | 67.98 | 103.24 | 8.38e-1 | 17.29% | 21.51 | 0.60 |
Weights can be downloaded in the release.
- ShanghaiTech dataset: dropbox or Baidu Disk.
-
Loss = MSE;
-
Optimizer = Adam(lr=1e-5);
-
Batch size: 1;
-
Data augmentation: Flip horizontally online randomly;
-
Weights: Got best weights of SHB in epoch 135, the best one of SHA in epoch 127, and here is the loss records:
- SHA:
- SHB:
-
Prediction example:
- Download dataset;
- Data generation: run the
generate_datasets.ipynb
. - Run the
main.ipynb
to train, test, analyze and evaluate the image quality.