X-ray computed tomography (XCT) provides non-destructive three-dimensional (3D) images of particle packs, making their internal structure accessible for quantitative analysis. Extracting particle-level measurements from these volumes first requires identifying and separating individual particles, a task that remains challenging in dense, irregular packs. Existing workflows often require manual correction or task-specific training, while promptable models need a strategy for automatically locating individual particles and recovering their instance masks. We present ReplaySAM, which adapts the pretrained Segment Anything Model 2 (SAM2) to three-dimensional particle-pack segmentation without additional training. It generates point prompts from foreground geometry and fuses SAM2 predictions across orthogonal slice sequences to recover particle instances. On XCT volumes of real quartz and iron-ore particle packs, ReplaySAM achieves higher mean instance Dice scores than expert-assisted watershed and nnInteractive under the evaluated protocols. ReplaySAM thus provides a training-free framework for 3D particle-pack instance segmentation, with geometry-based prompting that eliminates manual prompt placement.
Figures & tables
Figure 1: Overview of ReplaySAM for 3D particle-pack instance segmentation. A tomogram is binarised and transformed using a 3D Euclidean distance transform; its local maxima provide particle-interior point prompts. For each prompt, the three orthogonal slice stacks are treated as pseudo-videos and processed independently by SAM2. The resulting volumetric hypotheses are fused by voxel-wise majority voting. Fused masks are written iteratively to form the output instance map.
Figure 2: 2D illustration of geometry-based prompt generation. From an input slice, ReplaySAM derives a binary mask and its Euclidean distance map, locates local maxima, removes maxima below the distance threshold, and removes redundant nearby maxima. The retained maxima serve as input point prompts for ReplaySAM. The same procedure is applied to 3D tomograms.
Figure 3: Reformulating single-particle volumetric segmentation as replayed video segmentation. Given a 3D point prompt, ReplaySAM treats the three orthogonal slice stacks as pseudo-videos. For each stack, the prompt is projected onto the corresponding 2D slice, and SAM2 propagates the particle mask bidirectionally across neighbouring slices from slice t . The predicted slices are reassembled into three axis-specific 3D masks, which are fused by voxel-wise majority voting to produce the final particle mask.
Figure 4: Example tomogram slices (top row) and corresponding ground-truth instance masks (bottom row) for the iron-ore, quartz, and synthetic datasets.
Dataset
Material
Volume size
Instances
iron-ore
Iron Ore
4004×2802×2802
7136
quartz
Quartz
5457×2424×2424
2880
synthetic
Synthetic (Iron Ore)
1024×1024×1024
500
Table 1: Evaluation volumes. Volume size denotes the dimensions of each 3D volume in voxels. “Instances” denotes the number of reference particle instances (i.e., particle masks) included in each volume.
Size class
Actual volume V ( voxels3 )
Equivalent-sphere radius req (voxels)
Small
<50,000
<23
Medium
50,000 – 500,000
23 – 49
Large
>500,000
>49
Table 2: Particle-size classes for the synthetic-volume evaluation. For scale interpretation, we treat each object as a sphere with the same volume, req=(4π3V)1/3 . This approximation is illustrative only; class assignment uses each object’s actual voxel volume.
Prompt strategy
Generated prompts
Dice
Total time (min)
Uniform grid
1,000,000
0.784
1501
Geometry-based (ours)
27,620
0.803
131
Table 3: Comparison of prompt-generation strategies on the synthetic iron-ore volume. The uniform baseline uses a 1003 grid, yielding 106 input prompts. Total time is the wall-clock time in minutes, including prompt generation and subsequent SAM2 inference. The best Dice score and shortest total time are bold.
Method
iron-ore
quartz
synthetic
Advanced watershed
0.925
0.932
0.971
nnInteractive
0.726
0.819
0.701
ReplaySAM
0.933
0.942
0.803
Table 4: Main comparison on the three evaluation volumes. Entries are mean instance Dice (higher is better); the best score in each column is bold.
Method
iron-ore
quartz
synthetic
Advanced watershed *
106
59
4
nnInteractive
1488
647
40
ReplaySAM
2477
1466
131
Table 5: Runtime comparison on the three evaluation volumes in minutes. The nnInteractive and ReplaySAM entries are end-to-end wall-clock runtimes measured on a single workstation. * The advanced-watershed entries report processing time only on a high-performance computing cluster, with CPU and memory resources varying among workflow substeps. They exclude time spent selecting parameters, inspecting segmentation quality, and rerunning a segmentation after an unsatisfactory result.
Variant
# Axes
Vote k
Zoom
Dice
Best single axis
1
–
yes
0.702
Intersection fusion
3
3
yes
0.693
Union fusion
3
1
yes
0.782
No zoom
3
2
no
0.727
ReplaySAM (default)
3
2
yes
0.803
Table 6: Ablation on the synthetic volume. # Axes denotes the number of orthogonal axes used for inference. Vote k denotes the minimum number of axis-wise masks that must contain a voxel for it to be retained in the fused mask. The default ReplaySAM configuration uses three axes, majority voting ( k=2 ) and zoomed inference. Entries are mean instance Dice (higher is better).
Size
w/o zoom
w/ zoom
Small
0.218
0.463
Medium
0.973
0.975
Large
0.982
0.976
Table 7: Mean instance Dice for ReplaySAM by particle-size class, comparing the same configuration without and with zoomed inference on the synthetic dataset.
Figure 5: Qualitative comparison on representative slices from the iron-ore, quartz, and synthetic volumes (top to bottom). Columns show the input tomogram and the corresponding instance maps from ReplaySAM, advanced watershed, and nnInteractive. Each colour denotes a predicted instance within a method and is not intended to establish instance correspondence across methods.
Department of Earth Science and Engineering, Imperial College London, London SW7 2AZ, United Kingdom · College of Petroleum Engineering, China University of Petroleum (Beijing), Beijing 102249, China