official codes of CVPR paper `Adapting Lightweight Image-based Counting Models for Video Crowd Counting'
1, Our methods attribute the model continuous prediction ability, which supports the subsampling of the training dataset for efficiency and further preventing overfitting. This strategy is shown in the `strider' parameter. In the efficiency experiments, we use the whole training dataset for a fair comparison.
Download the datasets from official sites. Then go to Dataset/preprocessor.py and run the corresponding basic_washing
method. For UCSD, FDST, MALL, VENICE, DRONECROWD datasets, we strongly suggest to run the corresponding basic_washing
method, because it will complete all the processing. For VSCROWD dataset, please download it and organize it
as follows.
Dataset
├── VSCROWD
│ ├── train_data
| │ ├── train_001
| | │ ├── gt_points
| | │ │ ├── 000001.npy
| | │ │ ├── 000002.npy
| | │ │ └── ...
| | │ ├── 000001.jpg
| | │ ├── 000002.jpg
| | │ └── ...
| | │
| | ├── train_002
| | ├── train_003
| | └── ...
| └── test_data
| ├── test_001
| │ ├── gt_points
| │ │ ├── 000001.npy
| │ │ ├── 000002.npy
| │ │ └── ...
| │ ├── 000001.jpg
| │ ├── 000002.jpg
| │ └── ...
| │
| ├── test_002
| ├── test_003
| └── ...
├── FDST
├── UCSD
├── MALL
└── ...
To train the model in the paper, run this command:
python train.py <arg1>
arg1: specify the dataset name--UCSD, FDST, VENICE, MALL, DRONECROWD, or VSCROWD.
e.g.
python train.py UCSD
To evaluate my model, run:
python test.py <arg1> <arg2>
arg1: specify the dataset name--UCSD, FDST, VENICE, MALL, DRONECROWD, or VSCROWD.
arg2: the relative path of the pretrained model.
e.g.
python test.py UCSD Model/model_pretrain/ucsd.tar
You can download my pretrained models from https://github.com/wbshu/SR/releases.
If the codes help you, please cite
@inproceedings{shu2026adapting,
title={Adapting Lightweight Image-based Counting Models for Video Crowd Counting},
author={Shu, Weibo and Chan, Antoni B},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={35227--35237},
year={2026}
}