- Code reproduction
- Original paper Link
- Presentate only the experiment on dataset ShanghaiTech Part A (loss: DM-Count)
- ShanghaiTech Part A
Code | MAE | MSE |
---|---|---|
PAPER | 54.8 | 86.6 |
This code | 54.20 | 88.97 |
Our code reaches this result with the standard hyperparameter set in code. Trained with batch-size=8 for around 1500 epoch(as said in the paper). Best validation at around epoch 606
- adopt code of DM-Count.
- link
- Download pretrained weights for
alt_gvt_large.pth
link. Move the file undermodel_weights
folder
Take a look at the arguments accepted by train.py
- update root "data-dir" in ./train.py.
- [new] Added wandb integration. If you want to log with wandb, set
--wandb 1
intrain.py
after having logged in to wandb (wandb login
in console) - launch with
python train.py
- python test_image_patch.py
- Due to crop training with size of 256x256, the validation image is divided into several patches with size of 256x256, and the overlapping area is averaged.
- Download the pretrained model from Baidu-Disk(提取码: se59) link
- python vis_densityMap.py
- save to ./vis/part_A_final
Require torch2trt
See torch_to_trt.py
See requirements.txt