All Projects → victordibia → Tpudcgan

victordibia / Tpudcgan

Train DCGAN with TPUs on Google Cloud

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tpudcgan

Dcgan Tensorflow
A tensorflow implementation of "Deep Convolutional Generative Adversarial Networks"
Stars: ✭ 6,963 (+21000%)
Mutual labels:  gan, dcgan
Igan
Interactive Image Generation via Generative Adversarial Networks
Stars: ✭ 3,845 (+11551.52%)
Mutual labels:  gan, dcgan
Cat Generator
Generate cat images with neural networks
Stars: ✭ 354 (+972.73%)
Mutual labels:  gan, dcgan
Tensorflow DCGAN
Study Friendly Implementation of DCGAN in Tensorflow
Stars: ✭ 22 (-33.33%)
Mutual labels:  gan, dcgan
Keras Dcgan
Keras implementation of Deep Convolutional Generative Adversarial Networks
Stars: ✭ 943 (+2757.58%)
Mutual labels:  gan, dcgan
DCGAN-CelebA-PyTorch-CPP
DCGAN Implementation using PyTorch in both C++ and Python
Stars: ✭ 14 (-57.58%)
Mutual labels:  gan, dcgan
Pytorch Mnist Celeba Gan Dcgan
Pytorch implementation of Generative Adversarial Networks (GAN) and Deep Convolutional Generative Adversarial Networks (DCGAN) for MNIST and CelebA datasets
Stars: ✭ 363 (+1000%)
Mutual labels:  gan, dcgan
GAN-Project-2018
GAN in Tensorflow to be run via Linux command line
Stars: ✭ 21 (-36.36%)
Mutual labels:  gan, dcgan
Awesome Gans
Awesome Generative Adversarial Networks with tensorflow
Stars: ✭ 585 (+1672.73%)
Mutual labels:  gan, dcgan
Tf.gans Comparison
Implementations of (theoretical) generative adversarial networks and comparison without cherry-picking
Stars: ✭ 477 (+1345.45%)
Mutual labels:  gan, dcgan
dcgan anime avatars
基于keras使用dcgan自动生成动漫头像
Stars: ✭ 37 (+12.12%)
Mutual labels:  gan, dcgan
Gans In Action
Companion repository to GANs in Action: Deep learning with Generative Adversarial Networks
Stars: ✭ 748 (+2166.67%)
Mutual labels:  gan, dcgan
DLSS
Deep Learning Super Sampling with Deep Convolutional Generative Adversarial Networks.
Stars: ✭ 88 (+166.67%)
Mutual labels:  gan, dcgan
Dcgan
The Simplest DCGAN Implementation
Stars: ✭ 286 (+766.67%)
Mutual labels:  gan, dcgan
Unsupervised-Anomaly-Detection-with-Generative-Adversarial-Networks
Unsupervised Anomaly Detection with Generative Adversarial Networks on MIAS dataset
Stars: ✭ 95 (+187.88%)
Mutual labels:  gan, dcgan
Pycadl
Python package with source code from the course "Creative Applications of Deep Learning w/ TensorFlow"
Stars: ✭ 356 (+978.79%)
Mutual labels:  gan, dcgan
GANs-Keras
GANs Implementations in Keras
Stars: ✭ 24 (-27.27%)
Mutual labels:  gan, dcgan
catgan pytorch
Unsupervised and Semi-supervised Learning with Categorical Generative Adversarial Networks
Stars: ✭ 50 (+51.52%)
Mutual labels:  gan, dcgan
Mimicry
[CVPR 2020 Workshop] A PyTorch GAN library that reproduces research results for popular GANs.
Stars: ✭ 458 (+1287.88%)
Mutual labels:  gan, dcgan
Context Encoder
[CVPR 2016] Unsupervised Feature Learning by Image Inpainting using GANs
Stars: ✭ 731 (+2115.15%)
Mutual labels:  gan, dcgan

Train a GAN using TPUs and Tensorflow on Google Cloud

Screenshot below shows 64px images generated using the code provided.

This repo contains code to train an unconditional DCGAN (Radford et al 2017) using TPUs on Google Cloud. It is based on the DCGAN TPU example by the Google Tensorflow team with the following modifications

  • Support for 64*64 and 128*128 generation: Provide two model architectures (mainly additional layers) that support generating higher resolution images (64, 128).
  • Images to TFRecords: A script is available to convert images in a folder to TFRecords required to train the DCGAN.
  • Trained models: Trained models for generating masks are available in the models folder and a script for generating images is included.

Convert Images

The convert_to_tfrecords script accepts arguments for data directory (data_dir) and output file (output_file). Data directory is expected to have folders which contain images directly.

python convert_to_tfrecords --data_dir=images/cifar --output_file=images/cifar/train.tfrecords --image_size=128

Expected

images
├── cifar
    ├── train
        └── train_image1.jpg
        └── train_image2.jpg
    └── test
        └── test_image1.jpg
        └── test_image2.jpg

Training

git clone https://github.com/victordibia/tpuDCGAN
  • Start Training
export GCS_BUCKET_NAME=  <Your GCS Bucket>
python dcgan_main.py --tpu=$TPU_NAME --train_data_file=gs://$GCS_BUCKET_NAME/data/masks/train_masks.tfrecords   --dataset=dcgan64 --train_steps=10000 --train_steps_per_eval=500 --model_dir=gs://$GCS_BUCKET_NAME/dcgan/masks/model --test_data_file=gs://$GCS_BUCKET_NAME/data/rand/test.tfrecords

Trained Models

Interested in generating masks? This repo contains two trained models (64px and 128px). You can use the generate script to generate images using any of the models. If you have your own trained DCGAN models (ckpt files) you can point the script to the model directory.

python generate_from_model.py --model_dir=models/masks/128/model.ckpt-15000 --image_size=128 --output_dir=models/masks/128 --random_seed=2
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].