MIRA performs semantic segmentation of SEM cross-section images of solder joints, classifying every pixel into one of three phases:
- Background
- Cu₆Sn₅ (red intermetallic layer)
- Cu₃Sn (green intermetallic layer)
Workflow
- Load a model — pick a trained checkpoint from the dropdown at the top and click Load.
- Single image — drop an SEM image and its matching
.txt metadata file, then Run Segmentation.
- Batch — drop many images and their
.txt files. They are paired automatically; review the match table, then Process.
Scale calibration (metadata file)
The pixel size is never typed in — it is read from each image's sidecar .txt file (e.g. img-321.txt next to img-321.jpg). The file must contain:
$$SM_MICRON_BAR — scale-bar length in pixels (e.g. 106)
$$SM_MICRON_MARKER — what the bar represents (e.g. 1um, 500nm)
$CM_FULL_SIZE — full image size in pixels (e.g. 1280 960)
pixel size (µm/px) = marker length (µm) ÷ scale-bar length (px)
The image and its .txt must share the same id (the filename before the extension). In single mode, processing is blocked until a valid matching file is present; in batch mode, unmatched images are listed and skipped only after you approve. If the processed image resolution differs from $CM_FULL_SIZE, the pixel size is scaled so measurements stay in real micrometres.
Editing the mask
After segmentation you can correct the prediction in the editor: paint with the Cu₆Sn₅ / Cu₃Sn / Erase tools, adjust brush size and overlay opacity, and use Undo/Redo or Reset. After any edit the metrics go out of date — click Recompute to refresh them.
How measurements are calculated
- Area — number of phase pixels × (pixel size)². Reported in µm² and m².
- Phase fraction — phase pixels ÷ total pixels × 100%.
- Width (medial axis) — the phase is skeletonised; at each point on the skeleton the distance-transform value × 2 gives the local thickness. Reported as min / avg / max in µm. This works both for continuous layers (thickness profile) and isolated particles (effective diameter).
- Components — number of separate connected regions of the phase.
Outputs
- Single — download the colored mask PNG and the label-map PNG (pixel values 0/1/2).
- Batch — export a CSV of all metrics, or a ZIP containing masks, label maps and the summary CSV.