Few-shot Font Generation by Learning Style Difference and Similarity

Xiao He, Mingrui Zhu, Nannan Wang, Xinbo Gao, Heng Yang
1/24/2023
cs.CV

No official code found. Best implementation: LearningHx/DS-Font (4 stars, last commit 2025-03-01).

Abstract

Few-shot font generation (FFG) aims to preserve the underlying global structure of the original character while generating target fonts by referring to a few samples. It has been applied to font library creation, a personalized signature, and other scenarios. Existing FFG methods explicitly disentangle content and style of reference glyphs universally or component-wisely. However, they ignore the difference between glyphs in different styles and the similarity of glyphs in the same style, which results in artifacts such as local distortions and style inconsistency. To address this issue, we propose a novel font generation approach by learning the Difference between different styles and the Similarity of the same style (DS-Font). We introduce contrastive learning to consider the positive and negative relationship between styles. Specifically, we propose a multi-layer style projector for style encoding and realize a distinctive style representation via our proposed Cluster-level Contrastive Style (CCS) loss. In addition, we design a multi-task patch discriminator, which comprehensively considers different areas of the image and ensures that each style can be distinguished independently. We conduct qualitative and quantitative evaluations comprehensively to demonstrate that our approach achieves significantly better results than state-of-the-art methods.

View on arXivView PDF

Code Implementations(1)

LearningHx/DS-FontCommunity60%

PyTorch Code for "Few-shot Font Generation by Learning Style Difference and Similarity"

40Shell, PythonMar 1, 20251 years ago

Similar Papers

Cite this paper

@article{he2023fewshot,
  title  = {Few-shot Font Generation by Learning Style Difference and Similarity},
  author = {Xiao He and Mingrui Zhu and Nannan Wang and Xinbo Gao and Heng Yang},
  year   = {2023},
  eprint = {2301.10008},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2301.10008v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2301.10008.svg)](https://codeofpaper.com/paper/2301.10008)

Discussion