The demo expects the following model in the Intermediate Representation (IR) format:
It can be your own models or pre-trained model from OpenVINO Open Model Zoo. In the
models.lst are the list of appropriate models for this demo that can be obtained via
Model downloader. Please see more information about
Model downloader here.
The demo workflow is the following:
The demo first reads an image and performs the preprocessing such as resize and padding. Then after loading model to the plugin, the inference will start. After decoding the returned indexes into characters, the demo will display the predicted text.
The demo depends on:
To install all the required Python modules you can use:
### Command line arguments
designated_characters argument is provided, if the output character is not included in the designated characters, the script will check Top k steps in looking up the decoded character, until a designated one is found. By doing so, the output character will be restricted to a designated region. K is set to 20 by default.
For example, if we want to restrict the output characters to only digits and hyphens, we need to provide the path to the designated character file, e.g.
digit_hyphen.txt. Then the script will perform a post-filtering processing on the ouptut characters, but please note that it is possible that other characters are still allowed if none of
digit_hyphen.txt is in first K chosen elements.
The command line:
The application uses the terminal to show resulting recognition text and inference performance.