Spaces:
Sleeping
Sleeping
typo
Browse files
lungtumormask/dataprocessing.py
CHANGED
@@ -10,7 +10,7 @@ from monai.transforms import (Compose, LoadImaged, ToNumpyd, ThresholdIntensityd
|
|
10 |
|
11 |
def mask_lung(scan_path, batch_size=20):
|
12 |
model = lungmask.mask.get_model('unet', 'R231')
|
13 |
-
if
|
14 |
device = torch.device('cuda')
|
15 |
model.to(device)
|
16 |
|
|
|
10 |
|
11 |
def mask_lung(scan_path, batch_size=20):
|
12 |
model = lungmask.mask.get_model('unet', 'R231')
|
13 |
+
if torch.cuda.is_available():
|
14 |
device = torch.device('cuda')
|
15 |
model.to(device)
|
16 |
|