Back

Label-free identification of bacterial species using adapted vision transformers

Hallström, E.; Kandavalli, V.; Marino Miguelez, M. H.; Elf, J.; Wählby, C.

2026-10-10 microbiology
10.64898/2026.10.09.757828 bioRxiv
Show abstract

Antibiotic resistance is an increasingly serious problem worldwide. Identifying the bacterial species can help guide antibiotic selection and improve patient outcomes. In sepsis, where every minute counts, rapid identification is particularly important, and new approaches are needed. In this study, deep learning models were trained to identify bacterial species from phase-contrast time-lapse images of cells growing in microfluidic traps, without fluorescent labels. We demonstrated this approach in two previous studies using laboratory strains. Here, the previous work is extended to clinical bacterial isolates, evaluating performance on isolates not seen during training. Furthermore, it was tested whether autofluorescence could aid species identification. Two validation sets were acquired in separate experiments from the training data, the first containing clinical-isolate traps with five species (Escherichia coli, Enterococcus faecalis, Klebsiella pneumoniae, Staphylococcus aureus and Enterobacter cloacae), imaged every two minutes, and the second containing clinical isolates of two species (E. coli and K. pneumoniae) recovered from spiked donor blood, imaged every minute. Training with the best previous CNN method achieved unsatisfactory results. Therefore, vision transformers were explored, and a self-supervised adaptation procedure was developed for pretrained DINOv3 using a frozen teacher, followed by supervised classification using time-lapse montages. Mean macro-F1 was 93.6 {+/-} 1.3% for isolates precultured in Mueller-Hinton medium using 60 frames (118 minutes) and 87.2 {+/-} 2.7% for isolates precultured in blood using 55 frames (54 minutes) (mean {+/-} sample standard deviation across training seeds). Performance was evaluated over time by increasing the number of frames available to the model during testing, and Fourier-domain filtering approximated reduced numerical aperture. The results are promising and suggest that the aperture can be decreased while retaining good results. However, further evaluation on independent isolates, experiments and patient samples is needed to establish generalization. Together with previous findings, these results bring us closer to rapid image-based diagnostics that could transform the initial treatment of acute bacterial infections by enabling better-informed antibiotic selection.

Matching journals

The top 5 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.