Code Monkey home page Code Monkey logo

ccnn's Introduction

Towards perspective-free object counting with deep learning

By Daniel Oñoro-Rubio and Roberto J. López-Sastre.

GRAM, University of Alcalá, Alcalá de Henares, Spain.

This is the official code implementation of work described the paper. In this repository, we include the implementation of CCNN and Hydra.

License

The license information of this project is described in the file "LICENSE.txt".

Cite us

Was our code useful for you? Please cite us:

@inproceedings{onoro2016,
    Author = {O\~noro-Rubio, D. and L\'opez-Sastre, R.},
    Title = {Towards perspective-free object counting with deep learning},
    Booktitle = {ECCV},
    Year = {2016}
}

Contents

  1. Requirements: software
  2. Requirements: hardware
  3. Basic installation
  4. Demo
  5. Usage
  6. Download pre-trained models
  7. Download a dataset
  8. Remarks
  9. Acknowledgements

Requirements: software

  1. Use a Linux distribution. We have been developed and tested the code on Ubuntu.

  2. Requirements for Caffe and pycaffe (see: Caffe installation instructions).

Note: Caffe must be built with support for Python layers!

# In your Makefile.config, make sure to have this line uncommented
WITH_PYTHON_LAYER := 1
  1. Python packages you might not have: cython, python-opencv, easydict, opencv.

Requirements: hardware

This code allows the usage of CPU and GPU. We strongly recommend the usage the GPU due it is going to short the training and testing time by a factor of 10 or so.

  1. For training, we recommend having a GPU with at least 3GB of memory.

  2. For testing, a GPU with 2GB memory is enough.

Installation (sufficient for the demo)

  1. Be sure you have added to your PATH the tools directory of your Caffe compilation:

    export PATH=$CAFFE_ROOT/build/tools:$PATH
  2. Be sure you have added your pycaffe compilation into your PYTHONPATH:

    export PYTHONPATH=$CAFFE_ROOT/python:$PYTHONPATH
  3. Download the TRANCOS dataset by executing the following command:

    ./tools/get_trancos.sh
  4. Download the TRANCOS CCNN model. Comming soon

Demo

After successfully completing basic installation, you'll be ready to run the demo.

```
./tools/demo.sh
```

Usage

To train an test your own model, you should follow the next steps:

  1. Edit the configuration file "ccnn_trancos_cfg.yml" placed into the corresponding model folder (e.g.: $PROJECT/models/trancos/ccnn).

  2. Edit the launching script (e.g.: $PROJECT/experiments/scripts/trancos_train_test.sh):

  3. Place you in $PROJECT folder and run the launching script by typing:

    ./experiments/scripts/trancos_train_test.sh

Download pre-trained models

Comming soon...

Download a dataset

In order to download and setup a dataset we recommend to use our scripts. To do so, just place you in the $PROJECT directory and run one of the following commands:

Note: Make sure the folder "data/" does not already contain the dataset.

Remarks

In order to provide a better distribution, this repository unifies and reimplement in Python some of the original modules. Due the changes in the libraries, the results produced by the pretrained models may have been slightly changed with respect to the numbers provided in the paper.

Acknowledgements

This work is supported by the projects of the DGT with references SPIP2014-1468 and SPIP2015-01809, and the project of the MINECO TEC2013-45183-R.

ccnn's People

Contributors

roleiland avatar

Watchers

 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.