GithubHelp home page GithubHelp logo

zhiqic / crowdcount-stackpool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siyuhuang/crowdcount-stackpool

1.0 0.0 0.0 163 KB

Stacked Pooling for Boosting Scale Invariance of Crowd Counting, ICASSP 2020

License: MIT License

Python 83.54% MATLAB 16.46%

crowdcount-stackpool's Introduction

Stacked Pooling for Boosting Scale Invariance of Crowd Counting

PyTorch implementation of "Stacked Pooling for Boosting Scale Invariance of Crowd Counting" [ICASSP 2020].

@inproceedings{huang2020stacked,
  title={Stacked Pooling for Boosting Scale Invariance of Crowd Counting},
  author={Huang, Siyu and Li, Xi and Cheng, Zhi-Qi and Zhang, Zhongfei and Hauptmann, Alexander},
  booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing},
  pages={2578--2582},
  year={2020},
}

This code is implemented based on https://github.com/svishwa/crowdcount-mcnn

ShanghaiTech-A ShanghaiTech-B WorldExpo'10
Vanilla Pooling 97.63 21.17 14.74
Stacked Pooling 93.98 18.73 12.92

Dependency

  1. Python 2.7
  2. PyTorch 0.4.0

Data Setup

  1. Download ShanghaiTech Dataset from
    Dropbox: https://www.dropbox.com/s/fipgjqxl7uj8hd5/ShanghaiTech.zip?dl=0
    Baidu Disk: http://pan.baidu.com/s/1nuAYslz
  2. Create Directory mkdir ./data/original/shanghaitech/
  3. Save "part_A_final" under ./data/original/shanghaitech/
    Save "part_B_final" under ./data/original/shanghaitech/
  4. cd ./data_preparation/
    Run create_gt_test_set_shtech.m in matlab to create ground truth files for test data
    Run create_training_set_shtech.m in matlab to create training and validataion set along with ground truth files

Train

  1. To train Deep Net+vanilla pooling on ShanghaiTechA, edit configurations in train.py

    pool = pools[0] 

    To train Deep Net+stacked pooling on ShanghaiTechA, edit configurations in train.py

    pool = pools[1] 
  2. Run python train.py respectively to start training

Test

  1. Follow step 1 of Train to edit corresponding pool in test.py
  2. Edit model_path in test.py using the best checkpoint on validation set (output by training process)
  3. Run python test.py respectively to compare them!

Note

  1. To try pooling methods (vanilla pooling, stacked pooling, and multi-kernel pooling) described in our paper:

    Edit pool in train.py and test.py

  2. To evaluate on datasets (ShanghaiTechA, ShanghaiTechB) or backbone models (Base Net, Wide-Net, Deep-Net) described in our paper:

    Edit dataset_name or model in train.py and test.py

crowdcount-stackpool's People

Contributors

siyuhuang avatar

Stargazers

Zhi-Qi Cheng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.