# Microbial Colony Detection Based on Deep Learning
## 4 Experiment
### Analysis and Evaluation  
In this section, we discuss the performance of Faster R-CNN, Mask R-CNN, Cascade R-CNN, and Cascade Mask R-CNN using different backbones. The experimental results are shown in Table 1, and we use the Faster R-CNN architecture with ResNet50 as the baseline to evaluate the Swin Transformer, which incorporates the window self-attention mechanism. Additionally, we extend the base model to compare the training performance of Cascade Mask R-CNN with the other architectures in detecting colony objects in images. Table 1 and Figure 3 summarize the experimental results of different network configurations. The Cascade Mask R-CNN model with Swin-B achieves the highest performance (compared to Cascade Mask R-CNN with HRNet), outperforming the other configurations in mAP (+2.2%), mAPs (+0.6%), mAPm (+3.7%), mAP1 (1.6%), and AR (+1.6%). The integration of the Swin Transformer module significantly enhances the model's accuracy for microbial colony detection. The success of the W-MSA and SW-MSA methods in extracting edge information from feature images is evident, particularly for detecting colonies near the Petri dish edges. The comparative results emphasize the importance of using advanced self-attention mechanisms in object detection, especially for the accurate identification of microbial colonies in complex images. Experiments on the AGAR dataset are conducted on both Faster R-CNN and Cascade R-CNN. We also repeat the experiments and obtain similar results. Cascade R-CNN is an extension of Faster R-CNN, where a cascade operation is added after RoI Align, as illustrated in Figure 4. The cascade operation involves passing the outputs of the previous level to the next level with an additional classifier. This process is repeated through multiple stages, with each stage refining the bounding box proposals. The cascading of classifiers and bounding box regressors in multiple stages allows for better localization and filtering of proposals, leading to improved accuracy in object detection. From the experimental results, using ResNet50 and HRNet as the backbone, Cascade R-CNN shows 4.9% and 2.8% improvement in the mAP over Faster R-CNN, respectively. Hence, aiming to enhance the detection accuracy further, we employ the Cascade Mask R-CNN model, which incorporates the segmentation component of Mask R-CNN into the Cascade R-CNN framework. To validate the augmentation of detection capabilities, we integrate the Swin Transformer module into this refined model. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Model** & **Backbone** & **Flops (G)** & **Params (M)** & **mAP** & **AP50** & **AP75** & **mAPs** & **mAPm** & **mAP1** & **AR** \\ \hline Faster & ResNet50 & 50.38 & 41.14 & 0.511 & 0.760 & 0.542 & 0.008 & 0.354 & 0.484 & 0.581 \\ R-CNN & HRNet & 70.44 & 46.90 & 0.564 & 0.791 & 0.605 & 0.012 & 0.421 & 0.545 & 0.626 \\ Cascade & ResNet50 & 52.41 & 68.94 & 0.563 & 0.783 & 0.615 & 0.016 & 0.397 & 0.560 & 0.613 \\ R-CNN & HRNet & 72.47 & 74.69 & 0.592 & 0.789 & 0.646 & 0.017 & 0.409 & 0.601 & 0.645 \\ Mask & HRNet & 122.00 & 49.52 & 0.567 & 0.782 & 0.611 & 0.013 & 0.386 & 0.572 & 0.628 \\ R-CNN & Swin-T & 103.85 & 47.39 & 0.593 & **0.801** & 0.648 & 0.017 & 0.414 & 0.606 & 0.642 \\ Cascade & HRNet & 227.15 & 82.56 & 0.592 & 0.782 & 0.651 & 0.013 & 0.406 & 0.612 & 0.644 \\ Mask & Swin-S & 576.35 & 105.74 & 0.609 & 0.796 & **0.656** & 0.018 & 0.434 & 0.626 & 0.659 \\ R-CNN & Swin-B & 613.78 & 143.77 & **0.614** & 0.798 & 0.655 & **0.019** & **0.443** & **0.628** & **0.660** \\ \hline \hline \end{tabular} Note: AP: at IoU = 0.50:0.05:0.95; AP50: AP at IoU = 0.50; AP75: AP at IoU = 0.75; APs, AP for small objects: area < 32\({}^{2}\); APm, AP for medium objects: 32\({}^{2}\) < area < 96\({}^{2}\); API, AP for large objects: area > 96\({}^{2}\).  
\end{table} 
Table 1: Comparison results of Faster R-CNN, Cascade R-CNN, Mask R-CNN, and Cascade Mask R-CNN with ResNet50, HRNet, and Swin Transformer backbone using AGAR dataset.