Skip to content

Generate fake landscapes using a Generative Adversarial Network

Notifications You must be signed in to change notification settings

ryanzhang22/Landscape-GAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Landscape-GAN

Generate fake landscapes using a Generative Adversarial Network

Alt Text

The above gif contains images generated during the training of a Generative Adversial Network using landscapes as training data. The training set contained ~3500 images obtained from a Kaggle dataset. Data were converted to a numpy file for quicker processing, as image processing took around 10-20 minutes each time. All training was done using Google Cloud computing on two GPUs, which is indicated in GAN.py. After training was finished (~9 hours), I was left with a generator.h5 file that could be used to generate these landscapes.

While I mainly worked on this project out of interest, I learned a lot about these networks and am pretty happy with how my final results turned out. In the future, I hope to retrain at a higher resolution and for a longer time to see how much improvement is possible.

I included code for the network, as well as my sampled results and some code to generate using the generate.h5 file in case anyone reading this wanted to test it out for themselves. The loadNewData parameter passed into the main training method should be adjusted according to what the user plans to train on. Plus, GPU training can be adjusted through the os.environ assignment near the top, and by the numGPUs parameter in the main training method. I didn't include the .npy file because it was enormous.

Another generated sample image:

Enjoy!

I referenced code from here and here to provide a starting point for my own training.

About

Generate fake landscapes using a Generative Adversarial Network

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages