Skip to content

In this project, I propose a style glyph generator based on Generative Adversarial Networks (GANs) and texture synthesis with Convolutional Neural Networks.

License

Notifications You must be signed in to change notification settings

dx199771/font_generation

Repository files navigation

style-glyph-generator

In this project, We propose a font generator based on Generative Adversarial Networks (GANs) and texture synthesis with Convolutional Neural Networks.

Getting Started

To run the code, Go to this Google colab: notebook and playaround the system.

You can either run the .ipynb notebook or run the main.py.

Installation

GPU is required for both testing and training.

# For training and testing
pip install pytorch

# For font parser
pip install beautifulsoup4

Some generated font images are shown below:resultsfinal

The system contains two sub-nets: A glyph generation netowrk to generate glyph image and a texture synthesis network to synthesis texture and apply them on glyph images. infogan infogan2

Dataset

We also provide a font image dataset with 7 different font theme. You can download from google drive font dataset

If you want to train your own glyph model

Notebook provide a downloader, you can download glyph training data in the notebook. Or you can manually download font dataset from google drive: link download them and drag them into ./data/GAN_training_data/ folder.

Folder specification:

--->data:
------>GAN_training_data: training data for glyph generation
------>Glyph_parser_data: raw training data for glyph generation(unzip files)
------>texture_data: training data and generated texture images
--->font_parser: glyph images parser
--->models: pre-trained glyph generation models
--->nets: glyph generation and texture synthesis network
--->results:
------>GAN_opt: glyph generation results during training
------>Texture_opt: texture synthesis results during training
--->utils: some tools for training and testing
->evaluator.py: evaluator for trained models
->info_GAN_train.py main glyph generation file
->texture_synthesis_train.py main texture synthesis file
->playground.ipynb notebook for training and testing
->main.py testing file(recommend using playground.ipynb)

if you want to train you texture, you need to download the pre-trained vgg16.npy file from google drive: link download them and drag it into ./nets, or automatically download them in the notebook.

License

MIT If you have any questions about operating the system, please contact my email address: [email protected]

About

In this project, I propose a style glyph generator based on Generative Adversarial Networks (GANs) and texture synthesis with Convolutional Neural Networks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published