The rectified image received from the rectification network [1]} is fed into this text recognition network \(\mathbf {T}\)  aiming to produce a character sequence \(\mathrm {Y} = \lbrace  y_{1}, y_{2}, ..., y_{K}\rbrace \) , where \(K\)  denotes the variable length of text. Given an image \(\mathrm {I} \in \mathbb {R}^{H\times W\times C}\) , the convolutional feature extractor tries to learn rich visual information and produce a feature map of size \(\mathbb {R}^{H^{\prime }\times W^{\prime }\times D}\) , where \(H^{\prime }\) , \(W^{\prime }\) , and \(D\)  are the height, width and number of channels in the output feature map respectively. That output is reshaped into a sequence of feature vectors \(\mathrm {B} = [b_{1}, b_{2}, ..., b_{L}]\) , where \(L=H^{\prime } \times W^{\prime }\) , and \(b_{i} \in \mathbb {R}^{D}\) . Every D dimensional feature vector \(b_{i}\)  encodes a particular local image region based on its receptive fields. Thereafter a bidirectional-LSTM is employed to capture the long range dependency in both the directions, thus alleviating the constraints of limited receptive fields. It outputs an updated feature sequence of same length, denoted by \(\mathrm {H} \in [h_{1}, h_{2}, ..., h_{L}]\) . Following this \(y_{k}\)  is decoded based on three factors viz; bidirectional-encoder output \(\mathrm {H}\) , the previous internal state \(s_{k-1}\) , and the character \(y_{k-1}\)  predicted in the last step. At time step \(k\) , a recurrent decoder network generates an output vector \(o_{k}\)  and a new state vector \(s_{k}\) , defined as: \(\mathrm {(o_{k}, s_{k}) = RNN(s_{k-1}, [g_{k}, E(y_{k-1})] )}\)  where \(g_{k}\)  is the glimpse vector [1]} that encodes the information from specific relevant parts of the encoded feature \(\mathrm {H}\)  to predict \(y_{k}\) ; \(\mathrm {E}\)  is an embedding layer, and \([\cdot ]\)  signifies a concatenation operation. Here, \(g_{k}\)  is computed as: \(g_{k} = \sum _{i=0}^{L} \left(\frac{\exp (a_{k, i})}{ \sum _{j=0}^{L} \exp (a_{k,j})} \right) h_{i}\)  and, attention score \(\mathrm {a_{k,i} = v^{\top }tanh(W_{s}s_{k-1} + W_{h}h_{i} + b_{a})}\) , where \(\mathrm {v}, \mathrm {W_{s}}, \mathrm {W_{h}}, \mathrm {b_{a}}\)  are the learnable parameters. Finally the current step character \(y_{k}\)  is predicted by: \(\mathrm {p(y_{k}) = softmax(W_{o}o_{k} + b_{o})}\)  where \(W_{o}\)  and \(b_{o}\)  are trainable parameters.
