Giter Site home page Giter Site logo

bbruhh / crowd-counting-with-mcnns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from priyanka-kasture/crowd-counting-with-mcnns

1.0 1.0 0.0 6.26 MB

Crowd counting on the ShanghaiTech dataset, using multi-column convolutional neural networks.

License: MIT License

Python 100.00%

crowd-counting-with-mcnns's Introduction

Crowd Counting with MCNNs - MindSpark Hackathon 2018


Crowd counting on the ShanghaiTech dataset, using multi-column convolutional neural networks.

This is an unofficial implementation of CVPR 2016 paper "Single Image Crowd Counting via Multi Column Convolutional Neural Network".

Note: Predictions can be made. The work on heatmap generation in under progress.

Installation

  • Install Tensorflow and Keras
  • Install OpenCV
  • Clone this repository (in case you don't want train the model and want to use the pre-trained one).

Data Setup

Download ShanghaiTech Dataset from:


Create a folder: ROOT/data/original/shanghaitech/

Here ROOT is the folder conatining all files, it's the main folder. (Don't create a folder called ROOT!)
  • Save "part_A" under ROOT/data/original/shanghaitech/
  • Save "part_B" under ROOT/data/original/shanghaitech/
  • Got to ROOT/data_preparation/
  • There, run create_gt_test_set_shtech.m in matlab/octave to create ground truth files for test data.
  • Then go to ROOT/data_preparation/ again.
  • run create_training_set_shtech.m in matlab to create training and validataion set along with ground truth files.

- Save the ground truth csv files in ROOT/data/
That completes data-setup!

Test


- Save the model files under: ROOT/final_models
- Finally run: test.py

Train

  • Not recommended unless you have a great processor, or a GPU, because training takes a lot of time. Load the pre-trained model and test it on the test set instead.

  • For tensorflow:
    run from prompt: python3 train.py A(or B)
    Model is saved to modelA/ or modelB/.

  • For keras: run: python3 keras_train.py B
    model is saved to keras_modelB/

crowd-counting-with-mcnns's People

Contributors

priyanka-kasture avatar

Stargazers

 avatar

Watchers

James Cloos avatar

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.