Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,6 @@ 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 |
-
import nibabel as nib
|
| 18 |
import dicom2nifti
|
| 19 |
|
| 20 |
|
|
@@ -108,7 +107,8 @@ if len(file_upload) == 1:
|
|
| 108 |
element2 = st.pyplot(ants.plot(display_image))
|
| 109 |
|
| 110 |
processed_image = pre_process(saved_path)
|
| 111 |
-
a
|
|
|
|
| 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 dicom2nifti
|
| 18 |
|
| 19 |
|
|
|
|
| 107 |
element2 = st.pyplot(ants.plot(display_image))
|
| 108 |
|
| 109 |
processed_image = pre_process(saved_path)
|
| 110 |
+
a=ants.utils.convert_nibabel.to_nibabel(processed_image)
|
| 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")
|