Skip to content

Latest commit

 

History

History
105 lines (61 loc) · 2.38 KB

README.md

File metadata and controls

105 lines (61 loc) · 2.38 KB

SSAM_2BNet

Environment

  • Python 3.8
  • pytorch 1.10.2

Please run the follow line to install enviroment

pip install -r requirements.txt

How to try

Download dataset

ShanghaiTech (no official)

UCF_CC_50

UCF_QNRF

NWPU

JHU_CROWD++

Data preprocess

Run generate_density.py in data_preprocess to generate ground-truth density map and data_list

python generate_density.py --data_root 'data_root' --target_root 'target_root' --cls 'cls' # cls=SHH, NWPU, UCF_QNRF, UCF_CC_50, jhu++

Please put the image and ground-truth in the same folder

Data_root/
         -train/
               -IMG_1.h5
               -IMG_1.jpg
               -IMG_1.txt-test/
               -IMG_1.h5
               -IMG_1.jpg
               -IMG_1.txt
               ⋮
 ⋮

Pretrained model on ShanghaiTech Part A can downloade at here

"Here"

Backbone pretrained model

"VGG16_bn"

The backbone pretrained model please put in the backbone_pretrained folder

Training

python train.py --data_root 'data_root' --epochs 4000

Run testing

python test.py --data_root 'data_root' --weight_path 'checkpoint_path'

Quantitative comparison

Quantitative evaluation on four dataset. We report Mean Abosolute Error (MAE), Root Mean Square Error (RMSE). (Bold means the 1st best; Underline means the 2nd best).

Qualitative comparisons

  • Visualize

The generated density map comparison of our method and some other methods on ShanghaiTech PartA dataset. From left to right are input image, ground truth, MCNN, CSRnet, CAN, BL, DM-count, and Ours.

Ablation study

  • Ablation study

Ablation study of all modual we used with size 128x128 images on ShanghaiTech PartA dataset. We report Mean Abosolute Error (MAE), Root Mean Square Error (RMSE). (Bold means the 1st best; Underline means the 2nd best)