official code for BMVC-2022 paper "Scale-Prior Deformable Convolution for Exemplar-Guided Class-Agnostic Counting"
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
mmcv == 1.3.13
timm == 0.4.12
termcolor
yacs
einops
- Download FSC-147
- modify the
root
in line 12 ofdatasets/gendata384x576.py
to the local path of FSC-147. - running the file
datasets/gendata384x576.py
- modify the
datapath
inrun.sh
to the local path of FSC-147 dataset - using singularity:
singularity exec --bind --nv path_to_excalibur.sif ./run.sh
- using your own environment:
./run.sh
A training log is shown in md-files/training.log
, and corresponding checkpoint is uploaded here.
A demo is presented in demo.ipynb
. You can let config.resume
in it be the path to the checkpoint and know about how to run our model.
@inproceedings{Lin_2022_BMVC,
author = {Wei Lin and Kunlin Yang and Xinzhu Ma and Junyu Gao and Lingbo Liu and Shinan Liu and Jun Hou and Shuai Yi and Antoni Chan},
title = {Scale-Prior Deformable Convolution for Exemplar-Guided Class-Agnostic Counting},
booktitle = {33rd British Machine Vision Conference 2022, {BMVC} 2022, London, UK, November 21-24, 2022},
publisher = {{BMVA} Press},
year = {2022},
url = {https://bmvc2022.mpi-inf.mpg.de/0313.pdf}
}