# Application of Deep Neural Networks in Recognition of Selected Types of Objects in Digital Images
## 3 Discussion of Results
On the other hand, the model has difficulty correctly recognizing sheep, cat, and cow, as can be seen from the lower values on the diagonal and the relatively frequent misclassification of these classes. In the case of the cat class, the AlexNet architecture performs slightly better than GoogLeNet, which is surprising given that GoogLeNet is a more advanced and deeper network. This situation could be due to various factors. One possible reason is that AlexNet, despite its simpler architecture, can better match certain visual features of the cat, such as contours and shapes, which are less dependent on the very detailed analysis that GoogLeNet offers. In addition, deeper networks like GoogLeNet may be more prone to over-fitting more complex patterns, which can lead to poorer overall performance in distinguishing between classes with less complex features, such as cats. The GoogLeNet model operates on high-resolution images and the RGB color scale, which allows it to detect detailed visual features, including color information that can be crucial to correct classification. This is what makes the model so good at recognizing classes with distinct and unique features, such as a butterfly or a chicken. However, despite having access to full color information, the model can still have trouble distinguishing between classes with more subtle visual differences, such as cat and cow, which may explain the poorer results for these categories. In summary, three neural network architectures were analyzed: LeNet-5, AlexNet, and GoogLeNet, in terms of their effectiveness in classifying different classes of animals. LeNet-5, while doing well with some classes, such as butterfly and spider, has clear problems distinguishing between more complex categories, which may be due to its low resolution and work on grayscale images. AlexNet, on the other hand, offers better accuracy, especially for classes like cat and chicken, thanks to its work with RGB color scale images and higher resolution. GoogLeNet, despite being the deepest of the architectures analyzed, achieves very good results for most classes, but is slightly behind AlexNet for cat classification. A key role in achieving these satisfactory results was played by the hyperparameter optimization performed, which allowed each architecture to maximize its potential. Based on the analysis of graphs showing accuracy, loss, and resource consumption metrics (GPU, RAM, CPU), conclusions were drawn about the efficiency of the various configurations. These results identified the best performing configurations, which were then used in further experiments. Of the three architectures, GoogLeNet appears to be the best choice for further research, given its overall accuracy and ability to effectively classify a wide range of classes. Although AlexNet performs slightly better for the cat class, GoogLeNet's overall performance is superior, making it a more versatile and reliable option for further research and applications in classification tasks. Results from the SimSiam approach: SimSiam, as a self-supervised learning technique, was applied to train the GoogLeNet model. The results show the effectiveness of this method in the context of representation learning. The value of the loss function, based on the inverse cosine similarity measure, systematically decreased, indicating an effective process of clustering similar images in the representation space. Although the method required a long training time (about 10 h for 50 epochs), the obtained accuracy was at a decent level of 0.4473 with a loss of 3.2532. Figure 30 shows the normalized confusion matrix for the GoogLeNet model trained using the SSL SimSiam technique. The model shows the highest performance in classifying squirrel, spider, and butterfly, as can be seen from the relatively high values on the diagonal of the matrix for these categories, especially for butterfly (0.87). Nevertheless, the model clearly has problems distinguishing between classes such as elephant, cat, and sheep, where the values on the diagonal are much lower.