Skip to content

Releases: MercaderLabAnatomy/napari-tmidas

v0.5.3

20 Mar 17:11

Choose a tag to compare

131ce4e (2026-02-27)
Changed default worker thread usage to CPU/4 instead of a higher default to reduce contention and improve stability on multi-core systems.

47d05c8 (2026-02-26)
Fixed Zarr output argument handling and corrected centroid detection behavior in regionprops analysis.

3614554 (2026-02-23)
Improved merge_channels memory behavior using memmap slab copying, removed problematic imagej=True usage, and enforced TCZYX axis handling.

c42ae38 (2026-02-23)
Updated merge_channels to use a dask+memmap pipeline with imwrite, targeting correct TCZYX output across all dimensions.

5d9dbe1 (2026-02-22)
Fixed slab/page writing bug in merge_channels: writing now uses (Z,Y,X) slabs instead of (Y,X) pages to produce valid TIFF structure.

8288244 (2026-02-22)
Added skip_load behavior to avoid pre-loading in workers and switched to memmap slabs to cut peak RAM usage.

beebaa0 (2026-02-22)
Introduced a zarr-buffered merge_channels pipeline aimed at minimizing memory pressure during channel merging.

1e6d68c (2026-02-22)
Switched merge_channels writing to imwrite with slab generation so tifffile records correct TCZYX shape metadata.

c30fbed (2026-02-22)
Standardized merge_channels output axis order to TCZYX.

5f15b35 (2026-02-22)
Initial memory-optimization commit in this series for merge_channels, reducing RAM footprint via zarr-backed workflow.

v0.5.2

18 Feb 12:26

Choose a tag to compare

🎉 Simplified Installation & Unified AI Environment Management

The [deep-learning] optional dependency has been removed. All users can now install with:

pip install napari-tmidas

AI features (SAM2, Cellpose, Spotiflow, CAREamics, VisCy, Trackastra) automatically install into isolated environments on first use.

What's Changed

🗑️ Removed Unused [deep-learning] Extra
Eliminated confusing optional dependency
Removed unused packages
🔧 SAM2 Now Uses Isolated Environment
Before: SAM2 installed into main napari environment (dependency conflicts, manual setup)
After: SAM2 auto-installs into ~/.napari-tmidas/envs/sam2-env/ on first use

Automatic git clone of SAM2 repository
Automatic model download (~850 MB checkpoint)
No manual setup required
No dependency conflicts with main environment

🔄 Backward Compatibility for Existing SAM2 Installations

Users upgrading from previous versions can keep using existing SAM2 installations:

export SAM2_PATH=/path/to/your/sam2

Plugin will automatically detect and use it. To switch to the new isolated environment, simply unset SAM2_PATH.

📚 Updated Documentation

Simplified installation instructions (single command)
Updated all AI feature docs to reflect auto-install behavior
Added legacy SAM2_PATH instructions

Migration Guide

If you previously installed with pip install 'napari-tmidas[deep-learning]':

Uninstall old version: pip uninstall napari-tmidas
Reinstall: pip install napari-tmidas
(Optional) Clean up old SAM2 if manually installed
AI features will auto-install to isolated environments on first use
If you have an existing SAM2 installation you want to keep using:

Add to your shell profile (~/.bashrc, ~/.zshrc) to make it permanent.

Full Changelog

Commits:

Remove unused [deep-learning] extra and migrate SAM2 to isolated environment
Add backward compatibility for existing SAM2 installations via SAM2_PATH

v0.5.1

18 Feb 07:46

Choose a tag to compare

Add automatic SAM2 installation for Batch Crop Anything

- Implement auto_install_sam2() function that prompts user to install SAM2
- Automatically clones SAM2 repository to parent folder of napari-tmidas
- Installs SAM2 package via pip install -e
- Downloads sam2.1_hiera_large.pt model (~850 MB) and config file
- Shows installation progress and success/failure dialogs
- Fixes issue where users with 'napari-tmidas[deep-learning]' couldn't use Batch Crop Anything
- Prioritizes auto-installed SAM2 location in search paths

v0.5.0

18 Feb 07:45

Choose a tag to compare

Release v0.5.0: Add Convpaint segmentation support

v0.4.5

16 Feb 11:08

Choose a tag to compare

🎉 New Feature: Convpaint Segmentation Support

This release adds comprehensive support for Convpaint - a feature-based deep learning segmentation method that enables batch processing with pretrained models.

✨ Key Features

  • Batch Processing Support: Process 2D (YX), 3D (ZYX), and time-lapse (TYX/TZYX) datasets
  • Pretrained Model Loading: Use pretrained .pkl checkpoint files for inference
  • Dual Output Modes:
    • Semantic Segmentation: Multi-class pixel classification
    • Instance Segmentation: Automatically converts semantic labels to unique instances using connected components
  • Flexible Hardware Support:
    • GPU acceleration (CUDA) with automatic compatibility detection
    • CPU fallback for incompatible GPUs (e.g., Blackwell architecture)
  • Background Label Removal: Configurable removal of background class labels
  • 3D Volume Processing: Connected components analysis on full 3D volumes (not slice-by-slice)
  • Isolated Environment: Automatic virtual environment creation with dependency management

📝 Parameters

  • model_path (string): Path to pretrained Convpaint model (.pkl file)
  • image_downsample (int, 1-8, default: 1): Downsample factor for faster inference
  • output_type (choice, default: semantic):
    • semantic: Multi-class segmentation
    • instance: Individual object instances
  • background_label (int, default: 1): Label to remove and set to 0 (typically background class)
  • use_cpu (bool, default: false): Force CPU processing
  • force_dedicated_env (bool, default: true): Use isolated virtual environment

📚 Documentation

Complete documentation available at docs/convpaint_prediction.md including:

  • Installation instructions
  • Parameter descriptions
  • Usage examples (semantic, instance, time-lapse, high-resolution)
  • Troubleshooting guide
  • Performance optimization tips

🧪 Testing

Added comprehensive test suite covering:

  • Function registration and parameters
  • Parameter validation
  • Semantic to instance conversion (2D/3D)
  • Background label removal
  • Environment manager functionality

All 13 tests pass successfully.

📦 Commits

  • d9c4a5b Add comprehensive test suite for convpaint functionality
  • 55562d9 Add Convpaint prediction for batch processing with semantic/instance output

Full Changelog: https://github.com/[your-repo]/napari-tmidas/compare/v0.4.4...v0.5.0

v0.4.4

14 Feb 16:53

Choose a tag to compare

🎉 What's New

🔧 CAREamics Integration Updates

Adapted to CAREamics v0.0.21 API

Major improvements to the CAREamics Noise2Void denoising integration:

  • Simplified UI: Tile parameters now use intuitive comma-separated format

    • tile_size: "128,128,32" instead of separate X/Y/Z fields
    • tile_overlap: "48,48,8" for cleaner parameter interface
  • Fixed Checkpoint Loading: Corrected API usage for loading trained models

    • Now uses CAREamist(checkpoint_path) (correct method)
    • Properly loads both model architecture and weights
  • Automatic Version Compatibility: Smart environment management

    • Detects PyTorch Lightning version mismatches automatically
    • Recreates environment with updated dependencies when needed
    • One-click retry after environment update
  • Better Progress Tracking: Real-time feedback during processing

    • Time-series progress: "T=1/39... ✓" for each timepoint
    • Streaming output instead of waiting for completion
    • Clear format detection (TYX, TZYX, ZYX, YX)
  • Memory Optimization: Improved handling of large time-series

    • Processes TZYX data one timepoint at a time
    • Reduces GPU memory requirements for 4D datasets
    • Pre-allocated arrays prevent memory fragmentation
  • Enhanced Documentation: Clearer workflow guidance

    • Emphasizes train-first workflow (train with CAREamics → batch process with napari-tmidas)
    • Updated to reflect N2V-only support (CARE, N2V2 coming soon)
    • Added troubleshooting section with common issues
    • Simplified parameter documentation

🎬 Frame Removal Tool (New!)

Interactive Human-in-the-Loop Time-Series Cleaning

A new widget for manual quality control of time-series microscopy data:

Features:

  • 🖱️ Interactive Navigation: Browse frames with slider or Previous/Next buttons
  • Visual Marking: Mark bad frames with checkbox while viewing them
  • 👁️ Live Preview: Preview cleaned result before saving
  • 🔒 Safety Checks: Prevents removing all frames, requires confirmation
  • 📊 Real-time Feedback: Shows current frame, marked frames list, and count
  • 💾 Smart Saving: Exports as compressed TIFF with proper metadata

Supported Formats:

  • TYX (3D): Time series of 2D images
  • TZYX (4D): Time series of 3D z-stacks

Use Cases:

  • Remove frames with motion blur or focus drift
  • Eliminate acquisition artifacts
  • Clean up time-lapse data before tracking/segmentation
  • Manual quality control for critical datasets

How to Use:

  1. Load TYX/TZYX image in napari
  2. Open: Plugins > napari-tmidas > Frame Removal Tool
  3. Navigate frames and mark bad ones
  4. Preview result
  5. Save cleaned time-series

Documentation:

  • Complete user guide: docs/frame_removal.md
  • Quick start: docs/frame_removal_quickstart.md
  • Example script: examples/frame_removal_example.py

🐛 Bug Fixes

  • Fixed CAREamics checkpoint loading causing size mismatch errors
  • Fixed missing progress indicators during long processing operations
  • Corrected tile parameter parsing for 2D vs 3D data

📚 Documentation Updates

  • CAREamics Guide: Completely rewritten to emphasize training workflow
  • README: Updated to include Frame Removal Tool in features list
  • Examples: Added interactive frame removal example with sample data

🧪 Testing

  • Added 15 new tests for Frame Removal Widget
  • All tests passing: widget creation, navigation, marking, preview, saving
  • Improved test coverage for time-series processing

🔧 Technical Details

Breaking Changes

⚠️ CAREamics Parameters: If you have scripts using the old parameter names, update them:

  • Old: tile_size_x=128, tile_size_y=128, tile_size_z=32
  • New: tile_size="128,128,32"

Requirements

  • napari >= 0.4.18
  • CAREamics 0.0.21+ (auto-installed in dedicated environment)
  • tifffile (for Frame Removal Tool saving)

Compatibility

  • Python 3.9, 3.10, 3.11
  • Windows, macOS, Linux
  • GPU acceleration supported (CUDA 11.8+)

📦 Installation

Upgrade existing installation:

pip install --upgrade napari-tmidas

v0.4.2

12 Feb 13:58

Choose a tag to compare

🎉 New Feature: Label-Based Image Cropping

Interactive ROI extraction with smart dimension expansion.

What it does:

  • Draw labels in napari → expand across Z-slices/time frames → crop
  • Labels update immediately for inspection/editing before cropping
  • Works with 2D/3D/4D images

Key highlights:

  • ✨ Opt-in expansion (unchecked by default)
  • 👁️ Immediate visual feedback
  • 🧵 Thread-safe
  • ⚡ Batch processing support

Interactive usage: Plugins → napari-tmidas → Label-Based Cropping

v0.4.1

11 Feb 11:52

Choose a tag to compare

🎉 Release v0.4.1 - Zarr Support & Critical Bug Fixes

This release brings major improvements to file format support, fixes critical bugs in CZI loading and label filtering, and enhances the batch processing pipeline.

✨ New Features

Zarr Output Support (#fa36f02)

  • Added full OME-Zarr output support to batch processing pipeline
  • New output format selector UI (TIFF/Zarr dropdown)
  • Automatic chunking and zstd compression for efficient storage
  • Preserves OME metadata when available via napari-ome-zarr
  • Ideal for large multi-dimensional TCZYX datasets
  • Dependencies added: zarr>=2.16.0, ome-zarr>=0.8.0

Channel Splitting with Timepoint Sorting (#2e2c837)

  • Enhanced channel splitting to properly sort timepoints
  • Improved UI for better user experience

🐛 Critical Bug Fixes

CZI File Loading (#851103d)

  • Fixed critical bug: CZI files were only loading single planes instead of full TCZYX volumes
  • Rewrote CZI loader to iterate through all T,Z,C indices and stack into complete arrays
  • Added Dask support for large files (>2GB) to prevent memory issues
  • Fixed path normalization (now properly handles ~/Downloads and relative paths)
  • Applied path fixes to all loaders (CZI, LIF, ND2, TIFF, Acquifer)
  • Successfully tested with 5.9GB CZI file (39T, 2C, 36Z, 1500x1500)

Remove Small Objects for 4D Labels (#9060b10)

  • Fixed critical bug: remove_small_objects wasn't processing 4D label images (TZYX, CZYX)
  • Added recursive processing to handle 4D+ data by processing each 3D volume independently
  • Previously, 4D data passed through unchanged, leaving small objects unfiltered
  • Now correctly filters objects in all dimensions

Multi-layer Zarr Handling (#0f2d3f3)

  • Fixed issue where multi-layer Zarr files passed lists instead of arrays to processing functions
  • Improved extraction logic with explicit None checks
  • Auto-extracts single elements from unexpected list structures

Processing Function Parameter Filtering (#525187a)

  • Fixed TypeError when passing internal parameters (like _source_filepath) to functions that don't accept them
  • Uses inspect module to check function signatures
  • Automatically filters parameters based on what each function accepts
  • Fixes issues with functions like equalize_histogram() (CLAHE)

CLAHE Memory Management (#2f4ac52)

  • Fixed memory exhaustion issues with CLAHE processing
  • Limited parallel workers to prevent OOM errors on large datasets

📚 Documentation Improvements

  • Added batch label inspection guide
  • Added box/rectangle selection to Crop Anything guide
  • Improved filter documentation with specific anchors
  • Simplified installation instructions with decision table
  • Updated TrackAstra paper link
  • Fixed README links for advanced features

🧹 Housekeeping

  • Removed deprecated files (test_grid_overlay.py, INTEGRATION_SUMMARY.md, dependabot config)
  • Updated dependency constraints for compatibility

🔧 Dependency Updates

numpy>=1.23.0,<2.1          # numba compatibility
tifffile>=2023.7.4,<2025.5.21  # tiffslide compatibility
psygnal>=0.9.0               # napari compatibility
zarr>=2.16.0                 # new
ome-zarr>=0.8.0              # new

v0.4.0

08 Feb 09:28

Choose a tag to compare

  • Split channels processing function handles datasets with mixed or unknown timepoint counts
  • Parameter widget has been redesigned for better usability