Giter VIP home page Giter VIP logo

gcc-sfcn's Introduction

SFCN in "Learning from Synthetic Data for Crowd Counting in the Wild"

This is an official implementaion of the paper "SFCN+" in Learning from Synthetic Data for Crowd Counting in the Wild. More detialed information of the paper is shown in the project homepage.

Requirements

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

Data preparation

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

The pre-trained resSFCN on GCC and the processed QNRF dataset: [Link]

Training model

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

Testing pretrained model

  1. Download pretrained resSFCN on QNRF in this link (two versions: the results of CVPR and the screenshot in this repo).
  2. Run python test.py.

Expermental results

Quantitative results

Errors on test set:

Detialed infomation during the traning phase.

Note: the blue line is the result of using pre-trained GCC Dataset, and the red is the result of using pre-trained ImageNet.

Visualization results

Pre-trained ImageNet Pre-trained GCC
epoch 1,6 f1. t1.
epoch 11,16 f2. t2.
epoch 379,380 f3. t2.

Column 1: input image; Column 2: density map GT; Column 3: density map prediction.

Tips

In this code, the validation is directly on the test set. Strictly speaking, it should be evaluated on the val set (randomly selected from the training set, which is adopted in the paper). Here, for a comparable reproduction (namely fixed splitting sets), this code directly adopts the test set for validation, which causes that the results of this code are better than that of our paper (mae: 99 v.s. 102).

One More Thing

We reproduce some classic networks (MCNN, CSRNet, SANet, etc.) and some solid baseline networks (AlexNet, VGG, ResNet, etc.) on GCC dataset. Welcome to visit this link. It is under development, we will release it as soon as possible.

Citation

If you find this project useful for your research, please cite:

@inproceedings{wang2019learning,
  title={Learning from Synthetic Data for Crowd Counting in the Wild},
  author={Wang, Qi and Gao, Junyu and Lin, Wei and Yuan, Yuan},
  booktitle={Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages={8198--8207},
  year={2019}
}

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.