Skip to content

Final year project for University exploring generation of textures using convolutional neural networks

Notifications You must be signed in to change notification settings

harrybp/TextureGeneration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Texture Generation using Convolutional Neural Networks

The aim of this project is to explore methods of generating unique, realistic or artistic textures without needing a large source dataset. I have implemented two different methods for generating textures using convolutional neural networks.

  • Training a GAN to generate textures using two different models: DCGAN and PSGAN. (The code is designed to be easily extended to support additional generator & discriminator models.)
  • Optimising on image pixels as done by Gatys et al.

Installation

Prerequisites:

Clone and unzip this repository. Then simply run pip install TextureGeneration-master

You must have installed PyTorch from here before installing this application.

If you want to change where the application will store models and textures then edit the file config/variables.py prior to installation.


Generating Textures

Run python setup.py test before starting to run the test suite

Command Result
texture_gan train -h to train a new GAN model
texture_gan demo -h to generate an image using a trained model
texture_gan animate -h to generate an animated GIF using a trained model
texture_gatys -h to generate an image from the style of a source image

Results

An example of the kind of results which this application can achieve. Both the generated images shown below are fully tile-able.

Method Source Image Result
texture_gatys Input image Resulting tiled texture
texture_gan Input image Resulting tiled texture

I have set up a website here to compare the generation process between approaches and to showcase some generated images and GIFs.

About

Final year project for University exploring generation of textures using convolutional neural networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages