GithubHelp home page GithubHelp logo

erichuang / crowdcount-cascaded-mtl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from svishwa/crowdcount-cascaded-mtl

0.0 1.0 1.0 19 KB

Single Image Crowd Counting (CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd Counting)

License: MIT License

MATLAB 17.43% Python 82.57%

crowdcount-cascaded-mtl's Introduction

CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd Counting (Single Image Crowd Counting)

This is implementation of the paper CNN-based Cascaded Multi-task Learning of High-level Prior and Density Estimation for Crowd Counting for single image crowd counting which is accepted at AVSS 2017

Installation

  1. Install pytorch

  2. Clone this repository

git clone https://github.com/svishwa/crowdcount-cascaded-mtl.git

We'll call the directory that you cloned crowdcount-cascaded-mtl ROOT

Data Setup

  1. Download ShanghaiTech Dataset

    Dropbox: https://www.dropbox.com/s/fipgjqxl7uj8hd5/ShanghaiTech.zip?dl=0

    Baidu Disk: http://pan.baidu.com/s/1nuAYslz

  2. Create Directory

mkdir ROOT/data/original/shanghaitech/  
  1. Save "part_A_final" under ROOT/data/original/shanghaitech/

  2. Save "part_B_final" under ROOT/data/original/shanghaitech/

  3. cd ROOT/data_preparation/

    run create_gt_test_set_shtech.m in matlab to create ground truth files for test data

  4. cd ROOT/data_preparation/

    run create_training_set_shtech.m in matlab to create training and validataion set along with ground truth files

Test

  1. Follow steps 1,2,3,4 and 5 from Data Setup

  2. Download pre-trained model files:

    [Shanghai Tech A]

    [Shanghai Tech B]

    Save the model files under ROOT/final_models

  3. Run test.py

    a. Set save_output = True to save output density maps

    b. Errors are saved in output directory

Training

  1. Follow steps 1,2,3,4 and 6 from Data Setup
  2. Run train.py

Training with TensorBoard

With the aid of Crayon, we can access the visualisation power of TensorBoard for any deep learning framework.

To use the TensorBoard, install Crayon (https://github.com/torrvision/crayon) and set use_tensorboard = True in ROOT/train.py.

Other notes

  1. During training, the best model is chosen using error on the validation set.

  2. 10% of the training set is set aside for validation. The validation set is chosen randomly.

  3. Following are the results on Shanghai Tech A and B dataset:

             |     |  MAE  |   MSE  |
             ------------------------
             | A   |  101  |   148  |
             ------------------------
             | B   |   17  |    29  |
    

    It may be noted that the results are slightly different from the paper. This is due to a few implementation differences as the earlier implementation was in torch-lua. Contact me if torch models (that were used for the paper) are required.

crowdcount-cascaded-mtl's People

Contributors

svishwa avatar

Watchers

 avatar

Forkers

omarryad

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.