Coder Social home page Coder Social logo

bruinxiong / attr2font Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hologerry/attr2font

0.0 1.0 0.0 220.15 MB

[SIGGRAPH 2020] Attribute2Font: Creating Fonts You Want From Attributes

Home Page: https://hologerry.github.io/Attr2Font/

License: Other

Python 100.00%

attr2font's Introduction

Attr2Font

Introduction

This is the official PyTorch implementation of the Attribute2Font: Creating Fonts You Want From Attributes.

Teaser

Paper: arXiv | Research Gate
Supplementary Material: link
Video: link
Code: GitHub

Abstract

Font design is now still considered as an exclusive privilege of professional designers, whose creativity is not possessed by existing software systems. Nevertheless, we also notice that most commercial font products are in fact manually designed by following specific requirements on some attributes of glyphs, such as italic, serif, cursive, width, angularity, etc. Inspired by this fact, we propose a novel model, Attribute2Font, to automatically create fonts by synthesizing visually pleasing glyph images according to user-specified attributes and their corresponding values. To the best of our knowledge, our model is the first one in the literature which is capable of generating glyph images in new font styles, instead of retrieving existing fonts, according to given values of specified font attributes. Specifically, Attribute2Font is trained to perform font style transfer between any two fonts conditioned on their attribute values. After training, our model can generate glyph images in accordance with an arbitrary set of font attribute values. Furthermore, a novel unit named Attribute Attention Module is designed to make those generated glyph images better embody the prominent font attributes. Considering that the annotations of font attribute values are extremely expensive to obtain, a semi-supervised learning scheme is also introduced to exploit a large number of unlabeled fonts. Experimental results demonstrate that our model achieves impressive performance on many tasks, such as creating glyph images in new font styles, editing existing fonts, interpolation among different fonts, etc.

Model Architecture

Architecture

Demonstration

Demo

Prerequisites

  • Linux
  • CPU or NVIDIA GPU + CUDA cuDNN
  • Python 3
  • PyTorch 1.0+

Get Started

Installation

  1. Install PyTorch, torchvison and dependencies from https://pytorch.org
  2. Clone this repo:
    git clone https://github.com/hologerry/Attr2Font
    cd Attr2Font
  3. Download the official pre-trained vgg19 model: vgg19-dcbb9e9d.pth, and put it under this project root folder

Datasets

Download the dataset from PKU Disk, Google Drive or MEGA and put it into the data/:

data/
    explor_all/
        image/
        attributes.txt/

| This dataset is constructed by O’Donovan et al. Exploratory Font Selection Using Crowdsourced Attributes. TOG 2014

Model Training

python main.py --phase train

Model Testing

python main.py --phase test

Model Interpolation

python main.py --phase test_interp --test_epoch EPOCH

Citation:

If you use this code or find our work is helpful, please consider citing our work:

@article{WangSIGGRAPH2020,
  author = {Yizhi Wang*, Yue Gao*, Zhouhui Lian},
  title = {Attribute2Font: Creating Fonts You Want From Attributes},
  journal = {ACM Trans. Graph.},
  year = {2020}
}

| * Denotes equal contribution

The code and dataset are only allowed for PERSONAL and ACADEMIC usage.

attr2font's People

Contributors

hologerry 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.