rdiaz.dev
ricardo díaz·software engineer·machine learning
← back to projects

Flash SAM3: Efficient Image Segmentation

2025–26 · github.com

Replaced SAM3's 815M-param ViT-H encoder with TinyViT via knowledge distillation. 19× CPU speedup, 8.5× GPU speedup at 75% IoU retention.

  • Replaced SAM3's 815M-parameter ViT-H encoder with TinyViT (14.7M params, 58× smaller) via knowledge distillation, achieving a 19× CPU speedup (11s → 605ms) and 8.5× GPU speedup (308ms → 36ms) at 75% IoU retention.
  • Built benchmarking infrastructure measuring encoder latency, memory footprint, and segmentation quality (IoU) across model variants; distillation converged to 79% IoU retention within the first training epoch.
mlpytorchpython
bufprojects·themedark