mingyuyng / DCGAN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DCGAN based Semantic Image Inpainting

Prerequisites

Usage

First, download dataset celebA and MNIST:

$ python download.py mnist celebA

Then, to test image inpainting with celebA, run:

$ python complete.py --outDir outputImages  --num 16 --batch_size 16 --nIter 1000 --imgs './data/celebA/*' --dataset celebA --maskType 'center' 

The number of images, the size of batch, the number of iterations and and type of mask can be changed.

This code supports 5 masks: random, center, eye, left, crop

The completed images without Poisson Blending are stored in ./outputImages/completed/

The completed images with Poisson Blending are stored in ./outputImages/completed_blend/

The images sampled from DCGAN are stored in ./outputImages/hats_imgs/

To test image inpainting with MNIST, run:

$ python complete.py --outDir outputImages  --num 16 --batch_size 16 --nIter 1000 --imgs './data/mnist/*' --dataset mnist --maskType 'center' 

For MNIST, Poisson Blending is not applied.

About


Languages

Language:Python 57.7%Language:C 35.5%Language:JavaScript 3.3%Language:HTML 1.6%Language:CSS 0.7%Language:PostScript 0.4%Language:Makefile 0.3%Language:Shell 0.3%Language:Batchfile 0.2%Language:C++ 0.0%Language:Gnuplot 0.0%Language:Ruby 0.0%