Command-line interface
The SegSpy CLI segments an image file end-to-end and writes results to disk:
SegSpy run image.dm4 --backend traditional_cv --output ./out
This produces:
out/image_particles.csv— one row per particle with all morphology metrics.out/image_labeled.png— the source-sized canvas with each particle’s mask drawn in a distinct colour.
Options
Option |
Default |
Purpose |
|---|---|---|
|
(required) |
Path to an EM image readable by HyperSpy ( |
|
|
Segmentation backend name ( |
|
|
Output directory (created if missing) |
|
|
Minimum particle contour area in pixels |
|
(flag) |
Disable GrabCut refinement (traditional backend) |
The CLI auto-detects TEM/SEM from the file’s metadata (same logic as
from_signal). For anything beyond these flags — custom
SAM thresholds, CLAHE tuning — use the library API from the quickstart.