Skip to content

Latest commit

 

History

History

Hat_LSC-CNN

Crowd Hat + Detection-Based Method LSC-CNN

Crowd Hat module is a plug-and-play crowd-analysis enhancement network proposed in our paper Boosting Detection in Crowd Analysis via Underutilized Output Features, CVPR 2023

Here is the pytorch implementation of Crowd Hat + LSC-CNN, which is a localization-based method proposed in the paper.

Preparation

  1. Download the checkpoint of LSC-CNN into 'checkpoints/' Huggingface
  2. Download NWPU-Crowd dataset from NWPU-Crowd Benchmark
  3. Modify the path of dataset in hat_config.py

Train

  1. Generating training data by train_hat.py

    prepare_training_data(cfg.img_root, cfg.json_root)

  2. Train the count decoder.

    train_count_decoder(5, 120, resume=0)

Evaluate

Run the evaluation.py

evaluate_counting(cfg.img_root,cfg.json_root,0.2)

Test

Test on NWPU-Crowd dataset by evaluation.py

Crowd Counting test_nwpu_counting(cfg.nwpu_test)

Crowd Localization test_nwpu_localization(cfg.nwpu_test)

The result will be save to the result root in hat_config.py You can directly submit the result to NWPU-Crowd Counting Benchmark