Skip to content

Best Practices

This guide covers data preparation, training recommendations, and resource management to help you get the best results from the workspace.


Data Preparation

File Format Requirements

The workspace accepts TIFF stacks (.tif or .tiff) for all processing modules.

RequirementSpecification
FormatMulti-page TIFF stack
Bit Depth8-bit or 16-bit grayscale
Structure3D stack (slices × height × width)
ChannelsSingle channel (grayscale)

File Size Limits:

File TypeMaximum Size
TIFF uploads200 MB
Workspace ZIP5 GB
Model files2 GB

Image Quality

For best results, ensure your images have:

  • Proper focus — Blurry images reduce model accuracy
  • Sufficient contrast — Images with uniform intensity are rejected
  • Consistent acquisition — Use the same microscope settings across your dataset

Files automatically rejected:

  • Empty files (0 bytes)
  • All-zero pixel values (no data)
  • Uniform intensity (no contrast)

Training Data Guidelines

Raw Training Images

High-quality training images lead to better models:

GuidelineWhy It Matters
Include diverse examplesModel learns to handle variation
Vary object sizesHandles small and large structures
Include different backgroundsRobust to imaging variations
Match inference conditionsSimilar settings improve accuracy
More images = betterLarger datasets improve generalization

Tip: Include examples of all the variations you expect to encounter in your actual data.

Annotation Masks (for Segmentation)

Annotations tell the model what to segment. Quality directly affects results.

Pixel Value Format:

ValueMeaning
0Background (not segmented)
1Class 1
2Class 2
...Additional classes

Maximum 10 classes supported.

Annotation Quality Checklist:

  • [ ] Consistent labeling — Same structures labeled the same way across all slices
  • [ ] Accurate boundaries — Trace object edges carefully
  • [ ] Complete labeling — Label ALL instances (unlabeled objects = background)
  • [ ] Diverse examples — Include objects at different sizes and positions

Warning: Poor annotations are the #1 cause of poor segmentation results. Invest time in quality labels.

Dimension Matching

For segmentation training, raw images and annotation masks must have:

DimensionRequirement
SlicesIdentical count
WidthIdentical pixels
HeightIdentical pixels

The system validates this automatically and rejects mismatched pairs.


Deep Learning Denoising Data

Minimum Requirements

ModeMinimum Slices
2D10 slices
2.5D20 slices

Noise Matching

For best denoising results:

FactorRecommendation
Acquisition sessionSame session preferred
Microscope/cameraSame equipment
SettingsSame imaging parameters
Sample preparationSame protocol

Important: A model trained on one type of noise won't effectively remove a different type. If your new images have different noise characteristics, train a new model.

Method Selection

Noise TypeRecommended Method
Random speckle noiseN2V
Poisson (shot) noiseN2V
Gaussian noiseN2V
Horizontal/vertical scan linesautoStructN2V
Periodic stripe artifactsautoStructN2V
Camera fixed patternsautoStructN2V

Training Tips

Parameter Recommendations

Start with these values and adjust based on your results:

ParameterRecommendedNotes
Batch Size4-8Reduce if running out of GPU memory
Patch Size64-256Larger captures more context but uses more memory
Epochs100Early stopping will end training if converged
AugmentationEnabledDisable only if image orientation is critical
Learning RateDefaultStart with preset values

Monitoring Training Progress

Watch these indicators during training:

IndicatorWhat to Look For
Training LossShould decrease over epochs
Validation LossShould decrease and stay close to training loss
Loss GapLarge gap between training/validation = overfitting
Dice Score (segmentation)Should increase toward 1.0

Signs of Problems:

SymptomLikely CauseSolution
Loss not decreasingLearning rate too highTry lower learning rate
Loss stuck at high valueBad training dataCheck annotations, add more data
Validation much higher than trainingOverfittingAdd augmentation, more data
Very slow trainingLarge images/batchReduce batch size or patch size

Background Training

You don't need to watch training continuously:

  • Training continues in the background
  • Explore other modules while waiting
  • Only one training session can run at a time
  • If you refresh the page, you can resume monitoring

Resource Management

Critical: Session-Based Storage

Warning: The workspace uses session-based storage. Your files exist only during your current session.

Files are cleared when you:

  • Log out
  • Close the browser (session timeout)
  • Session expires due to inactivity

Always backup your work!

Backup Strategy

Follow this workflow to protect your data:

1. Download Workspace Regularly

When to BackupWhy
End of each sessionPreserve all work before logging out
After training completesSave trained models
After processing resultsKeep generated outputs
Before major changesSafety checkpoint

To download:

  1. Click the download icon next to "Workspace" in the sidebar
  2. Confirm the download
  3. Wait for ZIP to generate (large workspaces take longer)
  4. Save the file locally

2. Organize Your Backups

Use descriptive filenames with dates:

workspace_2024-01-15_segmentation-trained.zip
workspace_2024-01-16_denoising-complete.zip

3. Verify Your Backups

After restoring, check that file counts match your expectations.

Workspace ZIP Contents

Your backup includes:

IncludedNot Included
All uploaded filesCache directories
Trained modelsThumbnail cache
Inference resultsSlice cache
Processing outputsMesh preview cache
Folder structure

Restoring a Workspace

To restore from a backup:

  1. Click Upload in the file browser
  2. Select "Restore Workspace (ZIP)" from the category dropdown
  3. Choose your backup ZIP file
  4. Confirm the restore

Warning: Restoring REPLACES your current workspace. All existing files are deleted before restoration.

File Size Management

Keep your workspace running smoothly:

ActionBenefit
Delete unused filesReduce workspace size
Monitor sidebar statsTrack total size
Download and clear periodicallyStart fresh with backup available
Keep under 5 GBOptimal performance

Troubleshooting Common Issues

IssueLikely CauseSolution
Upload rejectedFile too large or wrong formatCheck size limits (200 MB), use TIFF format
Dimension mismatchRaw and annotation sizes differEnsure identical dimensions
Poor segmentationInsufficient or poor quality training dataAdd more diverse, well-annotated data
Training loss not decreasingLearning rate too highTry default parameters or lower learning rate
Out of memoryBatch size too largeReduce batch size
Session expiredInactivity timeoutLog in again, restore from backup
Slow processingLarge imagesNormal behavior; wait for completion
Denoising not effectiveWrong method for noise typeTry N2V ↔ autoStructN2V

Summary Checklist

Before starting a project:

  • [ ] Data format — TIFF stacks, 8/16-bit grayscale
  • [ ] File sizes — Under 200 MB per file
  • [ ] Training data — Diverse, well-annotated, matching dimensions
  • [ ] Backup plan — Know where you'll save workspace ZIPs

During work:

  • [ ] Monitor training — Check loss curves for convergence
  • [ ] Backup regularly — Download workspace after significant progress
  • [ ] Match conditions — Use similar images for training and inference

Part of DFG Priority Programme SPP2332 "Physics of Parasitism"