Lessons from training a segmentation model

· 1 min read

The practical decisions that mattered while building a pipeline for thin, sparse structures in electron microscopy.

  • computer vision
  • segmentation
  • deep learning

A few lessons I would carry into my next sparse-structure segmentation project:

  • Choose metrics for the foreground. Pixel accuracy can look excellent while a model misses nearly every gap junction. I track precision, recall, and F1.
  • Use an imbalance-aware objective. Generalized Dice loss gives the sparse foreground more influence than ordinary pixel-wise accuracy.
  • Keep augmentation biologically plausible. Extra variety only helps when it reflects changes that can occur in the microscopy workflow.
  • Inspect predictions throughout training. Overlays reveal fragmented masks, missed structures, and false positives that a single score compresses away.
  • Treat 2D versus 3D as a systems decision. Volumetric context is useful, but memory and inference cost determine whether a hybrid approach is practical.

My main takeaway is to improve the data, objective, and evaluation loop before assuming that a larger architecture will solve the problem.