Skip to main content

License BSD-3 PyPI Python Version tests napari hub Website Preprint

mAIcrobe

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. Built using Python 3.10 and 3.11 and tested on Windows, and macOS.

You can read more about mAIcrobe in our preprint.

Video Showcase

Video

✨ Why mAIcrobe?

🔬 For Microbiologists

  • Automated Cell Segmentation: StarDist2D, Cellpose, and custom U-Net models. Several pre-trained models also included.
  • Deep learning classification: 6 pre-trained CNN models for S. aureus cell cycle determination, a pre-trained model for E. coli antibiotic phenotyping plus support for custom models.
  • Morphological Analysis: Comprehensive measurements using scikit-image regionprops
  • Interactive Filtering: Real-time cell selection based on computed statistics

📊 For Quantitative Research

  • Colocalization Analysis: Multi-channel fluorescence quantification
  • Timelapse Analysis: 2D+t workflows with optional registration and label reassignment
  • Batch Processing: Analyze one folder containing multiple FoVs with merged outputs
  • Automated Reports: HTML reports with visualizations and statistics
  • Data Export: CSV export for downstream statistical analysis

🚀 Installation

Standard Installation:

We recommend using an environment manager like conda to handle dependencies and assure reproducibility.

Regardless of environment, you can install via pip in Python 3.10 or 3.11. This should handle all dependencies and might take a couple of minutes depending on your internet connection.

pip install napari-mAIcrobe

Development Installation:

git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .

🎯 Detailed Installation Instructions →

🏆 Key Features

🎨 Cell Segmentation

  • Thresholding: Isodata and Local Average methods with watershed
  • StarDist2D: custom models (pretrained available for S. aureus)
  • Cellpose: cyto3 model
  • Custom U-Net Models: custom models (pretrained available for S. aureus, B. subtilis, and S. pneumoniae)

🧠 Single cell Classification

  • Pre-trained Models: S. aureus cell cycle and E. coli antibiotic phenotyping
  • Custom Model Support: Build your training dataset in napari with out custom widget, train using our jupyter notebook and load your own TensorFlow models,

📊 Comprehensive Morphometry

  • Shape Analysis: Area, perimeter, eccentricity
  • Intensity Measurements: Fluorescence statistics
  • Custom Measurements: Septum detection, colocalization, and more

🔗 Integration with other tools

mAIcrobe is designed to fit into broader image-analysis workflows.

  • napari ecosystem: Keep working in napari with complementary plugins by reusing the layers generated in mAIcrobe (images, labels, and measurements).
  • Fiji / TrackMate: Export labels and measurement tables for downstream tracking and curation workflows in Fiji, including TrackMate-compatible analysis pipelines.
  • Open outputs: Use exported CSV tables in Python, R, Prism, or spreadsheet tools for custom analysis and visualization.

📖 Documentation

Guide Purpose
🚀 Getting Started Installation to first analysis using sample data
🔬 Segmentation Guide Explore the available segmentation methods
📊 Cell Analysis Explore complete analysis workflow and check the metrics measured
🧠 Cell Classification Guide Explore the available classification models
⏱️ Timelapse Analysis Analyze (T, Y, X) data with optional registration and relabeling
📁 Batch Analysis Workflow Process many FoVs from one root folder and export merged tables
Tutorial Purpose
🎨 Basic Workflow Step-by-step guide with a simple example (<5 minutes)
🛠️ Generate Training Data Create annotated datasets for custom model training
Video Purpose
🎨 Basic Workflow Step-by-step guide with a simple example (<5 minutes)
🛠️ Full workflow Full workflow from installation to export of results
🧠 How to retrain the classifier Create annotated datasets, train your custom model and use it in mAIcrobe

For programmatic usage: | ⚙️ API Reference

📚 Available Jupyter Notebooks

Explore advanced functionality with included notebooks:

🤝 Community

  • 🐛 Issues - Report bugs, request features
  • 📚 napari hub - Plugin ecosystem

🏗️ 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:

# Run tests
pytest -v

# Run tests with coverage
pytest --cov=napari_mAIcrobe

# Run tests across Python versions
tox

📋 Full Contributing Guide →

📜 License

Distributed under the terms of the BSD-3 license, mAIcrobe is free and open source software.

🙏 Acknowledgments

mAIcrobe is developed in the Henriques and Pinho Labs with contributions from the napari and scientific Python communities.

Built with:


🔬 From the Henriques and Pinho Labs

"Advancing microbiology through AI-powered image analysis."

🚀 Get Started → | ⏱️ Timelapse Guide → | 📁 Batch Workflow → | ⚙️ API Docs →

Metadata

Release files for napari-mAIcrobe 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napari-mAIcrobe 1.1.1
File Size Uploaded
napari_maicrobe-1.1.1.tar.gz 79.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for napari-mAIcrobe 1.1.1
File Interpreter ABI Platform
napari_maicrobe-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 170.6 kB

Release files / napari_maicrobe-1.1.1.tar.gz

Download URL napari_maicrobe-1.1.1.tar.gz
Size 79.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e0bb07723fbe0f5e1b1ccd2f8a85d3292da575126d75f9de563293c951bdfff1
BLAKE2b-256 checksum
How to use checksums
eb5e7953920c93c5fe7fc8df309947225414d4dc0b8732ddde2b7e503b692a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / napari_maicrobe-1.1.1-py3-none-any.whl

Download URL napari_maicrobe-1.1.1-py3-none-any.whl
Size 91.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
386493eb4146fcfd3a3a0fd9393bef709d6e2408ee43fa57353930ffa5d2c847
BLAKE2b-256 checksum
How to use checksums
e9709e8f2153b9ab6edaecedce14219ca056aaae0ed099cf34c713b0754f4cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page