This repository contains the original pytorch code for our paper "Discrete-Constrained Regression for Local Counting Models" in ECCV 2022.
conda env create -f requirements.yaml
conda activate dcreg
Raw JHU dataset could be obtained from the link.
Run jhu_main_final.m in Matlab.
--> jhu_crowd_v2.0 (raw dataset)
-->data
-->JHU_resize (processed dataset)
-->Models
--> JHU
--> best_epoch.pth
sh train.sh
Download trained models from the link and put the file in "Models/JHU".
sh test.sh
You will get MAE 64.361 and MSE 281.078.
A sample of synthesized dataset could be accessed from the link. More sythesized cell image could be generated with the code in the "generate_simulated_dataset.zip" file.
If you find this work or code useful for your research, please cite:
@inproceedings{xhp2022dcreg,
title={Discrete-Constrained Regression for Local Counting Models},
author={Xiong, Haipeng and Yao, Angela},
booktitle={European Conference on Computer Vision (ECCV)},
year={2022},
pages = {XXXX-XXXX}
}