The dataset can be constructed followed by Bayesian Loss.
The pretrained model can be downloaded from GoogleDrive.
python test.py --data-dir PATH_TO_DATASET --save-dir PATH_TO_CHECKPOINT
python train.py --data-dir PATH_TO_DATASET --save-dir PATH_TO_CHECKPOINT
If you use our code or models in your research, please cite with:
@InProceedings{Wan_2021_CVPR,
author = {Wan, Jia and Liu, Ziquan and Chan, Antoni B.},
title = {A Generalized Loss Function for Crowd Counting and Localization},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2021},
pages = {1974-1983}
}
We use GeomLoss package to compute transport matrix. Thanks for the authors for providing this fantastic tool. The code is slightly modified to adapt to our framework.