Awesome
ECCV2020: Adaptive Mixture Regression Network with Local Counting Map for Crowd Counting
Introduction
In this work, we introduce a new learning target named local counting map, and show its feasibility and advantages in local counting regression. Meanwhile, we propose an adaptive mixture regression framework in a coarse-to-fine manner. It reports marked improvements in counting accuracy and the stability of the training phase, and achieves the start-of-the-art performances on several author- itative datasets. For more details, please refer to our arXiv paper.
Framework
<img src="doc/framework.jpg" width=800>Demo
<img src="doc/demo.jpg" width=800>Getting Started
-
Prerequisites
- Python >= 3.5
- Pytorch >= 1.0.1
- other libs in
requirements.txt
, runpip install -r requirements.txt
.
-
Data Preparation
-
Pretrained Model (Only for Training)
- Some Counting Networks (such as VGG, CSRNet and so on) adopt the pre-trained models on ImageNet.
Download
vgg16-397923af.pth
fromtorchvision.models
. - Place the pre-trained model to
./models/Pretrain_model/
. - vgg16-397923af.pth : download link
- Some Counting Networks (such as VGG, CSRNet and so on) adopt the pre-trained models on ImageNet.
Download
-
Folder Tree
+-- source_code | +-- datasets | +-- SHHA | +-- ...... | +-- misc | +-- models | +-- Prerain_Model | +-- SCC_Model | +-- ...... | +-- ProcessedData | +-- shanghaitech_part_A | +-- ......
Models
QNRF-model (MAE/MSE: 86.6/152.1):
Google Drive: download link, Baidu Yun: download link (key: pe2r)
Demo Testing
- put test images in
./demo_image
. - run
python demo.py
. - results are saved at
./demo_image/result
.
Dataset Testing
- set the parameters (such as MODEL_PATH) in
test_config.py
. - run
python test.py
.