The demo shows an example of using neural networks to detect and recognize printed text rotated at any angle in various environment. You can use the following pre-trained models with the demo:
text-detection-0003
, which is a detection network for finding text.text-detection-0004
, which is a lightweight detection network for finding text.horizontal-text-detection-0001
, which is a detection network that works much faster than models above, but it is applicable to finding more or less horizontal text only.text-recognition-0012
, which is a recognition network for recognizing text.handwritten-score-recognition-0001
, which is a recognition network for recognizing handwritten score marks like <digit>
or <digit>.<digit>
.For more information about the pre-trained models, refer to the model documentation.
On the start-up, the application reads command line parameters and loads one network to the Inference Engine for execution. Upon getting an image, it performs inference of text detection and prints the result as four points (x1
, y1
), (x2
, y2
), (x3
, y3
), (x4
, y4
) for each text bounding box.
If text recognition model is provided, the demo prints recognized text as well.
NOTE: By default, Open Model Zoo demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the demo application or reconvert your model using the Model Optimizer tool with
--reverse_input_channels
argument specified. For more information about the argument, refer to When to Reverse Input Channels section of Converting a Model Using General Conversion Parameters.
Running the application with the -h
option yields the following usage message:
Running the application with the empty list of options yields the usage message given above and an error message.
To run the demo, you can use public or pre-trained models. To download the pre-trained models, use the OpenVINO Model Downloader. The list of models supported by the demo is in the models.lst
file in the demo's directory.
NOTE: Before running the demo with a trained model, make sure the model is converted to the Inference Engine format (*.xml + *.bin) using the Model Optimizer tool.
For example, use the following command line command to run the application:
The demo uses OpenCV to display the resulting frame with detections rendered as bounding boxes and text.
NOTE: On VPU devices (Intel® Movidius™ Neural Compute Stick, Intel® Neural Compute Stick 2, and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs) this demo is not supported with any of the Model Downloader available topologies. Other models may work incorrectly on these devices as well.