

 MGP-STR architecture. Taken from the original paper. 
MGP-STR is trained on two synthetic datasets MJSynth (MJ) and SynthText (ST) without fine-tuning on other datasets. It achieves state-of-the-art results on six standard Latin scene text benchmarks, including 3 regular text datasets (IC13, SVT, IIIT) and 3 irregular ones (IC15, SVTP, CUTE).
This model was contributed by yuekun. The original code can be found here.
Inference example
[MgpstrModel] accepts images as input and generates three types of predictions, which represent textual information at different granularities.
The three types of predictions are fused to give the final prediction result.
The [ViTImageProcessor] class is responsible for preprocessing the input image and
[MgpstrTokenizer] decodes the generated character tokens to the target string. The
[MgpstrProcessor] wraps [ViTImageProcessor] and [MgpstrTokenizer]
into a single instance to both extract the input features and decode the predicted token ids.