# Deep Learning Methods for Bug Bite Classification: An End-to-End System
## 3 Results
### Bug Bites Classification Results
** A total of three cases were tested with the Inception-v3 model as a base model for transfer learning, specifically using the whole model, cutting the model, and using all the beginning layers until the layer named'mixed4' and similarly, using all the beginning layers until the layer named'mixed7'. Out of these three cases, the most accurate model was the second one, in which only the beginning layers of the model until the'mixed4' layer were used for transfer learning. The additional custom layers, as explained in Section 2.6, were added to the output of the'mixed4' layer. The classification results provided by this model in terms of precision, recall, and F1-score can be seen in Table 12. In the case of images without any bite, the model provides the best precision (90%) and F1-score (88%), with quite a high recall as well (85%). It should also be emphasized that in the case of chigger bites, the precision is fairly high (89%), but at the same time, this class is related to the lowest recall (52%) and F1-score (65%). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Label** & **Precision** & **Recall** & **F1-Score** \\ \hline Ant bites & 0.81 & 0.87 & 0.84 \\ Bed bug bites & 0.75 & 0.82 & 0.79 \\ Bee stings & 0.86 & 0.75 & 0.80 \\ Chigger bites & 0.71 & 0.48 & 0.58 \\ Flea bites & 0.73 & 0.90 & 0.81 \\ Mosquito bites & 0.78 & 0.74 & 0.76 \\ No bites & 0.88 & 0.88 & 0.88 \\ Spider bites & 0.72 & 0.75 & 0.74 \\ Tick bites & 0.65 & 0.69 & 0.67 \\ \hline Accuracy & & & 0.76 \\ Macro-average & 0.77 & 0.76 & 0.76 \\ Weighted average & 0.76 & 0.76 & 0.76 \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Evaluation metrics for VGG16 model. Figure 12: Normalized confusion matrix for VGG16. The accuracy of the model is 77%, whereas the macro average of the precision and recall is 78%, and the macro average of the F1-score is 77%. The weighted average of the precision is 79%, and the weighted recall and F1-score share the same value of 77%. Figure 13 illustrates the normalized confusion matrix of the classification results on the test dataset. The figure shows that the model demonstrates the highest percentage of correctly classified instances when classifying images of ant bites (93%), followed by bites from mosquitoes (89%), fleas (86%), and images with no bites (85%), whereas the lowest percentage is related to the chigger bite class. This model is most likely to confuse tick bites and classify these images as spider bites (16%) and may also mistake chigger bites for bed bug bites (16%). **DenseNet169. ** As mentioned in the previous section, we tried several different variants using the DenseNet169 architecture. The best-performing variant (Table 7) provided the results given in Table 13. From these results, we can notice that regarding class-wise results, DenseNet169 shows the best precision (95%) in case of chigger bite classification. The same class is related to fairly high recall (85%) and the highest F1-score (89%). This model has the worst performance on classifying images without any bites, with a precision of 62%, a recall of 64%, and an F1-score of 63%. The accuracy achieved by this architecture \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Label** & **Precision** & **Recall** & **F1-Score** \\ \hline Ant bites & 0.65 & 0.93 & 0.77 \\ Bed bug bites & 0.81 & 0.75 & 0.78 \\ Bee stings & 0.84 & 0.67 & 0.74 \\ Chigger bites & 0.89 & 0.52 & 0.65 \\ Flea bites & 0.67 & 0.86 & 0.75 \\ Mosquito bites & 0.74 & 0.89 & 0.81 \\ No bites & 0.90 & 0.85 & 0.88 \\ Spider bites & 0.70 & 0.82 & 0.75 \\ Tick bites & 0.85 & 0.72 & 0.78 \\ \hline Accuracy & & & 0.77 \\ Macro-average & 0.78 & 0.78 & 0.77 \\ Weighted average & 0.79 & 0.77 & 0.77 \\ \hline \hline \end{tabular}
\end{table} 
Table 12: Evaluation metrics for Inception-v3 model. Figure 13: Normalized confusion matrix for Inception-v3. is the best regarding the separate CNN models and is 78%. The macro-average of the precision is 79%, whereas for recall and F1-measure, it is 78%. The same applies for the weighted average precision, recall, and F1-score.