T-MIDAS

A plugin for batch processing of confocal and whole-slide microscopy images of biological tissues

  • Marco Meer

License BSD-3 PyPI Python Version Downloads GitHub stars DOI tests

Need fast batch processing for confocal & whole-slide microscopy images of biological cells and tissues?

This open-source napari plugin integrates state-of-the-art AI + analysis tools in an interactive GUI with side-by-side result comparison! Transform, analyze, and quantify microscopy data at scale including deep learning - from file conversion to segmentation, tracking, and analysis.

napari-tmidas-interactive-table-example

✨ Key Features

🤖 AI Methods Built-In

  • Virtual staining (VisCy) • Denoising (CAREamics) • Spot detection (Spotiflow) • Segmentation (Cellpose, Convpaint) • Tracking (Trackastra, Ultrack)
  • Auto-install in isolated environments • No dependency conflicts • GPU acceleration

🔄 Universal File Conversion

  • Convert LIF, ND2, CZI, NDPI, Acquifer → TIFF or OME-Zarr
  • Preserve spatial metadata automatically

Batch Processing

  • Process entire folders with one click • 40+ processing functions • Progress tracking & quality control

Interactive Workflow

  • Side-by-side table view of original and processed images • Click to instantly compare results • Quickly iterate parameter values • Real-time visual feedback

�📊 Complete Analysis Pipeline

  • Segmentation → Tracking → Quantification → Colocalization

🚀 Quick Start

# Install napari and the plugin
mamba create -y -n napari-tmidas -c conda-forge python=3.11
mamba activate napari-tmidas
pip install "napari[all]"
pip install napari-tmidas

# Launch napari
napari

Then find napari-tmidas in the Plugins menu. Watch video tutorials →

💡 Tip: AI methods (SAM2, Cellpose, Spotiflow, etc.) auto-install into isolated environments on first use - no manual setup required!

📖 Documentation

AI-Powered Methods

Method Description Documentation
🎨 VisCy Virtual staining from phase/DIC Guide
🔧 CAREamics Noise2Void/CARE denoising Guide
🎯 Spotiflow Spot/puncta detection Guide
🔬 Cellpose Cell/nucleus segmentation Guide
🎨 Convpaint Custom semantic/instance segmentation Guide
📈 Trackastra Transformer-based cell tracking Guide
🔗 Ultrack Cell tracking based on segmentation ensemble Guide

Core Workflows

Advanced Features

💻 Installation

Step 1: Install napari

mamba create -y -n napari-tmidas -c conda-forge python=3.11
mamba activate napari-tmidas
python -m pip install "napari[all]"

Step 2: Install napari-tmidas

Your Needs Command
Standard installation pip install napari-tmidas
Want the latest dev features pip install git+https://github.com/MercaderLabAnatomy/napari-tmidas.git

🖼️ Screenshots

File Conversion Widget File Conversion

Convert proprietary formats to open standards with metadata preservation.

Batch Processing Interface Batch Processing

Select files → Choose processing function → Run on entire dataset.

Label Inspection Label Inspection

Inspect and manually correct segmentation results.

SAM2 Crop Anything Crop Anything

Interactive object selection and cropping with SAM2.

📋 TODO

Memory-Efficient Zarr Streaming

Current Limitation: Processing functions pre-allocate full output arrays in memory before writing to zarr. For large TZYX time series (e.g., 100 timepoints × 1024×1024×20), this requires ~8+ GB peak memory even when using zarr output.

Planned Enhancement: Implement incremental zarr writing across all processing functions:

  • Process one timepoint at a time
  • Write directly to zarr array on disk
  • Keep only single timepoint in memory (~80 MB vs 8 GB)
  • Maintain OME-Zarr metadata and chunking

Impact: Enable processing of arbitrarily large time series limited only by disk space, not RAM. Critical for high-throughput microscopy workflows.

Affected Functions: Convpaint prediction, Cellpose segmentation, CAREamics denoising, VisCy virtual staining, Trackastra tracking, and all batch processing operations with zarr output.

🤝 Contributing

Contributions are welcome! Please ensure tests pass before submitting PRs:

pip install tox
tox

📄 License

BSD-3 License - see LICENSE for details.

🐛 Issues

Found a bug or have a feature request? Open an issue

🙏 Acknowledgments

Built with napari and powered by:

AI/ML Methods:

Core Scientific Stack:

File Format Support:


Version:

  • 0.5.3

Last updated:

  • 2026-03-20

First released:

  • 2025-03-05

License:

  • Copyright (c) 2025, Marco Meer...

Supported data:

  • Information not submitted

Open extension:

Save extension:

Python versions supported:

Operating system:

  • Information not submitted

Requirements:

  • numpy<2.1,>=1.23.0
  • magicgui
  • tqdm
  • qtpy
  • scikit-image>=0.19.0
  • scikit-learn-extra>=0.3.0
  • pyqt5
  • zarr
  • ome-zarr
  • napari-ome-zarr
  • nd2
  • pylibCZIrw
  • readlif
  • tifffile<2025.5.21,>=2023.7.4
  • tiffslide
  • acquifer-napari
  • psygnal>=0.9.0
  • zarr>=2.16.0
  • ome-zarr>=0.8.0
  • tox; extra == "testing"
  • pytest>=7.0.0; extra == "testing"
  • pytest-cov; extra == "testing"
  • pytest-qt; extra == "testing"
  • pytest-timeout; extra == "testing"
  • napari; extra == "testing"
  • pyqt5; extra == "testing"
  • psygnal>=0.8.0; extra == "testing"
  • scikit-learn-extra>=0.3.0; extra == "testing"
  • scikit-learn-extra>=0.3.0; extra == "clustering"
  • napari-tmidas[clustering,testing]; extra == "all"
Website by the napari team, original design by CZI. Go to napari main website.