Bactovision provides a widget for jupyter notebook for fast semi-automated annotation of bacterial growth images. It is used in the following paper:
Tyrosine auxotrophy shapes Staphylococcus aureus nasal colonization and interactions with commensal communities L. Camus et al. 2025 (submitted)
Use pip to install the package:
pip install bactovision
or install from source:
git clone [email protected]:mlcolab/bactovision.git
cd bactovision
pip install .
Please see the full documentation here.
Start a jupyter notebook:
jupyter notebook
In the notebook, create a widget:
from bactovision import BactoWidget
# Create a widget with an image
widget = BactoWidget('path/to/image.png')
# Display the widget
widget
To get the mask and the metrics after the annotation is completed, run:
annotation_mask = widget.get_annotation_mask()
metrics = widget.get_metrics()