All Projects → tohinz → multiple-objects-gan

tohinz / multiple-objects-gan

Licence: MIT license
Implementation for "Generating Multiple Objects at Spatially Distinct Locations" (ICLR 2019)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to multiple-objects-gan

Swapnet
Virtual Clothing Try-on with Deep Learning. PyTorch reproduction of SwapNet by Raj et al. 2018. Now with Docker support!
Stars: ✭ 202 (+81.98%)
Mutual labels:  image-generation
soft-intro-vae-pytorch
[CVPR 2021 Oral] Official PyTorch implementation of Soft-IntroVAE from the paper "Soft-IntroVAE: Analyzing and Improving Introspective Variational Autoencoders"
Stars: ✭ 170 (+53.15%)
Mutual labels:  image-generation
MCAR
Learning to Discover Multi-Class Attentional Regions for Multi-Label Image Recognition
Stars: ✭ 32 (-71.17%)
Mutual labels:  ms-coco
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+14744.14%)
Mutual labels:  image-generation
MoCoGAN-HD
[ICLR 2021 Spotlight] A Good Image Generator Is What You Need for High-Resolution Video Synthesis
Stars: ✭ 224 (+101.8%)
Mutual labels:  image-generation
ru-dalle
Generate images from texts. In Russian
Stars: ✭ 1,606 (+1346.85%)
Mutual labels:  image-generation
Arbitrary Text To Image Papers
A collection of arbitrary text to image papers with code (constantly updating)
Stars: ✭ 196 (+76.58%)
Mutual labels:  image-generation
RelationNetworks-CLEVR
A pytorch implementation for "A simple neural network module for relational reasoning", working on the CLEVR dataset
Stars: ✭ 83 (-25.23%)
Mutual labels:  clevr
CoCosNet-v2
CoCosNet v2: Full-Resolution Correspondence Learning for Image Translation
Stars: ✭ 312 (+181.08%)
Mutual labels:  image-generation
CycleGAN-Models
Models generated by CycleGAN
Stars: ✭ 42 (-62.16%)
Mutual labels:  image-generation
Graphite
Open source 2D node-based raster/vector graphics editor (Photoshop + Illustrator + Houdini = Graphite)
Stars: ✭ 223 (+100.9%)
Mutual labels:  image-generation
neuro-symbolic-ai-soc
Neuro-Symbolic Visual Question Answering on Sort-of-CLEVR using PyTorch
Stars: ✭ 41 (-63.06%)
Mutual labels:  clevr
tf-attend-infer-repeat
TensorFlow-based implementation of "Attend, Infer, Repeat" paper (Eslami et al., 2016, arXiv:1603.08575).
Stars: ✭ 44 (-60.36%)
Mutual labels:  multi-mnist
Paddlegan
PaddlePaddle GAN library, including lots of interesting applications like First-Order motion transfer, wav2lip, picture repair, image editing, photo2cartoon, image style transfer, and so on.
Stars: ✭ 4,987 (+4392.79%)
Mutual labels:  image-generation
vqgan-clip-app
Local image generation using VQGAN-CLIP or CLIP guided diffusion
Stars: ✭ 94 (-15.32%)
Mutual labels:  image-generation
Conditional Gan
Tensorflow implementation for Conditional Convolutional Adversarial Networks.
Stars: ✭ 202 (+81.98%)
Mutual labels:  image-generation
universum-contracts
text-to-image generation gems / libraries incl. moonbirds, cyberpunks, coolcats, shiba inu doge, nouns & more
Stars: ✭ 17 (-84.68%)
Mutual labels:  image-generation
Anime2Sketch
A sketch extractor for anime/illustration.
Stars: ✭ 1,623 (+1362.16%)
Mutual labels:  image-generation
Deep-Learning
Side projects and hands-on work
Stars: ✭ 16 (-85.59%)
Mutual labels:  ms-coco
COCO-Assistant
Helper for dealing with MS-COCO annotations
Stars: ✭ 83 (-25.23%)
Mutual labels:  ms-coco

Generating Multiple Objects at Spatially Distinct Locations

Pytorch implementation for reproducing the results from the paper Generating Multiple Objects at Spatially Distinct Locations by Tobias Hinz, Stefan Heinrich, and Stefan Wermter accepted for publication at the International Conference on Learning Representations 2019.

For more information and visualizations also see our blog post

Our poster can be found here

Have a look at our follow-up work Semantic Object Accuracy for Generative Text-to-Image Synthesis with available code.

Model-Architecture

Dependencies

  • python 2.7
  • pytorch 0.4.1

Please add the project folder to PYTHONPATH and install the required dependencies:

pip install -r requirements.txt

Data

  • Multi-MNIST: adapted from here
    • contains the three data sets used in the paper: normal (three digits per image), split_digits (0-4 in top half of image, 5-9 in bottom half), and bottom_half_empty (no digits in bottom half of the image)
    • download our data, save it to data/ and extract
  • CLEVR: adapted from here
    • Main: download our data, save it to data/ and extract
    • CoGenT: download our data, save it to data/ and extract
  • MS-COCO:
    • download our preprocessed data (bounding boxes and bounding box labels), save it to data/ and extract
    • obtain the train and validation images from the 2014 split here, extract and save them in data/MS-COCO/train/ and data/MS-COCO/test/
    • for the StackGAN architecture: obtain the preprocessed char-CNN-RNN text embeddings from here and put the files in data/MS-COCO/train/ and data/MS-COCO/test/
    • for the AttnGAN architecture: obtain the preprocessed metadata and the pre-trained DAMSM model from here
      • extract the preprocessed metadata, then add the files downloaded in the first step (bounding boxes and bounding box labels) to the data/coco/coco/train/ and data/coco/coco/test/ folder
      • put the downloaded DAMSM model into code/coco/attngan/DAMSMencoders/ and extract

Training

  • to start training run sh train.sh data gpu-ids where you choose the desired data set and architecture (mnist/clevr/coco-stackgan-1/coco-stackgan-2/coco-attngan) and which/how many gpus to train on
  • e.g. to train on the Multi-MNIST data set on one GPU: sh train.sh mnist 0
  • e.g. to train the AttnGAN architecture on the MS-COCO data set on three GPUs: sh train.sh coco-attngan 0,1,2
  • training parameters can be adapted via code/dataset/cfg/dataset_train.yml
  • make sure the DATA_DIR in the respective code/dataset/cfg/dataset_train.yml points to the correct path
  • results are stored in output/

Evaluating

  • update the eval cfg file in code/dataset/cfg/dataset_eval.yml and adapt the path of NET_G to point to the model you want to use (default path is to the pretrained models linked below)
  • run sh sample.sh mnist/clevr/coco-stackgan-2/coco-attngan to generate images using the specified model

Pretrained Models

  • pretrained model for Multi-MNIST: download, save to models and extract
  • pretrained model for CLEVR: download, save to models and extract
  • pretrained model for MS-COCO:
    • StackGAN architecture: download, save to models and extract
    • AttnGAN architecture: download, save to models and extract

Examples Generated by the Pretrained Models

Multi-MNIST

Multi-Mnist Examples

CLEVR

CLEVR Examples

MS-COCO

StackGAN Architecture

COCO-StackGAN Examples

AttnGAN Architecture

COCO-AttnGAN Examples

Acknowledgement

  • Code for the experiments on Multi-MNIST and CLEVR data sets is adapted from StackGAN-Pytorch.
  • Code for the experiments on MS-COCO with the StackGAN architecture is adapted from StackGAN-Pytorch, while the code with the AttnGAN architecture is adapted from AttnGAN.

Citing

If you find our model useful in your research please consider citing:

@inproceedings{hinz2019generating,
title     = {Generating Multiple Objects at Spatially Distinct Locations},
author    = {Tobias Hinz and Stefan Heinrich and Stefan Wermter},
booktitle = {International Conference on Learning Representations},
year      = {2019},
url       = {https://openreview.net/forum?id=H1edIiA9KQ},
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].