Skip to content

Tensorflow implementation of a lightweight people counting CNN

Notifications You must be signed in to change notification settings

jplumail/people-counting

Repository files navigation

This repository implements a model from A Real-Time Deep Network for Crowd Counting, and applies it to the ShanghaiTech dataset.

It provides trained weights as well as scripts to train it on an AWS VM.

Installation

git clone https://github.com/jplumail/people-counting
pip install -r requirements.txt

Download the ShanghaiTech dataset here. Unzip it under the data/ folder. Launch the density_gen.py script to generate the density maps : python density_gen.py.

Train

To train a model on an AWS, type ./start.sh, it will launch a docker inside the VM. It will launch a Tensorboard opened to the web (you must open the port 6006 in the configuration first). The logs/weights will be saved on AWS S3.

Test

Run test.py. It will create a directory with all of the density maps.

Prediction/groundtruth density maps comparison, summing these yield the counting

About

Tensorflow implementation of a lightweight people counting CNN

Topics

Resources

Stars

Watchers

Forks