Home

Awesome

RGB-T Multi-Modal Crowd Counting Based on Transformer

The paper has been published by BMVC 2022.

The details are in https://bmvc2022.mpi-inf.mpg.de/0427.pdf

main

Code

链接:https://pan.baidu.com/s/1sYlFQXqGiY8ykOpehH_kkQ 提取码:jrux

Pretraining Parameter

链接:https://pan.baidu.com/s/1RmQEKXC_-nzdQo76tazspg 提取码:neqq

Results

RGB-T CC dataset

MethodsGAME(0)↓GAME(1)↓GAME(2)↓GAME(3)↓RMSE↓
CMCRL15.6119.9524.6932.8928.18
TAFNet12.3816.9821.8630.1922.45
MAT12.3516.2920.8129.0922.53
DEFNet11.9016.0820.1927.2721.09
Ours10.9014.8119.0226.1418.79

Note:

preprocess_RGBT.py convert .json files into .npy files.

predataset_RGBT_CC.py is used to change the size of input images.

If you have any question, please email liuzywen@ahu.edu.cn

Please cite:

@inproceedings{liu2022RGBT, 
  title={{RGB-T Multi-Modal Crowd Counting Based on Transformer}},  
  author={Zhengyi Liu and Wei Wu and Yacheng Tan and Guanghui Zhang},  
  booktitle={Procedings of British Machine Vision Conference},  
  pages={1--14},  
  year={2022} 
}

Install dependencies

torch >= 1.0 torchvision opencv numpy scipy, all the dependencies can be easily installed by pip or conda

This code was tested with python 3.8.

install MultiScaleDeformableAttention:

cd ./models/ops     
sh ./make.sh

Preprocessing

File predataset_RGBT_CC.py is used to process RGBT-CC datasets to obtain pictures of different sizes.

python predataset_RGBT_CC.py

Training

Edit this file for training our model.

training hyperparameters as:

--data-dir = ""  # train datasets path.
--save-dir = ""  # save model path.
--pretrained_model = ""  # pre-trained parameters
--max-epoch = 500
--val-epoch = 1
--val_start = 30
--batch-size = 16

bash train.sh

Testing

Edit this file for testing models. testing hyperparameters as :

--data-dir = ""  # test datasets path
--save-dir = ""  # saved model path
--model = ""  # best_model_XXXXX.pth
bash test.sh