Muhammad Usman Rafique, Hunter Blanton, Noah Snavely, Nathan Jacobs
Pretrained models are included in this repo under checkpoints/
This repository contains scripts for training, evaluation, and generating visual results. The settings are stored in the file config.py
. Before running any training or evaluation, please make sure that settings in config.py
are correct.
This repository comes with these models from our paper:
- Improved appearance flow: AF++
- Flow-guided direct synthesis: FDS
- Generative appearance flow: GAF
For training, you can specify a directory through cfg.train.out_dir
(in config.py
). Trained models and training logs will be saved in this directory. There are three models, which are trained sequentially AF++, FDS, and GAF.
- AF++: run
python3 train_AF_plus.py
. There is no prerequisite to train AF++. - FDS: run
python3 train_FDS.py
. This requires a trained AF++. We have included a trained AF++ incheckpoints/
, this will be loaded by default. - GAF: run
python3 train_GAF.py
. Trained AF++ and FDS are required. These are included incheckpoints/
and will be loaded by default.
For quantitative evaluation, or to generate visual results, please select the correct directory in which trained models are saved, or set cfg.train.out_dir='checkpoints'
. Also, make sure to set the desired network through cfg.model.name
.
For visual results, run python3 visualize.py
. For quantitative evaluation python3 eval_trained.py
.
All panoramic images have been north-aligned, cropped, and resized to the size 960 (width) x 160 (height). There are a total of 44 092 examples in the dataset; every example has two images and the relative camera transformations.
We have collected the dataset from google street view images. To ensure fair use and avoid duplication, please send an email to usman dot rafique @ uky . edu. We will share the dataset link by email.
The code is released only for academic and research purposes.
@inproceedings{rafique2020gaf, title={Generative Appearance Flow: A Hybrid Approach for Outdoor View Synthesis}, author={Rafique, M. Usman and Blanton, Hunter and Snavely, Noah and Jacobs, Nathan}, booktitle={The British Machine Vision Conference}, year={2020} }
- Oct 29, 2020: Uploaded the checkpoint for GAF. Visualization and evaluation scripts are updated to use the checkpoints provided in the directory
checkpoints
.
Note: I have noticed that evaluation results from these pretrained models are slightly different from the ones reported in the paper. This is due to the way images are downsampled for public release. For any quantitative comparison, we strongly recommend to train the models using the training scripts provided in this repository. If you have any trouble in reproducing the results, please feel to reach out: usman dot rafique @ uky . edu