## 3 Methodology
### Recognition Architectures
#### 3.2.1 Baseline Approach  
A CTC-trained CRNN is considered the state-of-the-art for the holistic approach in OMR, having been successfully applied in a number of work in the literature [12; 16; 20; 28]. As aformentioned, this architecture models the posterior probability of generating a sequence of output symbols given an input image.  
A CRNN is formed by an initial block of _convolutional_ layers followed by another group of _recurrent_ stages [28]. In such a particular configuration, the _convolutional_ block is meant to learn adequate features for the case at issue, while the set of _recurrent_ layers model the temporal or spatial dependencies of the elements from the initial feature-learning block.  
The network is trained using the commented upon Connectionist Temporal Classification (CTC) training function [35], which allows for training the CRNN scheme using unsegmented sequential data. In our case, this means that, for a given staff image \(x_{i}\in\mathcal{X}\), we only have its associated sequence of characters \(\mathbf{z}_{i}\in\mathcal{Z}\) as its expected output, without any correspondence at the pixel level or similar input-output alignment. Due to its particular training procedure, CTC requires the inclusion of an additional \"_blank_\" symbol within the \(\Sigma\) vocabulary, i.e., \(\Sigma^{\prime}=\Sigma\cup\{blank\}\).  
During the prediction or decoding phase, CTC assumes that the architecture contains a fully connected network with \(|\Sigma^{\prime}|\) outputs and a _softmax_ activation. While there exist several possibilities for performing this inference phase [36], we resort to so-called _greedy_ decoding for comparative purposes with the considered baseline works. Assuming that the recurrent layer outputs sequences of length \(K\), this approach retrieves the most probable symbol per step. Equation (1) mathematically describes this process.  
\[\mathbf{\pi}=\arg\max_{\mathbf{\pi}\in\Sigma^{\prime}}\prod_{k=1}^{K}y_{\pi_{k}}^{k} \tag{1}\]  
where \(y_{\pi_{k}}^{k}\) represents the activation probability of symbol \(\pi_{k}\) and time-step \(k\) and where \(\mathbf{\pi}\) is the retrieved sequence of length \(K\).  
Eventually, a \(\mathcal{B}(\cdot)\) squash function that merges consecutive repeated symbols and removes the _blank_ label is applied to the \(\mathbf{\pi}\) sequence obtained as an output of the recurrent layer. Thus, the actual predicted sequence is obtained as \(\mathbf{z}^{\prime}=\mathcal{B}(\mathbf{\pi})\), where \(|\mathbf{z}^{\prime}|\leq K\).  
In this work, we consider as the baseline the particular CRNN configuration proposed in the work by [PERSON] et al. [20]. This neural model comprises four convolutional layers for the feature extraction process followed by two recurrent units for the dependency modeling. As commented upon, the output of the last recurrent layer is connected to a dense unit with \(|\Sigma^{\prime}|\) output neurons. A graphical representation of this configuration is depicted in Figure 2.  
It must be finally noted that the different parameters for each layer is commented upon in Section 4, which deals with the actual experimentation carried out.  
Figure 2: Graphical scheme of the CRNN configuration by [PERSON] et al. [20].