- Anaconda w/ Python 2.7
- Caffe 1.0-RC5
- ImageMagick 6.8.8-1
- what
spec-file.txt
andrequirements.txt
say
Using other versions of these packages may yield different results.
- Get the code, install requirements and build LSD:
git clone --recursive https://github.com/fkluger/Vanishing_Points_GCPR17.git
cd Vanishing_Points_GCPR17
conda create --name gcpr17_vp_detection --file spec-file.txt
source activate gcpr17_vp_detection
pip install -r requirements.txt
cd lsdpython
python setup.py build_ext --inplace
cd ..
- Download the CNN weights and image mean files and
put them into the
cnn
folder. - Adjust
config.py
so that it contains the path to your Caffe installation and the paths where you store the benchmark datasets.
You can run the vanishing point detector on four example images (see below) and visualise the results. Computation may take a few moments. Adjust the GPU ID if necessary:
python example.py --gpu 0
python example.py --show
Run the following commands to evaluate the vanishing point detector on the three benchmark datasets and plot the AUC curves:
python benchmark.py --yud --gpu 0 --update_datalist --update_datafiles --run_cnn --run_em
python benchmark.py --yud --gpu 0
python benchmark.py --ecd --gpu 0 --update_datalist --update_datafiles --run_cnn --run_em
python benchmark.py --ecd --gpu 0
python benchmark.py --hlw --gpu 0 --update_datalist --update_datafiles --run_cnn --run_em
python benchmark.py --hlw --gpu 0
If you use the code provided here, please cite:
@inproceedings{kluger2017deep,
title={Deep learning for vanishing point detection using an inverse gnomonic projection},
author={Kluger, Florian and Ackermann, Hanno and Yang, Michael Ying and Rosenhahn, Bodo},
booktitle={German Conference on Pattern Recognition (GCPR)},
year={2017}
}
The paper can be found on arXiv.
The benchmark datasets used in the paper can be found here:
The example images show landmarks in Hannover, Germany: