You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PSGCNet: A Pyramidal Scale and Global Context Guided Network for Dense Object Counting in Remote Sensing Image
The overal framework architecture
The visualization on RSOC
The visualziation on CARPK
The visualization on crowd counting datasets
The quantitative result on RSOC
The quantitative result on CARPK and PUBCR+
The quantitative result on DroneCrowd
The quantitative result on crowd counting dataset
Code
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.6
Train and Test
1、 Dowload Dataset
2、 Pre-Process Data (resize image and split train/validation)
python preprocess_dataset.py --origin_dir <directory of original data> --data_dir <directory of processed data>
3、 Train model (validate on single GTX Titan X)
python train.py --data_dir <directory of processed data> --save_dir <directory of log and model>
4、 Test Model
python test.py --data_dir <directory of processed data> --save_dir <directory of log and model>
The result is slightly influenced by the random seed, but fixing the random seed (have to set cuda_benchmark to False) will make training time extrodinary long, so sometimes you can get a slightly worse result than the reported result, but most of time you can get a better result than the reported one. If you find this code is useful, please give us a star and cite our paper, have fun.
5、 Training on ShanghaiTech Dataset
Change dataloader to crowd_sh.py
For shanghaitech a, you should set learning rate to 1e-6, and bg_ratio to 0.1
If you find the PSGCNet useful, please cite our paper. Thank you!
@article{gao2022psgcnet,
title={PSGCNet: A Pyramidal Scale and Global Context Guided Network for Dense Object Counting in Remote-Sensing Images},
author={Gao, Guangshuai and Liu, Qingjie and Hu, Zhenghui and Li, Lu and Wen, Qi and Wang, Yunhong},
journal={IEEE Transactions on Geoscience and Remote Sensing},
volume={60},
pages={1--12},
year={2022},
publisher={IEEE}
}
About
PSGCNet: A Pyramidal Scale and Global Context Guided Network for Dense Object Counting in Remote-Sensing Images