Bacterial Species Classification from Full-Plate Culture Images Using Deep Learning: A Comparative Study of CNNs and Vision Transformers
Abstract Accurate identification of bacterial species from culture plates is essential for microbiological analysis, yet conventional identification procedures can be time-consuming and dependent on specialized expertise. This study investigates the feasibility of automated multiclass bacterial identification directly from complete culture-plate images and compares convolutional and transformer-based deep-learning architectures under a unified experimental protocol. A balanced dataset comprising 950 high-resolution images representing 19 clinically relevant bacterial species was used. ResNet50, DenseNet121, and ViT-B/16 were fine-tuned using identical input resolution, training-only data augmentation, optimization settings, and stratified five-fold cross-validation. Performance was evaluated using accuracy, macro-precision, macro-recall, macro F1-score, Matthews correlation coefficient, Cohen’s kappa, class-wise performance, and aggregated out-of-fold error analysis. ViT-B/16 achieved the best overall performance, with a mean accuracy of 99.05 ± 0.86% and macro F1-score of 99.05 ± 0.86%, followed by DenseNet121 with 97.58 ± 1.69% accuracy and ResNet50 with 94.21 ± 1.75%. ViT-B/16 also achieved MCC and Cohen’s kappa values of approximately 0.99 and produced only nine misclassifications across the aggregated out-of-fold predictions. Class-wise analysis showed consistently high performance across most bacterial species, with errors concentrated in a limited number of visually challenging class pairs. These findings demonstrate the potential of deep-learning models, particularly Vision Transformers, for accurate whole-plate bacterial species classification without prior extraction of individual colonies. The study provides a reproducible comparative baseline for CNN- and transformer-based bacterial image classification and motivates future strain-independent and multi-centre validation.
Authors
- Mustafa Nadhim Owaid (ORCID: https://orcid.org/0000-0001-9005-4368)
- Aythem Khairi Kareem (ORCID: https://orcid.org/0000-0001-7855-7843)
- Ahmed Adil Nafea (ORCID: https://orcid.org/0000-0003-2293-1108)
- Hussein Salim Abed
- Abdulsalam Abdulsattar Abdulazez
Institutions
- University of Anbar (IQ)
- University of Al Maarif (IQ)
Publication Details
- Journal
- Research Square
- Published
- 2026-10-29
- DOI
- https://doi.org/10.21203/rs.3.rs-11151354/v1
- Primary Topic
- Advanced Neural Network Applications
- Type
- preprint