This is the source code for the paper titled - "LoST? Appearance-Invariant Place Recognition for Opposite Viewpoints using Visual Semantics", [arXiv][RSS 2018 Proceedings]
An example output image showing Keypoint Correspondences:

Flowchart of the proposed approach:

If you find this work useful, please cite it as:
Sourav Garg, Niko Sunderhauf, and Michael Milford. LoST? Appearance-Invariant Place Recognition for Opposite Viewpoints using Visual Semantics. Proceedings of Robotics: Science and Systems XIV, 2018.
bibtex:
@article{garg2018lost,
title={LoST? Appearance-Invariant Place Recognition for Opposite Viewpoints using Visual Semantics},
author={Garg, Sourav and Suenderhauf, Niko and Milford, Michael},
journal={Proceedings of Robotics: Science and Systems XIV},
year={2018}
}
RefineNet's citation as mentioned on their Github page.
git clone https://github.com/oravus/lostX.git
cd lostX
git clone https://github.com/oravus/refinenet.git
NOTE: If you download this repository as a zip, the refineNet's fork will not get downloaded automatically, being a git submodule..mat file in the refinenet/model_trained/ directory.docker pull souravgarg/vpr-lost-kc:v1
Generate and store semantic labels and dense convolutional descriptors from RefineNet's conv5 layer
In the MATLAB workspace, from the refinenet/main/ directory, run:
demo_predict_mscale_cityscapes
The above will use the sample dataset from refinenet/datasets/ directory. You can set path to your data in demo_predict_mscale_cityscapes.m through variable datasetName and img_data_dir.
You might have to run vl_compilenn before running the demo, please refer to the instructions for running refinenet in their official Readme.md
[For Docker users]
If you have an environment with python and other dependencies installed, skip this step, otherwise run a docker container:
docker run -it -v PATH_TO_YOUR_HOME_DIRECTORY/:/workspace/ souravgarg/vpr-lost-kc:v1 /bin/bash
From within the docker container, navigate to lostX/lost_kc/ repository.
-v option mounts the PATH_TO_YOUR_HOME_DIRECTORY to /workspace directory within the docker container.
Reformat and pre-process RefineNet's output from lostX/lost_kc/ directory:
python reformat_data.py -p $PATH_TO_REFINENET_OUTPUT
$PATH_TO_REFINENET_OUTPUT is set to be the parent directory of predict_result_full, for example, ../refinenet/cache_data/test_examples_cityscapes/1-s_result_20180427152622_predict_custom_data/predict_result_1/
Compute LoST descriptor:
python LoST.py -p $PATH_TO_REFINENET_OUTPUT 
Repeat step 1, 3, and 4 to generate output for the other dataset by setting the variable datasetName to 2-s.
Perform place matching using LoST descriptors based difference matrix and Keypoint Correspondences:
python match_lost_kc.py -n 10 -f 0 -p1 $PATH_TO_REFINENET_OUTPUT_1  -p2 $PATH_TO_REFINENET_OUTPUT_2
Note: Run python FILENAME -h for any of the python source files in Step 3, 4, and 6 for description of arguments passed to those files.
The code is released under MIT License.
CRICOS No. 00213J