SimonLembeye / crowd-counting-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crowd Counting Project

The aim of this project is to test different methods of crowd couting. We will find an implementation of the neural network and losses developed by the articles:

  • [1] CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes, CVPR 2018. link
  • [2] Bayesian Loss for Crowd Count Estimation with Point Supervision. link
  • [3] What Uncertainties Do We Need in Bayesian Deep Learning for Computer Vision? link

Data

These different methods have been tested on the ShanghaïTech Part A dataset. We provide the well formatted data for this project here. data folder has to be place in the root's project.

Project structure

The project is structured as following:

.
├── loaders
|   └──  bayes_loader.py # Dataset and loader of the bayes method
|   └──  gt_laoder.py # Dataset and loader of the ground truth method
├── models
|   └──  csrnet.py # csrnet nn
|   └──  vgg19_extended.py # vgg19 with an extension
├──  losses
|   └──  aleatoric.py #  aleatoric  loss implementation
|   └──  bayes_loss.py
|   └──  port_prob.py # posterior probability of the bayes method
├──  trainers
|   └──  abctrainer.py # abstract class defining a trainer
|   └──  bayes_trainer.py
|   └──  gt_trainer.py
├──  utils
|   └──  loaders.py # helper functions for the loaders
|   └──  models.py # helper functions for the models
|   └──  parser.py
├── train.py # pipelines for training
├── test.y # pipelines for testing

Launching

Train exemple : python train.py --method bayes --model csrnet --aleatoric true --lr 1e-6 Details can be found in train.py

Test exemple : python test.py --method bayes --model csrnet Details can be found in test.py

Output

For each training session the weights of the best models (minimizing 2 * val_mse + val_mae) are stored in the best_model_weight folder. Everything else is printed.

Tensorboard

In order the visualize metrics and results in tensorboard you need to launch it separately: tensorboard --logdir=runs. You can then access tensorboard in our browser at localhost:6006 If you have performed multiple experiments, tensorboard will aggregate them in the same dashboard.

Project made by Thomas Le Monnier de Gouville, Simon Lembeye, Robin Michard and Victor Rambaud.

About


Languages

Language:Python 100.0%