Skip to content

Deep Learning Denoising Module

Remove noise from microscopy images using self-supervised deep learning. No clean reference images required.

DL Denoising Module OverviewThe DL Denoising module showing method selection, mode toggle, and workflow options


Overview

The Deep Learning Denoising module provides two self-supervised denoising methods:

MethodTrainingBest ForComplexity
N2V (Noise2Void)Single stageRandom, uncorrelated noise (Gaussian, Poisson)Simple
autoStructN2VTwo stages + mask extractionStructured noise (scan lines, periodic artifacts, camera patterns)Advanced

Both methods learn to denoise from noisy images alone—no clean ground truth required.

For method selection guidance, see Denoising Method.

When to Use Each Method

Your Images Have...Recommended Method
Random speckle noiseN2V
Poisson (shot) noiseN2V
Gaussian noiseN2V
Horizontal/vertical scan linesautoStructN2V
Periodic stripe artifactsautoStructN2V
Camera-specific fixed patternsautoStructN2V
Tomography reconstruction artifactsautoStructN2V

Quick Start

Decision Flowchart

Start

  ├─ Do you have a pretrained model?
  │     │
  │     ├─ YES → Import Model workflow (skip training)
  │     │
  │     └─ NO → Continue

  ├─ Does your noise have visible patterns or structure?
  │     │
  │     ├─ YES → Use autoStructN2V
  │     │
  │     └─ NO (random noise) → Use N2V

  ├─ Is noise correlated between slices? (volumetric data)
  │     │
  │     ├─ YES → Use 2.5D mode (requires 20+ slices)
  │     │
  │     └─ NO → Use 2D mode

  └─ Configure → Train → Done

N2V Quick Path

  1. Launch module → Select N2V → Keep 2D mode
  2. Choose Train from Scratch → Upload your noisy TIFF stack
  3. Use Balanced preset (or customize)
  4. Click Start Denoising → Wait for completion
  5. View results in Image Viewer

autoStructN2V Quick Path

  1. Launch module → Select autoStructN2V → Choose 2D or 2.5D mode
  2. Choose Train from Scratch → Upload your noisy TIFF stack
  3. Use Balanced preset (or customize both stages)
  4. Click Start Denoising
  5. After Stage 1: Review the extracted mask → Approve & Continue
  6. Wait for Stage 2 → View results

Step-by-Step Guide

Step 1: Method & Data Selection

Step 1 guides you through three decisions: method, mode, and workflow.

Step 1 Method SelectionSelect your denoising method, toggle 2D/2.5D mode, then choose a workflow

1. Select Denoising Method

Choose between the two methods at the top of the step:

OptionDescription
Noise2Void (N2V)Fast single-stage training. Best for random noise.
autoStructN2VTwo-stage training with automatic structured noise analysis. Best for patterned artifacts.

See Denoising Method for detailed guidance.

2. Select Processing Mode (2D / 2.5D)

Use the toggle switch in the top-right corner of the method selection card:

ModeDescriptionRequirements
2D (default)Process each slice independentlyAny stack size
2.5DProcess triplets (Z-1, Z, Z+1) using inter-slice contextMinimum 20 slices

When to use 2.5D mode:

  • Volumetric data with correlated structures across slices
  • EM tomography and confocal microscopy stacks
  • Noise patterns that span multiple slices
  • When preserving 3D structural continuity is important

2.5D requirements:

  • Minimum 20 slices in the stack
  • Slices should be spatially contiguous (not random samples)
  • More GPU memory required (3x input channels)

Important for autoStructN2V: In 2.5D mode, the mask extraction phase shows a 3-slice triplet mask instead of a single 2D mask. See Step 3: Mask Extraction (2.5D) for details.

See 2D vs 2.5D Processing Mode for more details.

3. Choose Workflow

After selecting a method, two workflow options appear:

Option A: Train from Scratch

Expand Train from Scratch to upload your data:

  1. Click the file selector
  2. Choose a TIFF stack from your workspace or upload a new file
  3. Wait for validation (green checkmark)
    • For 2.5D mode: validation checks that the stack has at least 20 slices
  4. Click Next: Configure

See Input Data for file requirements.

Option B: Import Previously Trained Model

Expand Import Previously Trained Model to use an existing model:

For N2V:

FileDescription
Config (.json)Training configuration. See Config File
Model (.pth)Trained model weights. See Model File

For autoStructN2V:

FileDescription
Config (.json)Training configuration
Stage 1 Model (.pth)Stage 1 trained weights
Stage 2 Model (.pth)Stage 2 trained weights

Note: When importing a model, Steps 2 and 3 are skipped. Proceed directly to Step 4 (Inference).


Step 2: Configure Training

This step is only shown for the Train from Scratch workflow.

Configure your training parameters. The interface differs based on your selected method.

Presets

Start with a preset to set all parameters at once:

PresetDescription
FastQuick training, lower quality. Good for testing.
BalancedRecommended for most cases. Good quality with reasonable training time.
High QualityBest results, longer training time. Use when quality is critical.

N2V Configuration (Single Column)

For N2V, you'll see a single configuration form:

N2V ConfigurationN2V single-stage configuration

Parameter Summary
CategoryParameterDefaultHelp Article
DatasetPatch Size64Patch Size
Patches per Image100Patches per Image
Batch Size8Batch Size
Mask Percentage15%Mask Percentage
Data AugmentationOnAugmentation
ArchitectureNumber of Features64Features
Number of Layers4Number of Layers
TrainingLearning Rate1e-4Learning Rate
Epochs100Epochs
Early StoppingOnEarly Stopping

Advanced Options (collapsed by default):

autoStructN2V Configuration (Dual Column)

For autoStructN2V, you'll see a side-by-side layout for both training stages:

autoStructN2V ConfigurationautoStructN2V two-stage configuration with Stage 1 (left) and Stage 2 (right)

Stage 1 vs Stage 2 Defaults
ParameterStage 1Stage 2Notes
Patch Size3264Stage 2 uses larger patches
Patches per Image100200More patches in Stage 2
Batch Size42Smaller batches in Stage 2
Mask Percentage15%10%Lower masking in Stage 2
Learning Rate1e-41e-5Lower learning rate in Stage 2
Data AugmentationOffOnAugmentation disabled in Stage 1

Important: Stage 1 augmentation is automatically disabled for autoStructN2V. This preserves structural noise patterns needed for mask extraction.

Mask Extractor Configuration

Below the stage columns, expand Mask Extractor Configuration to adjust how structural noise patterns are detected:

ParameterDefaultDescriptionHelp Article
Adaptive ThresholdingOnAutomatically adjust threshold per sliceAdaptive Thresholding
Base Percentile50%Starting threshold for noise detectionBase Percentile
Percentile Decay1.15Rate at which threshold adaptsPercentile Decay
Max Masked Pixels25Maximum active pixels in the maskMax Masked Pixels

Click Next: Training when configuration is complete.


Step 3: Training

This step is only shown for the Train from Scratch workflow.

The training interface differs significantly between N2V and autoStructN2V.

N2V Training (Single Stage)

For N2V, click Start Denoising to begin training:

N2V TrainingN2V single-stage training progress

During Training:

  • Progress bar shows current epoch
  • Loss chart displays training and validation loss
  • Metrics cards show current and best validation loss

Training Completion:

  • Status changes to "Complete"
  • Open in Viewer and Start new Analysis buttons appear
  • You can proceed to Step 4 to denoise additional images

Tip: You don't need to watch the entire training process. Feel free to explore other modules while training continues in the background. Note that only one denoising training can run at a time.

autoStructN2V Training (Multi-Stage)

autoStructN2V training consists of three phases displayed in collapsible sections:

autoStructN2V TrainingautoStructN2V three-phase training interface

Phase 1: Stage 1 N2V Training

Click Start Denoising to begin. Stage 1 trains a standard N2V model:

  • Progress bar shows epoch progress
  • Loss chart tracks training/validation loss
  • Status updates: "Pending" → "Training" → "Complete"

When Stage 1 completes, the mask extraction phase begins automatically.

Phase 2: Mask Extraction

After Stage 1, the module analyzes the difference between noisy input and Stage 1 output to extract a structural noise mask.

Mask Extraction (2D Mode)

In 2D mode, you'll see a single mask grid:

Mask Extraction 2D2D mask extraction showing a single detected noise pattern

Mask Display:

  • Single grid showing the detected structural noise pattern
  • Active pixels (purple) represent positions where structured noise was detected
  • Center pixel (highlighted) is the reference position
  • Statistics: kernel size, active pixel count, coverage percentage
Mask Extraction (2.5D Mode)

In 2.5D mode, the mask becomes a triplet showing patterns for three Z-positions:

Mask Extraction 2.5D2.5D triplet mask extraction with three slice tabs

Triplet Mask Interface:

  • Three tabs at the top: "Z-1 (above)", "Z (center)", "Z+1 (below)"
  • Each tab shows the mask for that slice position in the triplet
  • Click tabs to switch between slice views
  • The 3D mask captures noise correlations across the Z-axis

Interpreting the Triplet Mask:

TabShowsMeaning
Z-1 (above)Mask for slice above centerNoise correlations from previous slice
Z (center)Mask for center slicePrimary structural noise pattern
Z+1 (below)Mask for slice below centerNoise correlations from next slice

Different slices may show different patterns if the structured noise varies across the Z-axis.

Mask Actions
ButtonDescription
Approve & Continue to Stage 2Accept the mask and proceed to Stage 2 training
Skip Stage 2Use Stage 1 results only (if no structure detected)

Auto-approve Toggle: Enable Auto-approve (toggle in header) to automatically approve the mask and continue to Stage 2 without manual intervention. Useful for batch processing.

Adjusting the Mask: If the detected pattern doesn't look right, use the parameter panel to adjust:

  1. Modify Base Percentile, Percentile Decay, or Max Masked Pixels
  2. Click Regenerate Mask
  3. Review the new mask (check all three tabs in 2.5D mode)
  4. Approve when satisfied
Phase 3: Stage 2 Struct-N2V Training

After mask approval, Stage 2 trains using the extracted mask:

  • Progress and metrics display similar to Stage 1
  • Stage 2 specifically targets the structured noise patterns identified in the mask
  • In 2.5D mode, the 3D mask guides the network to ignore correlated noise across slices
  • Status: "Pending" → "Training" → "Complete"

When Stage 2 Completes:

  • Open in Viewer button appears
  • Final denoised result is the Stage 2 output
  • You can compare Stage 1 vs Stage 2 results in the Image Viewer

Step 4: Process Additional Data (Optional)

Apply your trained model to denoise additional images without retraining.

Step 4 InferenceApply the trained model to new data

Model Information

A summary card shows your model details:

  • Method used (N2V or autoStructN2V)
  • Training mode (2D or 2.5D)
  • When training completed

Process New Images

  1. Click the file selector to choose additional data
  2. Select a TIFF stack from your workspace
    • For 2.5D models: new data should also have sufficient slices
  3. Click Process Data
  4. Monitor the progress bar
  5. When complete, click Open in Image Viewer or Process More

See Inference Data and Inference Overview.


Output Files

The module saves files to your workspace:

OutputLocationDescription
Denoised imagesresults/<training-id>/Denoised TIFF stack
Trained modelmodels/<session>/<training-id>/Model weights (.pth)
Configurationmodels/<session>/<training-id>/Training config (.json)
Mask (autoStructN2V)models/<session>/<training-id>/Extracted noise mask

For autoStructN2V, both Stage 1 and Stage 2 outputs are saved.


Troubleshooting

IssuePossible CauseSolution
"Insufficient Stack Depth for 2.5D"Stack has fewer than 20 slicesSwitch to 2D mode or use a larger stack
Training very slowLarge images or many epochsReduce patch size, use Fast preset, or wait
Poor denoising qualityWrong method for noise typeTry the other method (N2V ↔ autoStructN2V)
Artifacts remain after N2VStructured noise presentSwitch to autoStructN2V
Empty mask extractedNo detectable structureUse Skip Stage 2 or try N2V instead
Mask shows random patternThreshold too sensitiveIncrease Base Percentile, reduce Max Masked Pixels
2.5D triplet mask looks inconsistentNoise varies across slicesThis may be correct; check each tab individually
Stage 2 worse than Stage 1Mask captured wrong patternAdjust mask parameters and regenerate
GPU not detectedCUDA not availableTraining will use CPU (slower)
Out of memoryBatch size too largeReduce batch size (especially in 2.5D mode)

Method Details: N2V

Noise2Void (N2V) is a self-supervised denoising method that works by:

  1. Blind-spot training: During training, the network learns to predict each pixel's value from its surrounding context, without seeing the pixel itself
  2. Self-supervision: The noisy image serves as both input and target
  3. Assumption: Noise is pixel-independent (random, uncorrelated)

In 2.5D mode: The network takes 3 consecutive slices as input and predicts only the center slice, leveraging inter-slice context for better denoising.

Strengths:

  • Fast single-stage training
  • Works well for most microscopy noise
  • Simple configuration

Limitations:

  • Cannot handle structured or correlated noise
  • May leave pattern artifacts from camera or reconstruction

For more details, see N2V Training.


Method Details: autoStructN2V

autoStructN2V extends N2V to handle structured noise through a two-stage approach:

Stage 1: Initial N2V Training

  • Trains a standard N2V model
  • Output: Partially denoised image (random noise removed, structured noise remains)

Mask Extraction:

  • Compares noisy input with Stage 1 output
  • Identifies pixels with consistent residual patterns
  • Generates a "structN2V mask" showing which pixel relationships to exclude
  • In 2.5D mode: Generates a 3D triplet mask capturing patterns across Z-1, Z, and Z+1 positions

Stage 2: Struct-N2V Training

  • Trains using the extracted mask
  • The mask tells the network which neighboring pixels might share correlated noise
  • In 2.5D mode: The 3D mask guides cross-slice noise handling
  • Output: Fully denoised image (both random and structured noise removed)

Strengths:

  • Automatically detects structured noise patterns
  • No manual mask creation required
  • Effective for scan lines, periodic artifacts, camera patterns
  • 2.5D mode captures 3D noise correlations

Limitations:

  • Longer training time (two stages)
  • Requires sufficient structural noise for mask extraction
  • More parameters to configure

For more details, see autoStructN2V Training and autoStructN2V Details.


Module Overview

Step 1: Method & Data Selection

Step 2: Configuration

Step 2: Mask Extractor (autoStructN2V)

Step 3: Training

Step 4: Inference

Part of DFG Priority Programme SPP2332 "Physics of Parasitism"