Code Monkey home page Code Monkey logo

pcc-net's Introduction

This is an official implementaion of the paper "PCC Net" (PCC Net: Perspective Crowd Counting via Spatial Convolutional Network, completed in February 2018, accepted by TCSVT in May 2019).

PCC Net.

In the paper, the experiments are conducted on the three populuar datasets: Shanghai Tech, UCF_CC_50 and WorldExpo'10. To be specific, Shanghai Tech Part B contains crowd images with the same resolution. For easier data prepareation, we only release the pre-trained model on ShanghaiTech Part B dataset in this repo.

Requirements

  • Python 2.7
  • Pytorch 0.2.0
  • TensorboardX (pip)
  • torchvision (pip)
  • easydict (pip)
  • pandas (pip)

Installation

cd ./misc/roi_pooling
python build.py

Data preparation

  1. Download the original ShanghaiTech Dataset [Link: Dropbox / BaiduNetdisk]
  2. Resize the images and the locations of key points.
  3. Generate the density maps by using the code.
  4. Generate the segmentation maps.

We also provide the processed Part B dataset for training. [Link]

Training model

  1. Run the train_lr.py: python train_lr.py.
  2. See the training outputs: Tensorboard --logdir=exp --port=6006.

In the experiments, training and tesing 800 epoches take 21 hours on GTX 1080Ti.

Expermental results

Quantitative results

We show the Tensorboard visualization results as below: Detialed infomation during the traning phase. The mae and mse are the results on test set. Others are triaining loss.

Visualization results

Visualization results on the test set as below: Visualization results on the test set. Column 1: input image; Column 2: density map GT; Column 3: density map prediction; Column 4: segmentation map GT; Column 5: segmentation map prediction.

Tips

In this code, the validation is directly on the test set. Strictly speaking, it is evaluated on val set (randomly selected from training set), which is adoped in the paper. Here, for a comparble reproduction (namely fixed splitting sets), this code directly adopt the test set for validation, which causes that the results of this code are better than that of our paper.

Citation

If you use the code, please cite the following paper:

@article{gao2019perspective,
  title={PCC Net: Perspective Crowd Counting via Spatial Convolutional Network},
  author={Gao, Junyu and Wang, Qi and Li, Xuelong},
  journal={arXiv preprint arXiv:1905.10085},
  year={2019}
}

pcc-net's People

Contributors

gjy3035 avatar

Watchers

 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.