Teknika
Vol. 15 No. 2 (2026): July 2026

Classification of Gram-Stained Microscopy Images of Bacteria Cultured on Multiple Media Using Frozen and Fine-Tuned ResNet-50 Transfer Learning: A Comparative Study

Daniel Martomanggolo Wonohadidjojo (Department of Informatics, School of Information Technology, Universitas Ciputra, Surabaya, East Java, Indonesia)
Lidya Handayani (Department of Medical Microbiology, School of Medicine, Universitas Ciputra, Surabaya, East Java, Indonesia)



Article Info

Publish Date
08 Jul 2026

Abstract

The accurate and rapid identification of pathogenic bacteria is critical in clinical microbiology for guiding appropriate antibiotic therapy and infection control. This study proposes an automated classification system for Gram-stained bacterial microscopy images representing four clinically significant Gram-negative pathogenic species — Enterobacter cloacae, Escherichia coli, Klebsiella pneumoniae, and Pseudomonas aeruginosa — cultivated on five different culture media: Blood Agar Plate (BAP), MacConkey agar (MAC), Mueller-Hinton agar (MHA), Mueller-Hinton broth (MHB), and Nutrient agar (NA), yielding a 20-class classification problem. A primary dataset of 166 images was collected from clinical isolates using a standardized Gram staining protocol and imaged at 1000× magnification using a Leica DM500 trinocular microscope. Two ResNet-50 transfer learning strategies were compared under stratified 5-fold cross-validation: Experiment A using a frozen ResNet-50 as a fixed feature extractor, and Experiment B using a fully fine-tuned ResNet-50. Experiment B (fine-tuned) outperformed Experiment A (frozen) overall, achieving mean accuracy of 0.5832 ± 0.1109 and macro F1-score of 0.5409 ± 0.1231 compared to 0.5601 ± 0.0603 and 0.5010 ± 0.0935 respectively. The highest per-class F1-score was 0.9333 for E. coli on MAC and MHA in both experiments. Culture medium type is identified as a key determinant of classification difficulty, with selective and differential media yielding superior results over non-selective general-purpose media. Although fine-tuning improved performance, the relatively small dataset size and moderate overall accuracy indicate that larger-scale validation is required before clinical deployment.

Copyrights © 2026






Journal Info

Abbrev

teknika

Publisher

Subject

Computer Science & IT Electrical & Electronics Engineering Engineering

Description

Teknika is a peer-reviewed journal dedicated to disseminate research articles in Information and Communication Technology (ICT) area. Researchers, lecturers, students, or practitioners are welcomed to submit paper which has topic below: Computer Networks Computer Security Artificial Intelligence ...