# Lightweight Attention Pyramid Network for Object Detection and Instance Segmentation
## 4 Results and Discussion
### Experiment on the MS COCO Dataset  
We experimented on the Mask R-CNN [18] baselines, re-implemented based on the Tensorflow. All pre-trained models that we used in experiments are publicly available. We replaced FPN with APN during training, where the corresponding models were pre-trained from ImageNet. We adopted the same end-to-end training as in the Mask R-CNN; however, we chose slightly different hyperparameters. We took two images in one image batch for training and used two NVidia TitanX GPUs (one image per GPU). The shorter and longer edges of the images were 800 and 1333, if not otherwise noted. For object detection, we trained our model with a learning rate that starts from 0.01, which decreased by a factor of 0.1 after 960 k and 1280 k iterations and finally terminated at 1440 k iterations. This training schedule resulted in 12.17 epochs over the 118,287 images in the MS COCO 2017 training dataset. The rest of the hyperparameters remained the same as the Mask R-CNN. We evaluated the performance of the proposed APN on the MS COCO dataset and compared the test-dev results with the recent state-of-art models with different feature map fusion methods. The results of our proposed ResNet-50 based APN are presented in Table 1. As shown in Table 1, our model, trained and tested on single-scale images, outperforms the baselines by a large margin over all of the compared evaluation metrics. Especially, it represents an improvement of 1.8 points for the \(AP\) when compared to the original module. In Table 1, when the FPN is applied to the Mask R-CNN, the best effect is achieved in the related baseline methods. The ResNet-100 is used by the network as the backbone network, and ResNet-100 can usually achieve better recognition than ResNet-50 [21]. The backbone network of Our APN is ResNet-50, but it still achieved a better effect than the FPN applied to the Mask R-CNN, which uses ResNet-100 as the backbone network. Therefore, our APN network is more effective than FPN in object recognition. In addition, we plotted the performance comparison curves for the APN and baseline methods. In Figure 4, the abscissa is the threshold of IoU, and the ordinate is the AP value of the APN and baseline methods. We use different color polylines to distinguish different methods. Obviously, we can see that the APN proposed by us has higher AP values than any other methods in any threshold range. \begin{table}
\begin{tabular}{c c c c c c c c} \hline  & **AP** & \(\mathbf{AP_{00.5}}\) & \(\mathbf{AP_{00.75}}\) & \(\mathbf{AP_{5}}\) & \(\mathbf{AP_{M}}\) & \(\mathbf{AP_{L}}\) & **Backbone** \\ \hline YOLOv3 [42] + FPN & 33.0 & 57.9 & 34.4 & 18.3 & 35.4 & 41.9 & DarkNet-53 [43] \\ RentinaNet [44] + FPN & 39.1 & 59.1 & 42.3 & 21.8 & 42.7 & 50.2 & ResNet-101 \\ Faster R-CNN + FPN & 36.2 & 59.1 & 39.0 & 18.2 & 39.0 & 48.2 & ResNet-101 \\ Faster R-CNN + G-RMI [45] & 34.7 & 55.5 & 36.7 & 13.5 & 38.1 & 52.0 & Inception-ResNet-v2 [46] \\ Faster R-CNN + TDM [47] & 36.8 & 57.7 & 39.2 & 16.2 & 39.8 & 52.1 & Inception-ResNet-v2 \\ Mask R-CNN + FPN & 38.2 & 60.3 & 41.7 & 20.1 & 41.1 & 50.2 & ResNet-101 \\ Mask R-CNN + FPN & 39.8 & 62.3 & 43.4 & 22.1 & 43.2 & 51.2 & ResNeXt-101 [48] \\ \hline Mask R-CNN + APN & **41.0** & **63.6** & **44.3** & **22.8** & **44.1** & **52.7** & ResNet-50 \\ \hline \end{tabular}
\end{table} 
Table 1: Comparisons of **single model** results on the MS COCO object detection benchmark. Figure 4: Mean Average Precision of the proposed APN-based model and FPN-based models in different threshold. Figure 5 shows the comparison of the methods based on our model and the FPN. According to the results, we can see that our improvement model detects more qualitative objects, which means our model can detect those objects that highly overlap, but that belong to different individuals. The design of our models takes advantage of the contextual information from the whole feature pyramid to fulfill the object detection. Then, we performed the instance segmentation experiments on the COCO dataset.