miniSAM

Full open-source pipeline: distill Meta's SAM, deploy to browsers, ship as React components. From training scripts to production packages, preprocessing, inference and serving, all automatic!

Interactive Demo

Real-time segmentation powered by miniSAM, running entirely in your browser with zero server dependencies.

Demo image for segmentation
Initializing miniSAM...
01 — RESEARCH

Distillation

Fully automated training pipeline to distill Meta's SAM into lightweight models. Single command execution with automatic dataset management, teacher weight handling, and complete training orchestration.

One-command automated setup
Automatic dataset download & validation
Teacher-student knowledge distillation
Code
$
python distill.py
02 — RUNTIME

Browser

ONNX runtime optimized for browsers. Complete preprocessing and inference pipeline that runs entirely client-side with zero GPU requirements.

Client-side ONNX inference
Automatic image preprocessing
Mobile & desktop compatible
Try DemoCode
$
npm install minisam
03 — COMPONENTS

React

Production-ready React components with TypeScript support. Single import with all segmentation logic, hooks, and UI components included.

Full TypeScript definitions
Customizable hooks & components
Single component import
Try DemoCode
$
npm install minisam-react

Integrations

See how miniSAM integrates with popular tools and platforms