# Investigating Attention Mechanism for Page Object Detection in Document Images
## 5 Results and Discussion
### IIIt-Ar-13k  
The importance of the attention mechanism is best conveyed with the IIT-AR-13K dataset, as the difference in performance between baseline model and attention-based models is large. The baseline model struggles to interpret the features when similar objects with different labels exist, i.e., figures, signatures, and natural images, whereas the attention-based architecture improves the localization capabilities of the model in comparison with the baseline model, as shown in Table 6. The results contain the estimated label-based and mean mAP scores for tests performed using different variants of the architecture. The comparison with prior methods is not provided, as the dataset is used only for table detection in other articles, unlike our experiments on all the classes.  
The ConvNeXt variant performs the best out of all the combinations of our model, the outputs of which can be visualized in Figure 8. The contrasting differences can be found between the baseline model and the Faster-RCNN+ResNet-50+DyHead variant.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Faster-RCNN**} & \multicolumn{2}{c}{**Faster-RCNN**} & \multicolumn{2}{c}{**Sparse-RCNN**} \\  & **(baseline)** & & **+DyHead** & & **+DyHead** \\ \hline \multirow{2}{*}{**Backbone**} & **ResNet-50** & **ResNet-50** & **ConvNeXt (tiny)** & **Swin (tiny)** & **ResNet-50** \\ \hline \multirow{3}{*}{**Average**} & table & 71.10 & 82.58 & 88.60 & 87.58 & 85.04 \\  & 2.55 & 3.67 & 52.70 & 42.01 & 21.48 \\ \multirow{2}{*}{**Precision**} & figure & 37.45 & 39.96 & 64.01 & 64.69 & 51.10 \\  & signature & 17.73 & 43.38 & 66.17 & 66.75 & 53.56 \\ \multirow{2}{*}{**(AP)**} & natural\_image & 37.67 & 52.81 & 77.21 & 82.16 & 81.22 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Performance evaluations of IIIT-AR-13K using Faster-RCNN with different backbones. Results with Sparse-RCNN using ResNet-50 backbone are also presented. The baseline model fails to achieve robustness with this dataset. Nevertheless, inclusion of DynamicHead improves the mAP score by 11.18 in comparison with baseline, confirming the drastic improvements with attention mechanism. The results are further improved with ConvNeXt backbone with the mAP score roughly double the baseline score, i.e., 33.30 to 69.74.  
Figure 7: Detection results of PublayNet from baseline, Faster-RCNN+ResNet-50+DyHead, and the Faster-RCNN+ConvNeXt+DyHead model. The colors blue, black, and green represent paragraphs, tables, and figures, respectively. (**a**) The samples obtained from the baseline model with Faster-RCNN using ResNet-50 as the backbone. (**b**) The samples obtained with the attention mechanism incorporated into the pipeline of the baseline model. (**c**) The detections by Faster-RCNN+ConvNeXt+DyHead model. The detections are clean and accurate with the inclusion of the attention mechanism. Furthermore, DyHead and ConvNeXt prove to detect the objects better compared to its counterparts with fewer nested detections.  
However, the detections are similar between Faster-RCNN+ResNet-50+DyHead and Faster-RCNN+ConvNeXt+DyHead models. Nevertheless, when the granular details are compared, the ConvNeXt variant computes bounding boxes more accurately. Table 7 shows the F1-score, Precision, and Recall for IoU level values of 0.5 to 0.9, computed for the RCNN+ConvNeXt+DyHead model. It can be observed that the model is not robust enough to localize the objects when high level of overlap is expected between ground-truth and computed bounding boxes, i.e., at IoU levels 0.8 and 0.9.