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.
- Download the checkpoint of LSC-CNN into 'checkpoints/' Huggingface
- Download NWPU-Crowd dataset from NWPU-Crowd Benchmark
- Modify the path of dataset in hat_config.py
-
Generating training data by train_hat.py
prepare_training_data(cfg.img_root, cfg.json_root)
-
Train the count decoder.
train_count_decoder(5, 120, resume=0)
Run the evaluation.py
evaluate_counting(cfg.img_root,cfg.json_root,0.2)
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