# Adapting the Segment Anything Model for Volumetric X-ray Data-Sets of Arbitrary Sizes
## 3 Results
### Tile-Based Algorithms and Artefact Mitigation
The correlation matrices show the IoU of each reference segment in relation to each detected segment. The reference segments are sorted from top to bottom based on their voxel count, with the segment having the largest voxel count at the top. Similarly, the columns representing the detected segments are sorted so that the segment with the highest IoU, if compared with the largest reference segment, is on the left side. The segment with the highest IoU if compared with the second largest reference segment is then placed in the second column and so on. Each detected segment can only be linked to one reference segment once. In an ideal case, we would see a bright diagonal line from the upper left corner to the lower right corner of the matrix, indicating a perfect match between the reference and detected segments. Segments outside this diagonal indicate segmentation errors. Vertical lines indicate under-segmentation, where reference segments extend over multiple detected segments. Horizontal lines indicate over-segmentation, where reference segments are falsely split into multiple detected segments. The individual parameters of the four inference runs can be found in Table 3. Figure 17 displays correlation matrices from Figure 16 but constrained to the detected segments with the highest IoU. Figure 16: Correlation matrix of default and fine-tuned volumetric SAM with multiple tiles of size \(48\times 48\times 48\) voxels or a single tile of size \(1024\times 1024\times 1024\) voxels of the Me 163 testing data-set. Figure 17: Correlation matrix of default and find-tuned volumetric SAM with multiple tiles of size \(48\times 48\times 48\) voxels or a single tile of size \(1024\times 1024\times 1024\) voxels of the Me 163 testing data-set. Detected segments have been limited to the best matches for each reference segment. As can be seen, the vit_bCVB models tends to generate more noise outside the main diagonal. Figure 17d especially depicts many over- and under-segmented segments. This can also be observed in the corresponding segmentation volume slice shown in Figure 18e.j. The correlation matrix of the fine-tuned vit_bCVB model with tile size \(48\times 48\times 48\) voxels in Figure 17c seems to perform best with respect to diagonal segments. But comparing the corresponding segmentation volume slice in Figure 18h shows that this model, tile, and parameter combination tends to miss most of the foreground segments. It seems that the default vit_b model with tile size \(1024\times 1024\times 1024\) voxels produces the visually best results, followed by the fine-tuned vit_bCVB model with tile size \(48\times 48\times 48\) shown in Figure 18c. Figure 19 presents multiple renderings of the seven largest reference segments in the Me 163 testing data-set, alongside their corresponding segment predictions generated by different SAM snapshots using the volumetric algorithm and fine-tuned parameters. The _true positive_ voxels are coloured green, the reference segments are coloured blue, and the _false positive_ voxels are coloured orange. It is evident that the volumetric segmentation of the data-sets using tiles of size \(1024\times 1024\times 1024\) voxels yields visually more appealing segments compared to using a tile size of \(48\times 48\times 48\) voxels. The predicted segmentation using the tile size of \(48\times 48\times 48\) voxels often appears _empty_, as only a small count of voxels has been segmented correctly. This is because the segmentation quality of the algorithm is too poor to generate connected tiles and so often, only a limited amount of steps (see Section 2.3.2) will be iterated for each segment. The segments are interrupted and only found in pieces. However, using a tile size of \(48\times 48\times 48\) voxels also often leads to under-segmentation. Figure 20 exemplifies this, showcasing two orthogonal slices from the fine-tuned vit_bCVB model's segmentation output. On the left, we present the reference segments and on the right, the corresponding predictions.