Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def infer_full_vol(tensor, model):
|
|
44 |
return output.squeeze().detach().cpu().numpy()
|
45 |
|
46 |
def infer_patch_based(tensor, model, patch_size=64, stride_length=32, stride_width=32, stride_depth=16, batch_size=10, num_worker=2):
|
47 |
-
test_subject = tio.Subject(img = tio.ScalarImage(tensor=tensor))
|
48 |
overlap = np.subtract(patch_size, (stride_length, stride_width, stride_depth))
|
49 |
|
50 |
with torch.no_grad():
|
|
|
44 |
return output.squeeze().detach().cpu().numpy()
|
45 |
|
46 |
def infer_patch_based(tensor, model, patch_size=64, stride_length=32, stride_width=32, stride_depth=16, batch_size=10, num_worker=2):
|
47 |
+
test_subject = tio.Subject(img = tio.ScalarImage(tensor=tensor.unsqueeze(0)))
|
48 |
overlap = np.subtract(patch_size, (stride_length, stride_width, stride_depth))
|
49 |
|
50 |
with torch.no_grad():
|