napari-mAIcrobe¶
mAIcrobe: a napari plugin for microbial image analysis. Automated cell segmentation, deep learning classification, and comprehensive morphometry. Check out our preprint on bioRxiv!
π Installation¶
Recommended (conda):
conda create -n mAIcrobe python=3.11
conda activate mAIcrobe
conda install -c conda-forge napari pyqt
pip install napari-mAIcrobe
Development installation:
conda create -n mAIcrobe python=3.11
conda activate mAIcrobe
conda install -c conda-forge napari pyqt
git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .
Installation Guide β Complete Tutorial β
β¨ Why napari-mAIcrobe?¶
- Automated Segmentation: StarDist2D, Cellpose, and custom U-Net models
- AI Classification: 6 pre-trained CNN models for S. aureus cell cycle determination
- Morphological Analysis: Comprehensive measurements using scikit-image
- Interactive Interface: Intuitive napari-based GUI for all analysis steps
- Colocalization Analysis: Multi-channel fluorescence quantification
- Automated Reports: HTML reports with visualizations and statistics
- Data Export: CSV export for downstream statistical analysis
- Batch Processing: Analyze multiple images with consistent parameters
- Reproducible Workflows: Consistent analysis parameters across users
- Custom Models: Support for user-trained segmentation and classification models
- Open Source: Full transparency and community contributions
- Cross-Platform: Works on Windows, macOS, and Linux
π― Key Features¶
π¨ Cell Segmentation¶
Choose from multiple state-of-the-art segmentation approaches:
- StarDist2D: Optimized for bacterial cell morphology
- Cellpose: Versatile deep learning segmentation
- Custom U-Net: Train your own models for specific bacterial species
π§ Single-Cell Classification¶
Pre-trained deep learning models for S. aureus: - DNA + Membrane models: Epi/SIM microscopy - DNA-only models: DAPI or similar staining - Membrane-only models: Phase contrast or membrane stains - Custom model support: Integrate your own classification models
π Comprehensive Morphometry¶
Comprehensive cell measurements: - Size metrics: Area, perimeter, equivalent diameter - Shape descriptors: Eccentricity, solidity, aspect ratio - Intensity measurements: Mean, median, standard deviation per channel - Spatial relationships: Distance to neighbors, clustering analysis
π Interactive Filtering¶
Real-time cell selection based on: - Size constraints: Filter by area or diameter ranges - Shape criteria: Select specific morphologies - Intensity thresholds: Focus on cells with specific staining patterns - Classification confidence: Keep only high-confidence predictions
π Analysis Workflow¶
π Single Image Analysis¶
- 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
π Documentation¶
-
Quick Start
Get up and running with mAIcrobe in minutes Getting Started
-
Installation
Step-by-step installation for all platforms Installation
-
First Analysis
Complete walkthrough with sample data Cell Analysis
-
Source Code
Open source napari plugin on GitHub GitHub Repository
-
API
Programmatic usage of the plugin API Reference
π Explore the Docs¶
-
User Guide
Concepts and howβto guides: segmentation, analysis, and classification User Guide
-
Tutorials
Stepβbyβstep workflows, from basics to training data export Tutorials
-
Troubleshooting
Fix common installation and runtime issues Troubleshooting
-
API Reference
Programmatic usage and module overview API Docs
π§ͺ Sample Data¶
Access via napari: File β Open Sample β mAIcrobe (Phase, Membrane, DNA examples)
π€ Community¶
- π Issues: https://github.com/HenriquesLab/mAIcrobe/issues
- π napari hub: https://napari-hub.org/plugins/napari-mAIcrobe
π Available Jupyter Notebooks¶
Explore advanced functionality with included notebooks:
- Cell Cycle Model Training: Train custom classification models
- StarDist Segmentation: Retrain a StarDist segmentation model
ποΈ Contributing¶
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:
Full guide: https://github.com/HenriquesLab/mAIcrobe/blob/main/CONTRIBUTING.md
π License¶
Distributed under the terms of the BSD-3 license β free and open source software.
π Acknowledgments¶
napari-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 β star-convex object detection
- Cellpose β generalist cell segmentation
- scikit-image β image processing
Ready to analyze your microbial images? Get started now β