Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ import antspynet as antspynet
|
|
| 14 |
from torch.utils.data import DataLoader
|
| 15 |
from monai.transforms import Compose, LoadImaged
|
| 16 |
from monai.networks.nets.efficientnet import EfficientNetBN
|
| 17 |
-
|
| 18 |
import dicom2nifti
|
| 19 |
|
| 20 |
|
|
@@ -108,7 +108,7 @@ if len(file_upload) == 1:
|
|
| 108 |
element2 = st.pyplot(ants.plot(display_image))
|
| 109 |
|
| 110 |
processed_image = pre_process(saved_path)
|
| 111 |
-
a = processed_image.to_nibabel()
|
| 112 |
saved_preprocessed_path = 'input_image'
|
| 113 |
nib.save(a, saved_preprocessed_path)
|
| 114 |
element3 = st.text("Preprocessed Image")
|
|
|
|
| 14 |
from torch.utils.data import DataLoader
|
| 15 |
from monai.transforms import Compose, LoadImaged
|
| 16 |
from monai.networks.nets.efficientnet import EfficientNetBN
|
| 17 |
+
import nibabel as nib
|
| 18 |
import dicom2nifti
|
| 19 |
|
| 20 |
|
|
|
|
| 108 |
element2 = st.pyplot(ants.plot(display_image))
|
| 109 |
|
| 110 |
processed_image = pre_process(saved_path)
|
| 111 |
+
a = nib.load(processed_image)#processed_image.to_nibabel()
|
| 112 |
saved_preprocessed_path = 'input_image'
|
| 113 |
nib.save(a, saved_preprocessed_path)
|
| 114 |
element3 = st.text("Preprocessed Image")
|