===== LICENSE =====

This software is copyright 2013 Marcus A Brubaker and Andreas Geiger.  It is released for personal or academic use only.  Any commercial use is strictly prohibited except by explicit permission of the author.  For more information on commerical use, contact Marcus A Brubaker (mbrubake@cs.toronto.edu).  The authors of this software and corresponding paper assume no liability for its use and by downloading this software you agree to these terms.  

Any academic use of this software should cite the following in published work:

"Lost! Leveraging the Crowd for Probabilistic Visual Self-Localization." Marcus A. Brubaker, Andreas Geiger and Raquel Urtasun. In Proceedings of IEEE CVPR 2013.

===== BUILD INSTRUCTIONS =====

To build this you need:
 - Linux or OS X (or any other Unix-like OS)
 - A C++ compiler (g++/clang++/etc)
 - A recent version of Boost with the Boost.Python, Serialization and program_options modules.
 - CMake
 - Python 2.6 or greater (Python 3 may or may not work)
 - Qt4

To run the code you will need the following python packages:
 - NumPy
 - SciPy
 - NetworkX
 - Matplotlib (if generating visualizations)
 - mpi4py (if you want to run it in parallel, not needed if running on a single core)

Build Instructions:
 - from src run:
    cmake .
    make


===== USAGE =====

To see how to run the code look at the shell scripts (files ending in .sh) in data and src.  To run the sequences used in the paper:

- you will need to convert the OSM files in data using the convert_data.sh file.
- the main executable file is map_localization.py which uses configuration files in src/configs.  The path to the data_dir may need to be updated in these files for your local configuration.
- the shell scripts run*.sh should be referenced for how to run map_localization.py and reproduce the results in the paper.  **** NOTE: Simply running these shell scripts may not do what you want and may take a long time to run if you do not have MPI setup with a fair number of nodes. ****


To run this on new sequences you will need to (at a minimum) to the following things:

- Download an OSM file for the corresponding region and convert it using osm_convert (a la convert_data.sh)
- Compute visual odometry and output in the format described in data/odometry/README
- Create a .dcfg file indicating where the various pieces are

