Official code for AAAI-24 paper:"A Fixed-Point Approach to Unified Prompt-Based Counting"
The motivation is to propose a unified framework for prompt-based counting, which is able to handle both box, point and text prompts.
We use Singularity to build the enviroment. Download our enviroment: excalibur.sif. If you'd like to create environement yourself, the following python packages are required:
pytorch == 1.9.0
torchvision == 0.10.0
timm == 0.4.12
termcolor
yacs
einops
- Download FSC-147;
- modify the following parameters in
data_fsc147/prepare_data.sh
:- Let
ori_root
be the local path of FSC-147. - Let
new_root
be the path that you want to save the modified FSC-147.
- Let
- execute the script:
cd data_fsc147
bash prepare_data.sh
- set the
data_path
inrun.sh
the same asnew_root
indata_fsc147/prepare_data.sh
- If you use our singularity:
singularity exec --bind --nv path_to_excalibur.sif ./run.sh
- If you create the environment yourself, just execute the script:
./run.sh
A training log is shown in md-files/training.log
, and corresponding checkpoint fxp.pth
is uploaded here.
@inproceedings{lin2024fixed,
title={A Fixed-Point Approach to Unified Prompt-Based Counting},
author={Lin, Wei and Chan, Antoni B},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={38},
number={4},
pages={3468--3476},
year={2024}
}