A Deep Learning Approach for Gram-Stained Bacterial Classification Using an Enhanced Hybrid Deep Convolutional Neural Network

Authors:

Abstract
Accurate identification of bacteria in Gram-stained microscopy images is essential for timely clinical decisions. Manual inspection is time-consuming, error-prone, and often fails to differentiate morphologically similar species. This study proposes an Enhanced Hybrid Deep Convolutional Neural Network (EHDCNN) for automated classification of six types of Gram-stained bacteria. The model combines multi-scale deep feature extraction via a fine-tuned ResNet101 with an Error-Correcting Output Codes (ECOC) Support Vector Machine (SVM) classifier to improve robustness and generalization. An augmented dataset was used to address class imbalance and enhance feature diversity. The EHDCNN achieved an average accuracy of 99.5%, with high recall, specificity, and precision—outperforming its baseline (HDCNN) and classical models including Naïve Bayes, MLP, and SVM. These results support the potential of EHDCNN as a reliable tool for bacterial classification in clinical diagnostic workflows.