# US 2026/0188037 A1 · Font recognition method, apparatus, readable medium and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0188037 A1
- Document ID: US20260188037A1
- Status: Published application
- Kind: A1
- Application number: 18/727,952
- Filed: 2022-12-14
- Published: 2026-07-02
- Earliest claimed: 2022-01-10
- Assignees: Beijing Youzhuju Network Technology Co., Ltd.
- Applicants: Beijing Youzhuju Network Technology Co., Ltd.
- Inventors: Yongjie YE; Can HUANG
- Web page: https://patentgrep.com/patent/US20260188037A1

## CPC

- G06V 30/19093: {Proximity measures, i.e. similarity or distance measures}
- G06V 30/245: {Font recognition}
- G06F 18/241: relating to the classification model, e.g. parametric or non-parametric approaches
- G06F 18/24133: {Distances to prototypes}
- G06V 10/26: Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V 10/44: Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V 10/761: {Proximity, similarity or dissimilarity measures}
- G06V 10/774: Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
- G06V 10/82: using neural networks
- G06V 30/18019: {by matching or filtering}
- G06V 30/1914: {Determining representative reference patterns, e.g. averaging or distorting patterns; Generating dictionaries, e.g. user dictionaries}
- G06V 30/19147: {Obtaining sets of training patterns; Bootstrap methods, e.g. bagging or boosting}
- G06V 30/19173: {Classification techniques}
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/08: Learning methods
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present disclosure relates to a font recognition method, device, readable medium and electronic equipment. The font recognition method divides the image to be recognized into a plurality of sub-images through the predetermined font recognition model, and obtains the first image corresponding to each sub-image. Image features, determine the second image features corresponding to the image to be recognized based on the first image features corresponding to each sub-image of the image to be recognized, the second image features include each sub-image of the image to be recognized and the context-related features of other sub-images are used to determine the font type corresponding to the target text based on the second image features. In this way, the image to be recognized can be described more comprehensively and accurately based on the correlation between each word image and other sub-images. This can effectively improve the accuracy of font recognition results and also effectively improve the font recognition rate.

## Claims

### Claim 1

A font recognition method, wherein the method comprises:
obtaining an image to be recognized, the image to be recognized comprising target text;
inputting the image to be recognized into a predetermined font recognition model, to cause the predetermined font recognition model to output a font type corresponding to the target text;
wherein, the predetermined font recognition model is used to: divide the image to be recognized into a plurality of sub-images; obtain a first image feature corresponding to each of the sub-images; determine a second image feature corresponding to the image to be recognized according to the first image feature corresponding to each of the sub-images of the image to be recognized, the second image feature comprising a context association feature between each of the sub-images and other sub-image of the image to be recognized; and determine a font type corresponding to the target text according to the second image feature.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining a font type corresponding to the target text according to the second image feature comprises:
obtaining an Euclidean distance between the second image feature and a representative feature corresponding to each of a plurality of types of recognizable fonts corresponding to the predetermined font recognition model, to obtain a plurality of Euclidean distances between the image to be recognized and representative features of a plurality of types of the recognizable fonts;
determining a minimum target distance from the plurality of Euclidean distances;
determining a font type corresponding to the target text in the image to be recognized according to the target distance.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining a font type corresponding to the target text in the image to be recognized according to the target distance comprises:
in response to the target distance being less than a predetermined distance threshold, determining a target font type corresponding to a target representative feature used to calculate the target distance as a font type of the target text.

### Claim 4 (depends on 2)

The method of claim 2, wherein determining a font type corresponding to target text in the image to be recognized according to the target distance comprises:
in response to determining that the target distance is greater than or equal to a predetermined distance threshold, determining a font type corresponding to the target text as a new font.

### Claim 5 (depends on 1)

The method of claim 1, wherein the predetermined font recognition model is further used for:
obtaining a plurality of first font recognition sample images of a target new font, the first font recognition sample image comprising a specified text sample of the target new font;
obtaining a second image feature corresponding to each first font recognition sample image;
obtaining a target mean value of the plurality of second image features corresponding to the plurality of first font recognition sample images, using the target mean value as a target representative feature corresponding to the target new font, and storing the target representative feature.

### Claim 6 (depends on 5)

The method of claim 5, wherein obtaining a plurality of first font recognition sample images of the target new font comprises:
obtaining a specified text sample of the target new font from a predetermined font corpus;
obtaining a target background image from a predetermined background library;
synthesizing the specified text sample and the target background image into the first font recognition sample image.

### Claim 7 (depends on 1)

The method of claim 1, wherein the predetermined font recognition model is trained through:
obtaining a plurality of second font recognition sample images, the plurality of second font recognition sample images comprising annotation data of a plurality of first font types;
using the plurality of second font recognition sample images as a first training data set, pre-training a predetermined initial model to obtain a first undetermined model, the predetermined initial model comprising an initial image segmentation module and an initial multi-head attention module;
obtaining a plurality of third font recognition sample images, the plurality of third font recognition sample images comprising annotation data of a plurality of second font types, the first font type being in consistent with or different from the second font type;
using the plurality of third font recognition sample images as a second training data set, training the first undetermined model to obtain the predetermined font recognition model.

### Claim 8

(canceled)

### Claim 9

A non-transitory computer-readable medium on which a computer program is stored, wherein in response to the program being executed by a processing device, implements the steps of a method comprising:
obtaining an image to be recognized, the image to be recognized comprising target text;
inputting the image to be recognized into a predetermined font recognition model, to cause the predetermined font recognition model to output a font type corresponding to the target text;
wherein, the predetermined font recognition model is used to: divide the image to be recognized into a plurality of sub-images; obtain a first image feature corresponding to each of the sub-images; determine a second image feature corresponding to the image to be recognized according to the first image feature corresponding to each of the sub-images of the image to be recognized, the second image feature comprising a context association feature between each of the sub-images and other sub-image of the image to be recognized; and determine a font type corresponding to the target text according to the second image feature.

### Claim 10

An electronic device, wherein the electronic device comprises:
a storage device, storing a computer program thereon;
a processing device, configured to execute the computer program in the storage device to implement steps of a method comprising:
obtaining an image to be recognized, the image to be recognized comprising target text;
inputting the image to be recognized into a predetermined font recognition model, to cause the predetermined font recognition model to output a font type corresponding to the target text;
wherein, the predetermined font recognition model is used to: divide the image to be recognized into a plurality of sub-images; obtain a first image feature corresponding to each of the sub-images; determine a second image feature corresponding to the image to be recognized according to the first image feature corresponding to each of the sub-images of the image to be recognized, the second image feature comprising a context association feature between each of the sub-images and other sub-image of the image to be recognized; and determine a font type corresponding to the target text according to the second image feature.

### Claim 11 (depends on 9)

A non-transitory computer-readable medium of claim 9, wherein determining a font type corresponding to the target text according to the second image feature comprises:
obtaining an Euclidean distance between the second image feature and a representative feature corresponding to each of a plurality of types of recognizable fonts corresponding to the predetermined font recognition model, to obtain a plurality of Euclidean distances between the image to be recognized and representative features of a plurality of types of the recognizable fonts;
determining a minimum target distance from the plurality of Euclidean distances;
determining a font type corresponding to the target text in the image to be recognized according to the target distance.

### Claim 12 (depends on 11)

A non-transitory computer-readable medium of claim 11, wherein determining a font type corresponding to the target text in the image to be recognized according to the target distance comprises:
in response to the target distance being less than a predetermined distance threshold, determining a target font type corresponding to a target representative feature used to calculate the target distance as a font type of the target text.

### Claim 13 (depends on 11)

A non-transitory computer-readable medium of claim 11, wherein determining a font type corresponding to target text in the image to be recognized according to the target distance comprises:
in response to determining that the target distance is greater than or equal to a predetermined distance threshold, determining a font type corresponding to the target text as a new font.

### Claim 14 (depends on 9)

A non-transitory computer-readable medium of claim 9, wherein the predetermined font recognition model is further used for:
obtaining a plurality of first font recognition sample images of a target new font, the first font recognition sample image comprising a specified text sample of the target new font;
obtaining a second image feature corresponding to each first font recognition sample image;
obtaining a target mean value of the plurality of second image features corresponding to the plurality of first font recognition sample images, using the target mean value as a target representative feature corresponding to the target new font, and storing the target representative feature.

### Claim 15 (depends on 14)

A non-transitory computer-readable medium of claim 14, wherein obtaining a plurality of first font recognition sample images of the target new font comprises:
obtaining a specified text sample of the target new font from a predetermined font corpus;
obtaining a target background image from a predetermined background library;
synthesizing the specified text sample and the target background image into the first font recognition sample image.

### Claim 16 (depends on 10)

An electronic device of claim 10, wherein determining a font type corresponding to the target text according to the second image feature comprises:
obtaining an Euclidean distance between the second image feature and a representative feature corresponding to each of a plurality of types of recognizable fonts corresponding to the predetermined font recognition model, to obtain a plurality of Euclidean distances between the image to be recognized and representative features of a plurality of types of the recognizable fonts;
determining a minimum target distance from the plurality of Euclidean distances;
determining a font type corresponding to the target text in the image to be recognized according to the target distance.

### Claim 17 (depends on 16)

An electronic device of claim 16, wherein determining a font type corresponding to the target text in the image to be recognized according to the target distance comprises:
in response to the target distance being less than a predetermined distance threshold, determining a target font type corresponding to a target representative feature used to calculate the target distance as a font type of the target text.

### Claim 18 (depends on 16)

An electronic device of claim 16, wherein determining a font type corresponding to target text in the image to be recognized according to the target distance comprises:
in response to determining that the target distance is greater than or equal to a predetermined distance threshold, determining a font type corresponding to the target text as a new font.

### Claim 19 (depends on 10)

An electronic device of claim 10, wherein the predetermined font recognition model is further used for:
obtaining a plurality of first font recognition sample images of a target new font, the first font recognition sample image comprising a specified text sample of the target new font;
obtaining a second image feature corresponding to each first font recognition sample image;
obtaining a target mean value of the plurality of second image features corresponding to the plurality of first font recognition sample images, using the target mean value as a target representative feature corresponding to the target new font, and storing the target representative feature.

### Claim 20 (depends on 19)

An electronic device of claim 19, wherein obtaining a plurality of first font recognition sample images of the target new font comprises:
obtaining a specified text sample of the target new font from a predetermined font corpus;
obtaining a target background image from a predetermined background library;
synthesizing the specified text sample and the target background image into the first font recognition sample image.

### Claim 21 (depends on 10)

An electronic device of claim 10, wherein the predetermined font recognition model is trained through:
obtaining a plurality of second font recognition sample images, the plurality of second font recognition sample images comprising annotation data of a plurality of first font types;
using the plurality of second font recognition sample images as a first training data set, pre-training a predetermined initial model to obtain a first undetermined model, the predetermined initial model comprising an initial image segmentation module and an initial multi-head attention module;
obtaining a plurality of third font recognition sample images, the plurality of third font recognition sample images comprising annotation data of a plurality of second font types, the first font type being in consistent with or different from the second font type;
using the plurality of third font recognition sample images as a second training data set, training the first undetermined model to obtain the predetermined font recognition model.
