Code Monkey home page Code Monkey logo

paint4poem's Introduction

Introduction

We propose a new task -- artistic visualization of classical Chinese poems, where the goal is to generate paintings of a certain artistic style for classical Chinese poems.

For this goal, we construct a new dataset called Paint4Poem.

Paint4Poem consists of three sets:

  • Zikai-Poem: 301 poem-painting pairs collected manually from an influential modern Chinese artist Feng Zikai,
  • Zikai-Caption: 3,648 caption-painting pairs collected manually from Feng Zikai's paintings,
  • TCP-Poem: 89,204 poem-painting pairs of traditional Chinese painting (TCP) style collected automatically from the web.

We expect the first two sets to help learning the artist painting style of Feng Zikai as it contains his most paintings, and the third one to help learning the semantic relevance between poems and paintings.

See more details in our paper Paint4Poem: A Dataset for Artistic Visualization of Classical Chinese Poems. We welcome your discussion and modelling on this dataset! Contact Dan Li or Shuai Wang.

Download

Download the complete data or a samll sample set.

Examples

Baselines

AttnGAN

Training

  • Pre-train DAMSM models:

    • For poem dataset: python pretrain_DAMSM.py --cfg cfg/DAMSM/zikai_poem.yml --gpu 0
    • For caption dataset: python pretrain_DAMSM.py --cfg cfg/DAMSM/zikai_title.yml --gpu 1
  • Train AttnGAN models:

    • For poem dataset: python main_poem.py --cfg cfg/zikai_poem_attn2_.yml --gpu 2
    • For caption dataset: python main_poem.py --cfg cfg/zikai_title_attn2_.yml --gpu 3
  • *.yml files are example configuration files for training/evaluation our models.

Validation

  • Run python main_poem.py --cfg cfg/eval_try.yml --gpu 1 to generate examples from captions in files listed in "./data/birds/example_filenames.txt".
  • Change the eval_*.yml files to generate images from other pre-trained models.
  • To generate images for all captions in the validation dataset, change B_VALIDATION to True in the eval_*.yml. and then run python main_poem.py --cfg cfg/eval_try.yml --gpu 1

Examples of generated paintings

Evaluation

We evaluate the quality of generated paintings regarding their pictorial quality, stylistic quality, and semantic relevance to the given poem.

Pictorial quality

Stylistic quality

Semantic relevance

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Citation

If you use this repository in your research, consider citing it using the following Bibtex entry:

@misc{li2021paint4poem,
title={Paint4Poem: A Dataset for Artistic Visualization of Classical Chinese Poems},
author={Dan Li and Shuai Wang and Jie Zou and Chang Tian and Elisha Nieuwburg and Fengyuan Sun and Evangelos Kanoulas},
year={2021},
eprint={2109.11682},
archivePrefix={arXiv},
primaryClass={cs.CV}
}

paint4poem's People

Contributors

shuaiwang97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.