2. Please follow the instructions here to install both PyTorch and TorchVision dependencies.
3. Installing both PyTorch and TorchVision with CUDA support is strongly recommended. 1. Download the 'vit_b' pre-trained model of SAM and save it to the folder 'pretrain'.
2. Download the FSC-147 and CARPK datasets and save them to the folder 'dataset'
3. Run
python main-fsc147.py --test-split='test' --prompt-type='box' --device='cuda:0'
or
python main-carpk.py --test-split='test' --prompt-type='box' --device='cuda:0'
or Apple Silicon M Series
python main-fsc147.py --test-split='test' --prompt-type='box' --device='mps'
@inproceedings{Shi2023promptcounting,
title={Training-free Object Counting with Prompts},
author={Zenglin Shi, Ying Sun, Mengmi Zhang},
booktitle={WACV},
year={2024}
}