# Automated Detection and Classification of Returnable Packaging Based on YOLOV4 Algorithm
## 3 Results and Discussion
### Results  
As previously stated, the obtained results are classified into four cycles. Based on the obtained results, it is evident that during the first 1200 iterations the loss curve has a higher value and it is greater than 2000. When reaching the 1200 th iteration, there is a rapid reduction of the average loss curve until the 1800 th iteration. From that moment on, the loss curve drops linearly until the final iteration. In the last defined iteration of training, the final \begin{table}
\begin{tabular}{l c c c c c c c c c} \hline \hline
**Max Batches** & \multicolumn{8}{c}{**6000**} \\ \hline
**Activation Function** & \multicolumn{2}{c}{**Linear**} & \multicolumn{3}{c}{**ReLu**} & \multicolumn{3}{c}{**Mish**} \\ \hline
**Train/test ratio** & 70/30 & 75/25 & 80/20 & 70/30 & 75/25 & 80/20 & 70/30 & 75/25 & 80/20 \\ \hline
**mAP** & 60.18\% & 59.85\% & 59.11\% & 93.12\% & 94.17\% & 94.16\% & 94.25\% & 93.25\% & 92.26\% \\ \hline
**F1 score** & 0.52 & 0.48 & 0.47 & 0.87 & 0.85 & 0.81 & 0.86 & 0.84 & 0.83 \\ \hline
**Average IoU** & 29.98\% & 28.82\% & 28.14\% & 62.18\% & 60.49\% & 58.21\% & 61.52\% & 60.77\% & 59.98\% \\ \hline
**Precision** & 0.44 & 0.41 & 0.40 & 0.84 & 0.79 & 0.75 & 0.81 & 0.78 & 0.76 \\ \hline
**Recall** & 0.64 & 0.59 & 0.58 & 0.92 & 0.92 & 0.90 & 0.93 & 0.92 & 0.92 \\ \hline
**Average Loss** & 2.6178 & 2.4873 & 2.4285 & 1.1888 & 1.1897 & 1.2689 & 1.1770 & 1.2203 & 1.2406 \\ \hline
**Max Batches** & \multicolumn{8}{c}{**8000**} \\ \hline
**Activation Function** & \multicolumn{2}{c}{**Linear**} & \multicolumn{3}{c}{**ReLu**} & \multicolumn{3}{c}{**Mish**} \\ \hline
**Train/test ratio** & 70/30 & 75/25 & 80/20 & 70/30 & 75/25 & 80/20 & 70/30 & 75/25 & 80/20 \\ \hline
**mAP** & 94.51\% & 93.17\% & 91.27\% & 99.77\% & 96.17\% & 95.93\% & 99.71\% & 99.70\% & 99.65\% \\ \hline
**F1 score** & 0.59 & 0.70 & 0.76 & 0.98 & 0.97 & 0.97 & 0.98 & 0.97 & 0.98 \\ \hline
**Average IoU** & 60.11\% & 57.15\% & 52.27\% & 80.75\% & 78.12\% & 77.63\% & 79.80\% & 81.24\% & 81.25\% \\ \hline
**Precision** & 0.53 & 0.64 & 0.72 & 0.97 & 0.97 & 0.96 & 0.98 & 0.97 & 0.97 \\ \hline
**Recall** & 0.69 & 0.79 & 0.80 & 0.99 & 0.98 & 0.99 & 0.99 & 0.99 & 0.99 \\ \hline
**Average Loss** & 1.8411 & 1.7828 & 2.0389 & 0.9096 & 0.8660 & 0.9215 & 0.9443 & 0.9091 & 0.9145 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Overall overview of the results obtained through this research for first two cycles. value of the average loss is obtained, shown in Tables 4 and 5. The above analysis refers to all trained models of this research. Appendix A represents the average loss charts for 6000, Appendix B for 8000, Appendix C for 10,000, and Appendix D for 20,000 max batches. Appendix A and B represents Linear activation function. Appendixs A, B, C.1 and D.1 represents ReLU. The final Mish activation function represents Appendixs A, B, C.2 and D.2 appendix subsections. The results of the first and second training cycles, i.e., are given in Table 4. Linear, ReLU, and Mish activation functions were used in 70/30,75/25, and 80/20 train/test ratios. All models were evaluated with mAP, F1 score, Average IoU, Precision, Recall, and Average loss metrics. In the first part of the first training cycle for the Linear activation function with 70/30, 75/25, and 80/20 train test ratios, the following results were obtained: mAP was between 59.11% and 60.18%, F1 score was in a range between 0.47 and 0.52, Average IoU varied between 28.1% and 29.98%, the Precision score was between 0.40 and 0.44 while the Recall and Average loss in between 0.58 and 0.64 and 2.4285 and 2.6178. Progress in obtaining the final amount of Average loss can be seen in the Loss charts given in Appendix A.1. The second part of the first training cycle for ReLU activation function evaluation metrics is changed for all tree train/test ratios. The mAP was between 94.16% and 95.12%, the F1 score was between 0.81 and 0.87, while the Precision and Recall had similar values where the minimum value was 0.75 and the maximum was 0.93, the best Average IoU is 62.18% and the worst 58.21%.