# Microbial Colony Detection Based on Deep Learning
## 4 Experiment
### Analysis and Evaluation
The AP and AR values in bold are the best, and the underlined values are the second best. We utilize a patch image containing only _E. coli_ colonies as the input and employ the pre-trained experimental models. The comparison results of the predictions from different models are illustrated in Figure 5. By combining these results with the data presented in Table 2 and Figure 6, it becomes evident that the detection effects (bounding box and confidence) of the various models on _E. coli_ colonies displayed in the output image are similar to those shown in the AP values table for _E. coli_. In particular, Faster R-CNN with ResNet50 yields the poorest performance, producing multiple bounding boxes with low confidence in the prediction results. Contrarily, Cascade Mask R-CNN with Swin-S and Swin-B both perform well, demonstrating more consistent prediction results. These findings suggest that deep learning models employing Swin Transformer can indeed improve the accuracy of microbial colony detection to a certain extent. Figure 4: The architectures of Faster R-CNN and Cascade R-CNN. “conv” is backbone convolution, “P” is region-wise feature extraction, “H” is network head, “B” is bounding box, “C” is classification, and “B0” is proposals in all architectures. Figure 3: 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. As depicted in Figure 7, apart from conducting a direct image-based prediction evaluation, we additionally visualize and compare the detection performance of each model by plotting their corresponding PR curves. In these curves, the recall and precision are represented by the horizontal and vertical coordinates, respectively. Higher detection rates and accuracy are shown by the PR curves that are closer to the upper-right corner of the screen. Specifically, we plot the IoU [0.50:0.05:0.95] curves for the different models, and upon observation, we find that the Cascade Mask R-CNN with Swin-B model outperforms the other models in terms of detection accuracy. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Model** & \multicolumn{2}{c}{**Cascade Mask R-CNN**} & \multicolumn{2}{c}{**Mask R-CNN**} & \multicolumn{2}{c}{**Cascade R-CNN**} & \multicolumn{2}{c}{**Faster R-CNN**} \\
**Backbone** & **Swin-B** & **Swin-S** & **HRNet** & **Swin-T** & **HRNet** & **HRNet** & **ResNet50** & **HRNet** & **ResNet50** \\ \hline _S. aureus_ & 0.736 & 0.746 & 0.715 & 0.722 & 0.707 & 0.733 & 0.717 & 0.694 & 0.722 \\ _B. subtilis_ & 0.531 & 0.520 & 0.507 & 0.508 & 0.479 & 0.494 & 0.474 & 0.402 & 0.466 \\ _P. aeruginosa_ & 0.604 & 0.603 & 0.585 & 0.577 & 0.547 & 0.579 & 0.472 & 0.411 & 0.474 \\ _E. coli_ & 0.426 & 0.422 & 0.398 & 0.406 & 0.358 & 0.393 & 0.424 & 0.353 & 0.421 \\ _C. albicans_ & 0.772 & 0.753 & 0.757 & 0.752 & 0.743 & 0.761 & 0.729 & 0.697 & 0.736 \\ mAP & 0.614 & 0.609 & 0.592 & 0.593 & 0.567 & 0.592 & 0.563 & 0.511 & 0.564 \\ \hline \hline \end{tabular} Note: AP: at IoU = 0.50:0.05:0.95.  
\end{table} 
Table 2: Five microbial colonies’ average precision results for Faster R-CNN, Cascade R-CNN, Mask R-CNN, and Cascade Mask R-CNN with ResNet50, HRNet, and Swin Transformer backbone using AGAR dataset. Figure 5: The comparison results of the predictions from different models. The input image is a patch image of four _E. coli_ colonies, and Cascade R-CNN with Swin-S and Swin-B can completely and correctly frame the target colonies. As shown in Table 2 and Figure 6, the images of the colony samples that we used in the training model can be categorized into five kinds. Among the different models evaluated, Cascade Mask R-CNN with Swin-B demonstrates superior detection accuracy for each strain of bacteria. In addition, it can be found that the AP calculated for each microbe species reveals that microbes forming smaller colonies, such as _S. aureus_ and _C. albicans_, achieve higher precision.