Combining Deep Features with Classical Discriminants: High-Accuracy Animal Classification Using ResNet-18 and LDA.
Abstract
In this study, ResNet-18 is used as a pre-training model for classifying images from an 8-class animal dataset. ResNet-18, a deep learning model from the "Residual Networks" architecture, utilizes residual connections to overcome the gradient vanishing problem, making it highly efficient for training deep networks. The final layer of ResNet-18 generates 1000 high-level features that represent key patterns in the images, which are crucial for tasks like transfer learning and feature extraction. The dataset consists of eight animal classes (cat, cow, deer, dog, goat, hen, rabbit, and sheep), and 1000-dimensional features are extracted from each image using ResNet-18. These features are grouped into sets of 30, 40, or 60 to create balanced feature vectors for classification. The features are then processed using Linear Discriminant Analysis (LDA), a technique that reduces dimensionality while maximizing class separability. LDA helps the model differentiate between the animal classes effectively. The model's performance is assessed using a confusion matrix, revealing an accuracy rate of 95.6%. Most misclassifications occur between visually similar classes, such as "rabbit" and "cat," while distinct classes like "cow" and "hen" are well separated. Additionally, t-SNE is used to visualize the feature distribution in a lower-dimensional space, showing clear clustering and minimal class overlap, which indicates that the model has learned to extract discriminative features for each class. In conclusion, the study demonstrates the effectiveness of combining ResNet-18 for feature extraction with LDA for classification. The t-SNE plot and confusion matrix confirm that the model successfully differentiates between classes, highlighting the quality of the learned features and the model's high classification performance.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Elif Akarsu, Tevhit Karacalı

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
The authors keep the copyrights of the published materials with them, but the authors are aggee to give an exclusive license to the publisher that transfers all publishing and commercial exploitation rights to the publisher. The puslisher then shares the content published in this journal under CC BY-NC-ND license.