This is the implemetation of the paper Deep Generative Framework for Interactive 3D Terrain Authoring and Manipulation.
Please install conda. Create a new environment and install all the dependencies using the following command
conda env create --file environment.yml
The proposed architecture is composed of VAE and Pix2pix architectures. We have referred the PyTorch-VAE repository for the VAE implementation.
The model is trained in two steps. To train the VAE model, set the load_model parameter in train.yml to False. To train the pix2pix model use the following command. The checkpoints will be saved in logs directory.
python train.py --config configs/train.yml
This architecture provides multiple applications. To generate a single output use the following command. The results will be saved in images folder.
python test.py --var single
To generate multiple output variations for the same input, use the command
python test.py --var multiple
The model can be used to smoothly interpolate between the given two terrains.
To interpolate between two terrains, specify the folder location containing the terrains in the test.yml file. Then use the command
python interpolate.py
The given model can be used to render the terrains in an interactive mode.
Use the following command to run the UI.
python ui.py
If there are errors due to incompatibility , uninstall opencv and reinstall it using the command
pip install opencv-python-headless