mAIcrobe: a napari plugin for microbial image analysis.
mAIcrobe is a comprehensive napari plugin that facilitates image analysis workflows of bacterial cells. Combining state-of-the-art segmentation approaches, morphological analysis and adaptable classification models into a napari-plugin, mAIcrobe aims to deliver a user-friendly interface that helps inexperienced users perform image analysis tasks regardless of the bacterial species and microscopy modality.
- Automated Cell Segmentation: StarDist2D, Cellpose, and custom U-Net models
- Deep learning classification: 6 pre-trained CNN models for S. aureus cell cycle determination plus support for custom models
- Morphological Analysis: Comprehensive measurements using scikit-image regionprops
- Interactive Filtering: Real-time cell selection based on computed statistics
- Colocalization Analysis: Multi-channel fluorescence quantification
- Automated Reports: HTML reports with visualizations and statistics
- Data Export: CSV export for downstream statistical analysis
Standard Installation:
pip install napari-mAIcrobe
Development Installation:
git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .
- Thresholding: Isodata and Local Average methods with watershed
- StarDist2D: custom models
- Cellpose: cyto3 model
- Custom U-Net Models: custom models
- Pre-trained Models: 6 specialized models for cell cycle determination in S. aureus:
- DNA+Membrane (Epifluorescence & SIM)
- DNA-only (Epifluorescence & SIM)
- Membrane-only (Epifluorescence & SIM)
- Custom Model Support: Load your own TensorFlow models
- Shape Analysis: Area, perimeter, eccentricity
- Intensity Measurements: Fluorescence statistics
- Custom Measurements: Septum detection
Guide | Purpose |
---|---|
🚀 Getting Started | Installation to first analysis |
🔬 Segmentation Guide | Choose the right segmentation method |
📊 Cell Analysis | Complete analysis workflows |
🧠 Cell Classification Guide | Cell cycle classification setup |
⚙️ API Reference | Programmatic usage |
- Load Images: Phase contrast and/or fluorescence
- Segment Cells: Choose segmentation algorithm and parameters
- Analyze Cells: Extract morphological and intensity features and choose classification model
- Filter Results: Interactive filtering of cell populations
- Generate Report: Create comprehensive analysis report
The plugin includes test datasets for method validation:
- Phase Contrast: S. aureus cells in exponential growth
- Membrane Stain: NileRed fluorescence imaging
- DNA Stain: Hoechst nuclear labeling
Access via napari: File > Open Sample > napari-mAIcrobe
Input Data:
- Phase contrast image
- Membrane fluorescence
- DNA fluorescence
Analysis Pipeline:
- Segmentation: Isodata or CellPose's cyto3 identifies individual cells in the phase contrast image
- Morphology: Calculate morphological and intensity measurements
- Classification: Cell cycle phase determination using pre-trained CNN model
- Quality Control: Interactive filtering of analysis results. Select subpopulations based on size, intensity, or classification
- Report Generation: HTML output
Explore advanced functionality with included notebooks:
- Cell Cycle Model Training: Train custom classification models
- StarDist Segmentation: Retrain a StarDist segmentation model
- 🐛 Issues - Report bugs, request features
- 📚 napari hub - Plugin ecosystem
We welcome contributions! Whether it's:
- 🐛 Bug reports and fixes
- ✨ New segmentation algorithms
- 📖 Documentation improvements
- 🧪 Additional test datasets
- 🤖 New AI models for classification
Quick contributor setup:
git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .[testing]
pre-commit install
Testing:
# Run tests
pytest -v
# Run tests with coverage
pytest --cov=napari_mAIcrobe
# Run tests across Python versions
tox
Distributed under the terms of the BSD-3 license, mAIcrobe is free and open source software.
mAIcrobe is developed in the Henriques and Pinho Labs with contributions from the napari and scientific Python communities.
Built with:
- napari - Multi-dimensional image viewer
- TensorFlow - Machine learning framework
- StarDist - Object detection with star-convex shapes
- Cellpose - Generalist cell segmentation
- scikit-image - Image processing library