Skip to content

Project aimed to create a GAN, that can generate art from text.

License

Notifications You must be signed in to change notification settings

karl-joan/text2art-gan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text2art-gan

Project aimed to create a GAN, that is able to generate art just from text descriptions. The project can be accessed from GitLab or GitHub.

CUB

For each style, the first column is where lambda_idt = 0.5 and the second column is where lambda_idt = 5.

COCO

For each style, the first column is where lambda_idt = 0.5 and the second column is where lambda_idt = 5.

When given a more abstract word, the results can be quite interesting:

Set Up

Dependencies

  • python 3.7
  • pytorch
  • numpy
  • easydict
  • pyyaml

Model parameters

You can download the model parameters from here.

Installation

  • Install dependecies
  • Clone this repo:
git clone https://gitlab.com/karl-joan/text2art-gan.git
cd text2art-gan
  • Download model parameters to the current working directory
  • Extract model parameters
7z x parameters.7z

Usage

$ python generate.py --help
usage: generate.py [-h] [-d {birds,coco}] [-n NUMBER] [-i] [-c] [-v]
                   "caption" {abstract_expressionism,impressionism}

Generate art from text

positional arguments:
  "caption"             text to generate from
  {abstract_expressionism,impressionism}
                        the style of the artwork

optional arguments:
  -h, --help            show this help message and exit
  -d {birds,coco}, --dataset {birds,coco}
                        dataset to generate from (default birds)
  -n NUMBER, --number NUMBER
                        the number of artworks to generate (default 2)
  -i, --identity        set lambda_idt = 5 instead of lambda_idt = 0.5
  -c, --cpu             use cpu
  -v, --verbose         print more details
$ python generate -d coco "a man is standing infront of a building" abstract_expressionism

Citation

If you use the work present in this repository for your project, then please consider citing this work.

Acknowledgments

Modified code is borrowed from AttnGAN and CycleGAN.

About

Project aimed to create a GAN, that can generate art from text.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published