Update README.md
Browse files
README.md
CHANGED
|
@@ -40,6 +40,10 @@ ct_volume = organ_model.load_stack_from_dicom_folder("/path/to/dicom/folder", wi
|
|
| 40 |
# preprocess
|
| 41 |
x = model.preprocess(ct_volume, mode="3d", torchify=True, add_batch_dim=True, device=device)
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
# x is now torch.Tensor with shape (1, num_slices, num_channels, height, width)
|
| 44 |
# note that these are the expected dims for the model's forward method
|
| 45 |
|
|
|
|
| 40 |
# preprocess
|
| 41 |
x = model.preprocess(ct_volume, mode="3d", torchify=True, add_batch_dim=True, device=device)
|
| 42 |
|
| 43 |
+
# here, ct_volume is a numpy array
|
| 44 |
+
# if you are loading volumes as torch.Tensors, then you can skip the preprocess function
|
| 45 |
+
# and just resize the volume to height and width of 256 x 256
|
| 46 |
+
|
| 47 |
# x is now torch.Tensor with shape (1, num_slices, num_channels, height, width)
|
| 48 |
# note that these are the expected dims for the model's forward method
|
| 49 |
|