This repo contains code for paper "Three-view Focal Length Recovery From Homographies" (arxiv: TBA)
Create an environment with pytorch and packaged from requirements.txt
.
Install PoseLib fork with implemented estimators into the environment:
git clone https://github.com/kocurvik/PoseLib-hf
git cd PoseLib-hf
pip install .
Before running the python scripts make sure that the repo is in your python path (e.g. export PYTHONPATH=/path/to/repo/hf
)
You can download the HomoTT dataset with matches here. The GT focal lengths were obtained using dataset_utils\calibrate.py
and matches were obtained using prepare_custom.py
.
To perform the evaluation on real data run:
for x in $( ls /path/to/dataset/sym_matches); do
echo $x
python eval_f.py -c 1 -nw 64 triplets-case1-features_superpoint_noresize_2048-LG /path/to/dataset/sym_matches/$x
python eval_f.py -c 2 -nw 64 triplets-case2-features_superpoint_noresize_2048-LG /path/to/dataset/sym_matches/$x
python eval_f.py -c 1 -g -nw 64 triplets-case1-features_superpoint_noresize_2048-LG /path/to/dataset/sym_matches/$x
python eval_f.py -c 2 -g -nw 64 triplets-case2-features_superpoint_noresize_2048-LG /path/to/dataset/sym_matches/$x
done
You can run the synthetic experiments using boxplot.py
.