## 3 Experiment
### Result and Discussion  
In this study, real-time protozoa detection was realized by using YOLOv4 on Darknet-53 framework. The evaluation of the study is performed by average accuracy, average precision, average sensitivity, f1-score, and mAP metrics. The class-based average precision values were also obtained and are shown in Table 2. Class-8 has the highest precision rate among classes. The evaluation metrics of the system for YOLOv4 method are f1-score 95%, precision 92%, sensitivity 98%, and mean Average Precision (mAP) 97.52% values shown in Table 2.  
Table 3 shows class average precision values belonging to eight different classes. Average precision value of Class-3 (Colpoda) is 92.37% with 419 true positive and 58 false positive values. Colpoda protozoa has the lowest mAP value by YOLOv4 due to the similarity in shape with some other protozoan types. This is the lowest perception among all classes. Class-8 (Hypotrich Ciliate) achieved the highest mAP value among all classes.  
YOLOv4 creates bounding boxes of detected objects. Figure 6 shows the IoU bounding box values of the protozoa classes. As seen in the figure, the places marked with red boxes show the Bdelloid Rotifera, blue boxes show the Paramecium, yellow boxes show the Stylonychia Pustulata, green boxes show the Clathrulina Elegans. These boxes show the highest confidence score among cross-probability maps. For example, Bdelloid Rotifera was detected on the image 96-98% of the time, even though the bacterium is constantly on the move and constantly changes its shape, as shown in Figure 6.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **F1-Score** & **Precision** & **Sensitivity** & **mAP** \\ \hline YOLOv4 & 0.95 & 0.92 & 0.98 & 0.9752 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance evaluation values of protozoa detection.  
Figure 7 displays the calculated mAP values of the valid data together with the loss function graph on the training iteration axis; as the model becomes more trained and learns to accept YOLO, the loss value drops. Typically, mAP climbs during the first few training iterations before falling as a result of the deep learning model overfitting after a given amount of training. Figure 7 shows the accuracy and loss rates after finishing training on valid bacterial classes data. YOLOv4 achieved an average accuracy of 97% and a loss value of 1.3792 with 0.5 IoU threshold value. The proposed YOLOv4 model misclassified 52 of 2063 objects out of 900 images in the test class. This result shows that the object detection accuracy of the YOLOv4 is quite high.  
Table 4 indicates the Faster R-CCN and SSD-based deep learning models, compared according to setting the batch size to 64. The optimal batch size was chosen from alternative values to reach the global optimum and the correct gradient value for our model. The most significant accuracy was achieved by YOLOv4 with a precision of 0.9752, FPS of 5. The FPS seems to be a bit low, but this can be increased with batch size and modifications to the model. But, in this case, there may be problems like global optimum and correct gradient value values. And, it may learn noise and it may get stuck at the local optimum and never reach the global optimum.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline \multirow{2}{*}{**Classes**} & **AP** & **TP** & **FP** \\  & **(Average Precision)** & **(True Positive)** & **(False Positive)** \\ \hline Class-1 (Stylonychia Pustuala) & 97.13\% & 559 & 81 \\ \hline Class-2 (Bdelloid Rotifera) & 97.77\% & 357 & 7 \\ \hline Class-3 (Colpoda) & 92.37\% & 419 & 58 \\ \hline Class-4 (Paramecium) & 98.91\% & 324 & 6 \\ \hline Class-5 (Clathrulina Elegans) & 95.32\% & 30 & 1 \\ \hline Class-6 (Coscinodiscus) & 100\% & 131 & 0 \\ \hline Class-7 (Lepocnclis Acus) & 98.91\% & 92 & 9 \\ \hline Class-8 (Hypotrich Cliate) & 99.78\% & 107 & 3 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Training results per class with YOLOv4.  
Figure 6: Protozoa species detection test image.