# A Baseline for General Music Object Detection with Deep Learning
## 4 Experimental Setup
### Evaluation  
As stated in Section 3, our formulation expects models to provide a set of detection proposals, each of which consists of a bounding box and the recognized class of the object therein. The models are also expected to provide a score of their confidence for each proposal. A bounding box proposal \(B_{p}\) is considered a positive sample if it overlaps with the ground-truth bounding box \(B_{g}\) according to the Intersection over Union (IoU) criterion  
\[\frac{\text{area}(B_{p}\cap B_{g})}{\text{area}(B_{p}\cup B_{g})}\]  
exceeding a certain threshold (\(t_{\text{IoU}}\)). If the predicted category matches the actual category of the object, it is considered a true positive (TP), being otherwise a false positive (FP). Additional detections of the same object are considered as false positives as well. Those ground-truth objects for which the model makes no proposal are considered false negatives (FN). From these values, precision (P) and recall (R) metrics can be computed as  
\[P=\frac{TP}{TP+FP},\ R=\frac{TP}{TP+FN}.\]  
Figure 4: Scatter plot (**top**) row and density plot (**bottom**) row of the normalized object sizes for the considered corpora to illustrate the challenges of each dataset (best viewed in color). Each point in the top row depicts one instance from the dataset with the color encoding the respective class. The width and height of a sample are reported as the fraction of the full image size.  
\(P\) measures how reliable detections are (ratio of correct detections), whereas \(R\) measures the ability of the model to detect symbols (ratio of detected symbols).  
Object detection can be seen as a retrieval task, in which bounding boxes are ordered by their associated scores. Then, P and R can be computed as previously described from the top \(k\) predictions. However, different values of P and R are obtained by varying the parameter \(k\). To obtain a single metric encompassing the performance of the model, the average precision (AP) can be computed, which is defined as the area under the precision-recall curve for all possible values of \(k\).  
A single AP value is obtained independently for each class, and then the mean AP (mAP) is computed as the average across all classes. Since our problem is highly unbalanced with respect to the number of objects of each class, we also compute the weighted mAP (w-mAP), in which the mean value is weighted according to the frequency of each class. The difference between mAP and w-mAP gives a quick idea of how the evaluated models deal with the rare classes.  
When \(t_{\text{IoU}}\) is set to 50%, the described evaluation protocol matches the _PASCAL Visual Object Classes (VOC)_ challenge [52]. The accuracy of the localization is especially important for OMR, as objects are often packed densely. Failing to locate them correctly heavily affects the subsequent recognition. To account for this, we average mAP and w-mAP over different values of \(t_{\text{IoU}}\), ranging from 50% to 95% by steps of 5%. This evaluation protocol is taken from the COCO challenge [17], and it is expected to provide figures that are more sensitive to precise symbol localization.