Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ def infer_full_vol(tensor, model):
|
|
21 |
output = output[0]
|
22 |
output = torch.sigmoid(output)
|
23 |
output = torch.movedim(output, -3, -1).type(tensor.type())
|
24 |
-
return output.detach().cpu().numpy()
|
25 |
|
26 |
# Set page configuration
|
27 |
st.set_page_config(
|
@@ -35,7 +35,7 @@ st.set_page_config(
|
|
35 |
with st.sidebar:
|
36 |
st.title("Segmenting vessels in the brain from a 3D Magnetic Resonance Angiograph, ideally acquired at 7T | DS6")
|
37 |
st.markdown("""
|
38 |
-
This application allows you to upload a 3D NIfTI file (dims: H x W x D), process it through a pre-trained 3D model (from DS6 and other related works), and download the output as a `.nii.gz` file containing the vessel segmentation.
|
39 |
|
40 |
**Instructions**:
|
41 |
- Upload your 3D NIfTI file (`.nii` or `.nii.gz`). It should be a single-slice cardiac long-axis dynamic CINE scan, where the first dimension represents time.
|
@@ -46,7 +46,7 @@ with st.sidebar:
|
|
46 |
st.markdown("© 2024 Soumick Chatterjee")
|
47 |
|
48 |
# Main content
|
49 |
-
st.header("
|
50 |
|
51 |
# File uploader
|
52 |
uploaded_file = st.file_uploader(
|
|
|
21 |
output = output[0]
|
22 |
output = torch.sigmoid(output)
|
23 |
output = torch.movedim(output, -3, -1).type(tensor.type())
|
24 |
+
return output.squeeze().detach().cpu().numpy()
|
25 |
|
26 |
# Set page configuration
|
27 |
st.set_page_config(
|
|
|
35 |
with st.sidebar:
|
36 |
st.title("Segmenting vessels in the brain from a 3D Magnetic Resonance Angiograph, ideally acquired at 7T | DS6")
|
37 |
st.markdown("""
|
38 |
+
This application allows you to upload a 3D NIfTI file (dims: H x W x D, where the final dim is the slice dim in the axial plane), process it through a pre-trained 3D model (from DS6 and other related works), and download the output as a `.nii.gz` file containing the vessel segmentation.
|
39 |
|
40 |
**Instructions**:
|
41 |
- Upload your 3D NIfTI file (`.nii` or `.nii.gz`). It should be a single-slice cardiac long-axis dynamic CINE scan, where the first dimension represents time.
|
|
|
46 |
st.markdown("© 2024 Soumick Chatterjee")
|
47 |
|
48 |
# Main content
|
49 |
+
st.header("DS6, Deformation-Aware Semi-Supervised Learning: Application to Small Vessel Segmentation with Noisy Training Data")
|
50 |
|
51 |
# File uploader
|
52 |
uploaded_file = st.file_uploader(
|