Added scene image generation for Open Images #127
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding the code for scene image generation as done in High-Resolution Complex Scene Synthesis with Transformers. Adding the Open Images dataset, COCO had been added in this PR. Also, added pre-trained models & provided first 100 layouts so that people can try it out easily.
I did not update the project main page to announce this new piece of code, probably this should be done before merging.
Proposing the following announcement on project page:
Scene Image Synthesis
Scene image generation based on bounding box conditionals as done in High-Resolution Complex Scene Synthesis with Transformers (see talk on workshop page). Supporting the datasets COCO and Open Images.
Training
Download first-stage models COCO-8k-VQGAN for COCO or COCO/Open-Images-8k-VQGAN for Open Images.
Change
ckpt_pathindata/coco_scene_images_transformer.yamlanddata/open_images_scene_images_transformer.yamlto point to the downloaded first-stage models.Download the full COCO/OI datasets and adapt
data_pathin the same files, unless working with the 100 files provided for training and validation suits your needs already.Code can be run with
python main.py --base configs/coco_scene_images_transformer.yaml -t True --gpus 0,or
python main.py --base configs/open_images_scene_images_transformer.yaml -t True --gpus 0,Sampling
Train a model as described above or download a pre-trained model:
assets/coco_scene_images_training.svg)When downloading a pre-trained model, remember to change
ckpt_pathinconfigs/*project.yamlto point to your downloaded first-stage model (see ->Training).Scene image generation can be run with
python scripts/make_scene_samples.py --outdir=/some/outdir -r /path/to/pretrained/model --resolution=512,512