BacteriaCV

Read a Gram stain from a photo

BacteriaCV predicts cell shape and Gram status from one microscope image, and shows how it got there in five steps.

Try the demoRead the docs
Cell shapeGram statusFive-stage viewWeb and Android
Gram stain microscope field with purple rod-shaped cells
Sample result
Bacilli, Gram positive

Built on open tools

  • ResNet-50
  • PyTorch
  • FastAPI
  • Next.js
  • Flutter
  • ONNX
  • DIBaS
  • MIT License

Two answers from one image

Cell shape
Cocci (round) or bacilli (rod). A spiral class exists, but no species in the dataset uses it.
Gram status
Positive or negative, from the probability of the positive class.
Confidence as a level
Every answer is marked High, Medium or Low, so you know when to double check.

See how it read the image

Step through five views, from the original to the object boundary.

1 / 5
Original
2 / 5
Resized 224
3 / 5
ImageNet normalization
4 / 5
Segmentation mask
5 / 5
Object boundary

Use it where you work

Web
Upload PNG, JPG or TIFF up to 20 MB. The model runs on the server.
Android
Runs fully on the phone. Nothing is uploaded.
Demo button. Not on Google Play yet.

Honest about what it cannot do

This result is an aid, not a diagnosis.
Segmentation groups cells, it does not isolate individual cells.
On the held-out test set of 66 images from 32 species, macro F1 is 1.000 for both heads. That is a small set and says nothing about new strains.

Frequently asked questions

Get in touch

Questions, bugs or ideas? Pick the channel that suits you.

Open source, built on public data
MIT licensed. Trained on DIBaS (Zielinski et al., 2017). Images are not stored after analysis.
View on GitHub