Microscopy Image Analysis

DAPI Microscopy Biomass Pipeline

A proposal-to-biomass pipeline for DAPI fluorescence microscopy: segment at high recall, review and refine, then measure biovolume from clean contours.

An in-progress research pipeline for DAPI-like fluorescence microscopy that treats the first segmentation pass as candidate generation, not final measurement. It runs high-recall segmentation to propose objects, exports crops for human review, refines contours on accepted objects, and computes biomass only from those refined contours — in the spirit of the Zeder and YABBA phytoplankton biovolume tools.

Overview

The pipeline deliberately shifts effort away from forcing perfect full-image segmentation too early, and toward a more robust propose → review → refine → measure flow.

The scientific target is contour-based biovolume estimation, where biomass matters more than raw counts and contour quality matters more than early-stage precision.

This is an active research project: the core stages are implemented and unit-tested, but the crop classifier and full end-to-end automation are not finished yet.

Problem

Forcing high-precision full-image segmentation on DAPI microscopy is brittle — objects are small and sparse, and noisy fields produce unreliable masks.

Scientific biomass and biovolume depend on contour fidelity, which an aggressive early segmentation pass tends to sacrifice.

Raw object counts are less meaningful than biomass for this domain.

Microscopy inputs arrive in inconsistent formats and naming conventions that must be unified before processing.

What I Built

Designed the proposal-to-biomass architecture: high-recall segmentation, crop export, annotation, local refinement, and contour-based measurement.

Built typed TOML configuration profiles (including a dedicated high-recall proposal profile) and a CLI covering every implemented stage.

Implemented proposal generation with per-candidate records, crop export with stable filenames and metadata, and annotation-ready CSV manifests.

Implemented image-level grouped train/val/test splitting for the crop-classifier dataset to limit leakage.

Implemented local contour refinement on accepted crops plus contour-based biomass/biovolume measurement.

Set up Docker and RunPod scripts for GPU training, and unit tests covering segmentation, proposal export, split grouping, and refinement.

Approach

Run a high-recall full-image segmentation pass to propose candidate objects rather than commit to final masks.

Export crops around each candidate for human annotation with labels such as single_valid, invalid, merged, and uncertain.

Prepare a classifier dataset from labeled crops, grouped by image to reduce train/validation leakage.

Refine contours locally on accepted crops, then compute biomass and biovolume only from the refined contours.

Status & Progress

Implemented and tested: full-image segmentation, high-recall proposal generation, crop export with metadata, annotation manifests, image-level classifier-dataset splits, and local contour refinement with optional biomass — all behind a single CLI.

Every stage emits inspectable debug artifacts (evidence maps, masks, candidate overlays, crop previews, refined overlays), so the workflow can be audited at each step.

Not finished yet: the crop classifier (training and inference) is not built, predictions do not yet feed refinement automatically, and there is no single end-to-end orchestration command.

Status

In progress

Core pipeline built and tested; crop classifier still to come.

Pipeline Stages

5

Propose → crop → annotate → refine → biomass.

Annotation Labels

4

single_valid, invalid, merged, uncertain.

Segmentation

Cellpose

High-recall full-image proposal pass.

Visuals

Outputs and diagrams from the project.

High-recall proposal overlay with candidate objects highlighted.

High-recall proposal stage — candidate objects flagged across the field for review.

Filtered prediction overlay after review and refinement.

Filtered prediction on the same field after the propose-and-refine pass.