Table of contents

CharacterModel Object

A CharacterModel object defines how the library find Convolutional Neural Networks (CNN) models files that support the character recognition.

    "Name": "NumberLetter",
    "DirectoryPath" : "D:\\CharacterModel\\",
    "FilterFilePath" : "D:\\exclude.txt"

The character model files consist of

  • Primary model files (Required): The files that stores the major character recognition models.
  • Auxiliary model files (Optional): Support the recognition when the result output by the major model doesn’t match the RegEx.
  • Filter files (Optional): Set which characters are included or excluded from the text line recognition.


Example of CharacterModel files

The data you input via the CharacterModel is to tell the library how it can find the character model files.

General Usage

In the CharacterModel object, what you have to specify are:

  • Name: Find the model files by the name of the model.
  • DirectoryPath: Where the model files are located.

Exapmle 1: Define a character model

    "Name": "NumberLetter",
    "DirectoryPath" : "D:\\CharacterModel\\"

The library will be able to find all the related files that match the name you input including both the major models and the assist models.

Include Filter File

If you have requirements to exclude any characters, you can configure a filter file and add the file path to your CharacterModel object. An example of a exclude filter file is shown as follow:


Example 2: Add a filter file to your character model

    "Name" : "NumberUppercase",
    "DirectoryPath" : "D:\\CharacterModel\\",
    "FilterFilePath" : "D:\\CharacterModel\\Exclude.txt" // You can define the filter file in the same folder with the model files.

Example 3: Define multiple character models

    "Name" : "VINModel",
    "DirectoryPath" : "D:\\VIN\\",
    "FilterFilePath" : "D:\\VIN\\Exclude.txt"
    "Name" : "MRZModel",
    "DirectoryPath" : "D:\\MRZ\\",
    "FilterFilePath" : "D:\\VIN\\Exclude.txt" // You can define a same filter file for different `CharacterModel` objects.

As a Parameter of TextLineSpecification Object

  • In each TargetROI, you can allocate multiple LabelRecognizer tasks.
  • In each LabelRecognizer task, you can add multiple TextLineSpecification settings.
  • In each TextLineSpecification task, you can specify only one CharacterModel setting.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version (2.2.30)
    • Version 2.x
      • Version 2.2.20
      • Version 2.2.10
      • Version 2.2.0
      • Version 2.0.30
      • Version 2.0.20
      • Version 2.0.10
      • Version 2.0.0
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support