GithubHelp home page GithubHelp logo

rongliangzi / dense-scale-network-for-crowd-counting Goto Github PK

View Code? Open in Web Editor NEW
31.0 4.0 8.0 42 KB

An unofficial implement of paper "Dense Scale Network for Crowd Counting", link: https://arxiv.org/abs/1906.09707

Python 99.93% Shell 0.07%
crowd-counting convolutional-neural-networks deep-learning

dense-scale-network-for-crowd-counting's Introduction

Dense-Scale-Network-for-Crowd-Counting

An unofficial implement of paper "Dense Scale Network for Crowd Counting".

Dataset setup

Download the shanghaitech dataset from here, UCF-QNRF dataset from here.

Data preparation

In make_sh_gt.py, modify variable root in line 18 to your dataset path and set the min_size in line 16 for image. Then run the .py file. It will save images and .h5 file in root/{dataset}_preprocessed/train/ and root/{dataset}_preprocessed/test/.

Train

In main.py, set train_path to root/{dataset}_preprocessed/train/ and test_path to root/{dataset}_preprocessed/test/ in line 81 and 82. Also specify the save_path. When training shanghaitech PartA dataset, the model shows faster convergence if learning rate is set as 1e-4 compared to 1e-5 which is claimed by the paper.

Test

Test on one image

python test_one_image.py --gpu 0 --model_path pretrained_model_path --test_img_path your_image_path

Test on a dataset

python test_dataset.py --gpu 0 --model_path pretrained_model_path --test_img_dir your_image_directory

Result

Dataset MAE MSE
sha 69.35 104.4
shb 8.58 14.87
qrnf tbd tbd

Anyone interested in implementing crowd counting models is welcomed to contact me.

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.