File size: 1,390 Bytes
0bb1911
 
 
5a84e65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96d254b
 
 
5a84e65
 
 
 
 
 
 
 
 
 
 
96d254b
 
5a84e65
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: apache-2.0
---
# Instructions

### 1-Download
Download the singularity container.
```
wget https://huggingface.co/qicq1c/SuPreM/resolve/main/suprem_final.sif
```
### 2-Data preparation
This is how `inputs_data` organizes
```
    $inputs_data/
    β”œβ”€β”€ casename00001
    β”‚   └── ct.nii.gz
    β”œβ”€β”€ casename00002
    β”‚   └── ct.nii.gz
    β”œβ”€β”€ casename00003
    β”‚   └── ct.nii.gz
    ...
```

### 3-Inference
You can directly perform inference on your own data. Simply modify `inputs_data` into your data path and adjust `outputs_data` to specify the desired output location for the segmentation results.
```
SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity run --nv -B $inputs_data:/workspace/inputs -B $outputs_data:/workspace/outputs suprem_final.sif
```

This is how `outputs_data` organizes
```
    $outputs_data/
    β”œβ”€β”€ casename00001
    β”œβ”€β”€ casename00002
    β”œβ”€β”€ casename00003
        │── combined_labels.nii.gz
        └── segmentations
            β”œβ”€β”€ aorta.nii.gz
            β”œβ”€β”€ gall_bladder.nii.gz
            β”œβ”€β”€ kidney_left.nii.gz
            β”œβ”€β”€ kidney_right.nii.gz
            β”œβ”€β”€ liver.nii.gz
            β”œβ”€β”€ pancreas.nii.gz
            β”œβ”€β”€ postcava.nii.gz
            β”œβ”€β”€ spleen.nii.gz
            β”œβ”€β”€ stomach.nii.gz
    β”‚
    ...
```