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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Bacterial Species Classification from Full-Plate Culture Images Using Deep Learning: A Comparative Study of CNNs and Vision Transformers

Mustafa Nadhim Owaid, Aythem Khairi Kareem, Ahmed Adil Nafea, Hussein Salim Abed et al.
1 links
Research Square
Advanced Neural Network Applications
preprint

Bacterial Species Classification from Full-Plate Culture Images Using Deep Learning: A Comparative Study of CNNs and Vision Transformers

Mustafa Nadhim Owaid, Aythem Khairi Kareem, Ahmed Adil Nafea, Hussein Salim Abed, Abdulsalam Abdulsattar Abdulazez
preprint en

Abstract

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.

Research Square
University of Anbar (IQ), University of Al Maarif (IQ)
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon