Contour Completion by Transformers and Its Application to Vector Font Data

Yusuke Nagata,Brian Kenji Iwana,Seiichi Uchida
2023-04-27
Abstract:In documents and graphics, contours are a popular format to describe specific shapes. For example, in the True Type Font (TTF) file format, contours describe vector outlines of typeface shapes. Each contour is often defined as a sequence of points. In this paper, we tackle the contour completion task. In this task, the input is a contour sequence with missing points, and the output is a generated completed contour. This task is more difficult than image completion because, for images, the missing pixels are indicated. Since there is no such indication in the contour completion task, we must solve the problem of missing part detection and completion simultaneously. We propose a Transformer-based method to solve this problem and show the results of the typeface contour completion.
Graphics,Computer Vision and Pattern Recognition,Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the **Contour Completion task**, especially in the case where there are missing points in vector character contour data. Specifically: 1. **Problem Description**: - In documents and graphics, contours are a commonly used format to describe specific shapes. For example, in the True Type Font (TTF) file format, contours are used to describe the vector contours of font shapes. - Each contour is usually defined as a series of points, but in some cases, these points may be missing. The goal of the paper is to generate a complete contour from a given contour sequence with missing points. 2. **Problem Difficulties**: - Unlike the image completion task, the contour completion task has no clear indication of which parts are missing. Therefore, it is necessary to solve the problems of detecting and completing the missing parts simultaneously. - Specifically, the contour completion task is more difficult than the image completion task because the missing pixels in an image are usually clearly indicated by masks or fixed pixel values (such as gray or negative values), while there is no such indication in the contour completion task. 3. **Solution**: - The paper proposes a Transformer - based encoder - decoder model to solve this problem. This model can handle variable - length sequences and can capture the global and local structures in character contours through the self - attention mechanism. - The Transformer model is trained to convert an input character contour sequence with missing control points into a complete contour sequence. 4. **Application Value**: - This method has important applications in font design and character restoration. For example, in the process of converting bitmap character information into vector contour information, if the character parts are overlapped, hidden, damaged or incomplete, automatic contour completion can help improve the result quality. - In addition, this method can also be used to automatically complete the missing parts in font design without all contour points. In summary, this paper aims to solve how to generate a complete contour from vector character contour data with missing points without clear indication, and proposes an innovative Transformer - based method to achieve this goal.