• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

gjy3035/NWPU-Crowd-Sample-Code-for-Localization: Crowd Localization

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gjy3035/NWPU-Crowd-Sample-Code-for-Localization

开源软件地址(OpenSource Url):

https://github.com/gjy3035/NWPU-Crowd-Sample-Code-for-Localization

开源编程语言(OpenSource Language):

Python 93.5%

开源软件介绍(OpenSource Introduction):

NWPU-Crowd-Sample-Code-for-Localization


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

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-for-Localization.git
      
  • Data Preparation

    • Download NWPU-Crowd dataset from this link.
    • 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.
  • 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 35: dataRoot, the same as __C_NWPU.DATA_PATH in ./datasets/setting/NWPU.py.
    • Line 36: ori_data, the original data path.
    • Line 37: model_path.
    • Line 49: GPU Id and Model Name.
  • Run python test.py.

Evaluation and Visualization

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

  • cd eval.
  • python test.py.
  • python vis4val.py.

Pre-trained Models

We provide the pre-trained models in this link.

Performance on the validation set

The overall results on val set:

Method F1_m Pre Rec
RAZ_loc[1] 62.5 69.2 56.9

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

References

  1. Recurrent Attentive Zooming for Joint Crowd Counting and Precise Localization, CPVR, 2019.

Evaluation Scheme

The Evaluation Python Code of the crowdbenchmark.com is shown in ./eval/eval.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 (RAZ_loc), please cite them.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap