# An Improved Method of Polyp Detection Using Custom YOLOv4-Tiny
## 5 Experimental Results  
To train and test the models to compare with each other, we used Visual Studio 2019 C++ on a PC with an AMD Ryzen 12-core processor of 3.70 GHz, 64 GB RAM, and an Nvidia GeForce RTX 3090 graphics card. We compared the accuracy of our model with that of the previous methods using the metrics of precision, recall, and F-score. Precision indicates the number of positive predictions that are correct as shown in Equation (5),  
\begin{table}
\begin{tabular}{c|c} \hline
**STD** & **Mean** \\ \hline _0.4857, 0.3460, 0.2983_ & 0.2998, 0.2280, 0.2042 \\ \hline \end{tabular}
\end{table}
Table 1: Standard deviation and mean for the training dataset.  
Figure 5: Data augmentation visualization for custom CNN models using random rotation, hue, and brightness. The left side consists of the original dataset, and data augmentation results from the second part of the table.  
whereas recall (Equation (6)) indicates the number of positive cases correctly predicted by the classifier:  
\[\text{precision}=\frac{\text{TP}}{\text{TP}+\text{FP}} \tag{5}\]  
\[\text{recall}=\frac{\text{TP}}{\text{TP}+\text{FN}} \tag{6}\]  
where TP, FN, and FP denote the true positive, false negative, and false positive, respectively. F1 score is calculated based on precision and recall as shown in Equation (7):  
\[\text{F1}=\frac{2\times\text{recall}\times\text{precision}}{\text{recall}\times \text{precision}} \tag{7}\]  
A high F1 score indicates a better performance [37]. The F1-score metric was used to compare the performance of our model with the previous models as presented in Figure 6. It is observed that our model performs better than the other models during both training and testing.  
The above results show that Objectness loss and Classification loss have significant improvement by using a modified version of YOLO. The previous versions of YOLOv3 and YOLOv4 consist of a bigger weight size compared to the new proposed version. Our model weight size is almost the same small size as the YOLOv4-tiny version. Their overall performances are compared in Table 2 with different previous YOLO models.  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Algorithms** & **Input Size** & **Training Accuracy** & **Testing Accuracy** & **Weight Size** & **Iteration Numbers** & **Training Time** \\ \hline YOLOv3 & & 89.1\% & 88.1\% & 236 MB & & 65 h \\ YOLOv3-tiny & & 90\% & 85\% & 33.7 MB & & 24 h \\ Our model & 608 \(\times\) 608 & 99.4\% & 98.2\% & 31.2 MB & 50.000 & 32 h \\ YOLOv4 & & 93.9\% & 90.1\% & 245 MB & & 75 h \\ YOLOv4-tiny & & 89.9\% & 85.5\% & 23 MB & & 29 h \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance comparison results of the YOLO models.  
Figure 6: Training results of precious and proposed methods compared with Box loss, Objectness loss, Classification loss, Precision, and Recall.  
Our new augmentation method helped to increase both the training and testing accuracy from the above results, and a small disease area was even detected and classified with the new custom YOLOv4-tiny architecture. Figure 7 shows the detection and classification result with the test image.