MétaCan
Menu
← Back to cohort
Record W4417117231 · doi:10.64898/2025.12.03.692028

Development of an AI Algorithm for Automatic Classification of Gram Stain Images in Microbiology

2025· article· W4417117231 on OpenAlexaff
Serghei Musaji, Pamela Kibsey, Andrei Musaji

Bibliographic record

VenuebioRxiv (Cold Spring Harbor Laboratory) · 2025
Typearticle
Language
FieldBiochemistry, Genetics and Molecular Biology
TopicCell Image Analysis Techniques
Canadian institutionsRoyal Jubilee HospitalUniversity of New Brunswick
Fundersnot available
KeywordsPreprocessorPattern recognition (psychology)Gram stainingStainCategorizationRandom forestContextual image classificationImage processing

Abstract

fetched live from OpenAlex

Abstract This paper reflects on the development and performance of an advanced artificial intelligence (AI) algorithm for the automated processing and classification of Gram stain images obtained from actual microbiology samples used in clinical microbiology. The aim of the project was to effectively categorize non-standardized Gram stain images into the six most common categories: Gram-negative rods, Gram-positive cocci in chains, Gram-positive cocci in clusters, Gram-positive rods, Gram-negative cocci, and yeasts. The development and testing relied on 1,077 Gram stain images of varying sizes, originating from different laboratories and captured using diverse microscopes at different points in time, resulting in differences in image quality, scaling, color balance, and the presence of artifacts. The dataset was split into 80% training and 20% testing subsets, with the split performed in a stratified manner so that each object group was proportionally represented in both the training and testing sets. Preprocessing involved computer vision techniques to improve contrast and color balance, detect contours and object borders, and implement filtering mechanisms to remove unwanted artifacts. Morphological analysis of shapes was then performed to extract parameters characterizing each contour. Next, human-like classification criteria—based on gradient, morphological features (e.g., shape, size) and spatial arrangement that mimic microbiologists’ visual assessment—were established, achieving around 92% accuracy in image classification without using machine learning (ML) methods. However, any further improvements turned practically impossible, prompting the use of ML methods. Building on pre-obtained features, a random forest ML algorithm was employed to further refine the criteria, with three models trained and tested successively. The first model determined the Gram stain reaction (positive or negative) of each object. The second model classified objects into one of six predefined categories. The third model aggregated individual object classifications to generate an overall classification for each slide, based on the number of objects observed in each category and their occupied area. Overall, the ML solution was significantly more accurate, reaching 99.9% accuracy in classifying the images into one of the aforementioned groups. The algorithm’s limitations include inability to classify mixed cultures, as it primarily focuses on the dominant category. In cases where positive and negative objects coexist, the algorithm tends to prioritize Gram-positive objects. Additionally, the current morphological assessment is insufficient for yeast classification. Addressing these limitations is a crucial avenue for future research to enhance the algorithm’s versatility and accuracy.

Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.

How this classification was reachedexpand

Full frame machine prediction

Teacher imitation

Not calibrated prevalence, not ground truth. Human validation pending. The Gemma side is a direct model label for every work in the frame, read from the title-only record. The Codex side is a classifier learned from the 10,348 direct Codex labels and calibrated to design-weighted sample rates; fields without enough sample support carry no Codex call. Candidate is the union of the two sides; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels.

metaresearch head score (Codex)0.002
metaresearch head score (Gemma)0.005
Version: metacan-v3-hybrid-931329e0061cValidation status: machine_predicted_unvalidated
Candidate categoriesnone
Consensus categoriesnone
DomainCandidate signal: none · Consensus signal: none
Study designCandidate signal: Simulation or modeling · Consensus signal: none
GenreCandidate signal: Methods · Consensus signal: Methods
Teacher disagreement score0.005
Threshold uncertainty score0.013

Distilled classifier scores by category (both heads)

CategoryCodexGemma
Metaresearch0.0020.005
Meta-epidemiology (narrow)0.0010.000
Meta-epidemiology (broad)0.0010.001
Bibliometrics0.0020.001
Science and technology studies0.0010.001
Scholarly communication0.0020.001
Open science0.0020.001
Research integrity0.0010.002
Insufficient payload (model declined to judge)0.0040.003

Machine scores (provisional)

The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.

Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.

Opus teacher head0.007
GPT teacher head0.255
Teacher spread0.248 · how far apart the two teachers sit on this one work
Validation statusscore_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from it

Classification

machine, unvalidated

Machine predicted; a candidate call from one source (direct Gemma or distilled Codex), not a consensus.

The models applied no category: nothing in the taxonomy fit this work.
Study designSimulation or modeling
Domainnot available
GenreMethods

How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".

Quick stats

Citations0
Published2025
Admission routes1
Has abstractyes

Explore more

Same venuebioRxiv (Cold Spring Harbor Laboratory)→Same topicCell Image Analysis Techniques→French-language works237,207→