Skip to content

gutihernandez/attribute_hallucination

 
 

Repository files navigation

Manipulating Attributes of Natural Scenes via Hallucination

Levent Karacan, Zeynep Akata, Aykut Erdem, Erkut Erdem

This is the implementation of Manipulating Attributes of Natural Scenes via Hallucination (Accepted for publication in ACM Transactions on Graphics, 2019). See our website for more information about the model!

Bibtex

@ARTICLE{attribute_hallucination,
author={L. {Karacan} and Z. {Akata} and A. {Erdem} and E. {Erdem}},
journal={ACM Transactions on Graphics},
title={Manipulating Attributes of Natural Scenes via Hallucination},
year={2019},
volume={},
number={},
pages={1-1},
month={},}

Requirements

  • Linux or OSX
  • NVIDIA GPU + CUDA
  • We tested our code on python2.7 and python3.6
  • You need to install Tkinter module to use interactive scene editing tool.

Dataset

Coarse Model Training

  • We follow similar multiscale strategy with Pix2pixHD model in our code. Some parts of code adapted from Pix2pixHD's official code.
  • Download "sceneparsing" models from the link.
python train_coarse.py --img_root ./data/ADE20K_TA_Dataset/  --save_filename ./model/sgn_coarse --scene_parsing_model_path ./sceneparsing/resnet34_dilated8/ --batch_size 16  --num_epoch 100

Enhancer Model Training

python train_enhancer.py --img_root ./data/ADE20K_TA_Dataset/ --coarse_model ./model/sgn_coarse_G_latest  --save_filename ./model/sgn_hd --scene_parsing_model_path ./sceneparsing/resnet34_dilated8/ --batch_size 8 --num_epoch 100 --isEnhancer

Test Coarse Model

  • Download pre-trained models from the link.
python test.py --img_root ./data/ADE20K_TA_Dataset/ --model_path ./model/sgn_coarse_G_latest --save_dir ./results

Test Enhancer Model

python test.py --img_root ./data/ADE20K_TA_Dataset/ --model_path ./model/sgn_enhancer_G_latest --save_dir ./resultsHD --isEnhancer

Interactive Scene Editing Demo

cd editing_tool
python main.py --model_path ./pretrained_models/sgn_enhancer_G_latest --isEnhancer --image_size 512

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%