All Projects → gjy3035 → NWPU-Crowd-Sample-Code

gjy3035 / NWPU-Crowd-Sample-Code

Licence: MIT license
The sample code for a large-scale crowd counting dataset, NWPU-Crowd.

Programming Languages

python
139335 projects - #7 most used programming language
matlab
3953 projects

Projects that are alternatives of or similar to NWPU-Crowd-Sample-Code

IIM
PyTorch implementations of the paper: "Learning Independent Instance Maps for Crowd Localization"
Stars: ✭ 94 (-32.86%)
Mutual labels:  crowd-counting, crowd-analysis
CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (-37.86%)
Mutual labels:  crowd-counting, crowd-analysis
Awesome Crowd Counting
Awesome Crowd Counting
Stars: ✭ 1,720 (+1128.57%)
Mutual labels:  crowd-counting, crowd-analysis
PCC-Net
PCC Net: Perspective Crowd Counting via Spatial Convolutional Network
Stars: ✭ 63 (-55%)
Mutual labels:  crowd-counting, crowd-analysis
keras-mcnn
keras实现的人群密度检测网络"Single Image Crowd Counting via Multi Column Convolutional Neural Network",欢迎试用、关注并反馈问题...
Stars: ✭ 23 (-83.57%)
Mutual labels:  crowd-counting, crowd-analysis
S-DCNet
Unofficial Pytorch implementation of S-DCNet and SS-DCNet
Stars: ✭ 17 (-87.86%)
Mutual labels:  crowd-counting, crowd-analysis
MARUNet
Multi-level Attention Refined UNet for crowd counting
Stars: ✭ 30 (-78.57%)
Mutual labels:  crowd-counting
Smart-City-Sample
The smart city reference pipeline shows how to integrate various media building blocks, with analytics powered by the OpenVINO™ Toolkit, for traffic or stadium sensing, analytics and management tasks.
Stars: ✭ 141 (+0.71%)
Mutual labels:  crowd-counting
crowdsource-video-experiments-on-android
Crowdsourcing video experiments (such as collaborative benchmarking and optimization of DNN algorithms) using Collective Knowledge Framework across diverse Android devices provided by volunteers. Results are continuously aggregated in the open repository:
Stars: ✭ 29 (-79.29%)
Mutual labels:  crowd-benchmarking
ctuning-programs
Collective Knowledge extension with unified and customizable benchmarks (with extensible JSON meta information) to be easily integrated with customizable and portable Collective Knowledge workflows. You can easily compile and run these benchmarks using different compilers, environments, hardware and OS (Linux, MacOS, Windows, Android). More info:
Stars: ✭ 41 (-70.71%)
Mutual labels:  crowd-benchmarking
Dense-Scale-Network-for-Crowd-Counting
An unofficial implement of paper "Dense Scale Network for Crowd Counting", link: https://arxiv.org/abs/1906.09707
Stars: ✭ 25 (-82.14%)
Mutual labels:  crowd-counting
pytorch-ACSCP
Unofficial implementation of "Crowd Counting via Adversarial Cross-Scale Consistency Pursuit" with pytorch - CVPR 2018
Stars: ✭ 18 (-87.14%)
Mutual labels:  crowd-counting
ACSCP cGAN
Code implementation for paper that "ACSCS: Crowd Counting via Adversarial Cross-Scale Consistency Pursuit"; This is method of Crowd counting by conditional generation adversarial networks
Stars: ✭ 36 (-74.29%)
Mutual labels:  crowd-counting
Variations-of-SFANet-for-Crowd-Counting
The official implementation of "Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting"
Stars: ✭ 78 (-44.29%)
Mutual labels:  crowd-counting
PyramidScaleNetwork
To the best of our knowledge, this is the first work to explicitly address feature similarity issue in multi-column design. Extensive experiments on four challenging benchmarks (ShanghaiTech, UCF_CC_50, UCF-QNRF, and Mall) demonstrate the effectiveness of the proposed innovations as well as the superior performance over the state-of-the-art. Mor…
Stars: ✭ 17 (-87.86%)
Mutual labels:  crowd-counting
ailia-models
The collection of pre-trained, state-of-the-art AI models for ailia SDK
Stars: ✭ 1,102 (+687.14%)
Mutual labels:  crowd-counting
crowd-counting
Image Crowd Counting Using Convolutional Neural Network and Markov Random Field
Stars: ✭ 32 (-77.14%)
Mutual labels:  crowd-counting
W-Net-Keras
An unofficial implementation of W-Net for crowd counting.
Stars: ✭ 20 (-85.71%)
Mutual labels:  crowd-counting
Crowd-Counting-with-MCNNs
Crowd counting on the ShanghaiTech dataset, using multi-column convolutional neural networks.
Stars: ✭ 23 (-83.57%)
Mutual labels:  crowd-counting
CSRNet-keras
Implementation of the CSRNet paper (CVPR 18) in keras-tensorflow
Stars: ✭ 107 (-23.57%)
Mutual labels:  crowd-counting

NWPU-Crowd Sample Code


This repo is the official implementation of paper: NWPU-Crowd: A Large-Scale Benchmark for Crowd Counting. The code is developed based on C^3 Framework.

Compared with the original C^3 Framework,

  • the python3.x's new features are utilized;
  • the density map is generated online by a conv layer for saving io time on the disk;
  • improve the visualization in the Tensorboard.

These features will be merged into C^3 Framework as soon as possible.

Getting Started

Preparation

  • Prerequisites

    • Python 3.x
    • Pytorch 1.x: http://pytorch.org .
    • other libs in requirements.txt, run pip install -r requirements.txt.
  • Installation

    • Clone this repo:
      git clone https://github.com/gjy3035/NWPU-Crowd-Sample-Code.git
      
  • Data Preparation

    • Download NWPU-Crowd dataset from OneDrive1, OneDrive2 or BaiduNetDisk.
    • Unzip *zip files in turns and place images_part* into a folder. Finally, the folder tree is below:
      -- NWPU-Crowd
          |-- images
          |   |-- 0001.jpg
          |   |-- 0002.jpg
          |   |-- ...
          |   |-- 5109.jpg
          |-- jsons
          |   |-- 0001.json
          |   |-- 0002.json
          |   |-- ...
          |   |-- 3609.json
          |-- mats
          |   |-- 0001.mat
          |   |-- 0002.mat
          |   |-- ...
          |   |-- 3609.mat
          |-- train.txt
          |-- val.txt
          |-- test.txt
          |-- readme.md
    
    • Run ./datasets/prepare_NWPU.m using Matlab.
    • Modify __C_NWPU.DATA_PATH in ./datasets/setting/NWPU.py with the path of your processed data.

Training

  • Set the parameters in config.py and ./datasets/setting/NWPU.py (if you want to reproduce our results, you are recommended to use our parameters in ./saved_exp_para).
  • run python train.py.
  • run tensorboard --logdir=exp --port=6006.

Testing

We only provide an example to forward the model on the test set. You may need to modify it to test your models.

  • Modify some key parameters in test.py:
    • Line 32: LOG_PARA, the same as __C_NWPU.LOG_PARA in ./datasets/setting/NWPU.py.
    • Line 34: dataRoot, the same as __C_NWPU.DATA_PATH in ./datasets/setting/NWPU.py.
    • Line 36: model_path.
    • Line 48: GPU Id and Model Name.
  • Run python test.py.

Pre-trained Models

We provide the pre-trained models in this link, which is a temporary share point of OneDrive. We will provide a permanent website ASAP.

Performance on the validation set

For an intuitive comparison, the visualization results of these methods are provided at this link. The overall results on val set:

Method MAE MSE PSNR SSIM
MCNN [1] 218.53 700.61 28.558 0.875
C3F-VGG [2] 105.79 504.39 29.977 0.918
CSRNet [3] 104.89 433.48 29.901 0.883
CANNet [4] 93.58 489.90 30.428 0.870
SCAR [5] 81.57 397.92 30.356 0.920
SFCN+ [6] 90.65 487.17 30.518 0.933

About the leaderboard on the test set, please visit Crowd benchmark.

References

  1. Single-Image Crowd Counting via Multi-Column Convolutional Neural Network, CPVR, 2016.
  2. C^3 Framework: An Open-source PyTorch Code for Crowd Counting, arXiv, 2019.
  3. CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes, CVPR, 2018.
  4. Context-Aware Crowd Counting, CVPR, 2019.
  5. SCAR: Spatial-/Channel-wise Attention Regression Networks for Crowd Counting, Neurocomputing, 2019.
  6. Learning from Synthetic Data for Crowd Counting in the Wild, CVPR, 2019.

Evaluation Scheme

The Evaluation Python Code of the crowdbenchmark.com is shown in ./misc/evaluation_code.py, which is similar to our validation code in trainer.py.

Citation

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

@article{gao2020nwpu,
  title={NWPU-Crowd: A Large-Scale Benchmark for Crowd Counting and Localization},
  author={Wang, Qi and Gao, Junyu and Lin, Wei and Li, Xuelong},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  doi={10.1109/TPAMI.2020.3013269},
  year={2020}
}

Our code borrows a lot from the C^3 Framework, you may cite:

@article{gao2019c,
  title={C$^3$ Framework: An Open-source PyTorch Code for Crowd Counting},
  author={Gao, Junyu and Lin, Wei and Zhao, Bin and Wang, Dong and Gao, Chenyu and Wen, Jun},
  journal={arXiv preprint arXiv:1907.02724},
  year={2019}
}

If you use crowd counting models in this repo (MCNN, C3F-VGG, CSRNet, CANNet, SCAR, and SFCN+), please cite them.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].