Update app.py
Browse files
app.py
CHANGED
|
@@ -297,7 +297,7 @@ def register_rigid_affine(prev_stripped: Path, new_stripped: Path, reg_dir: Path
|
|
| 297 |
return registered_path, affine_tx, fixed
|
| 298 |
|
| 299 |
|
| 300 |
-
@spaces.GPU(duration=
|
| 301 |
def run_flames_single(input_nii: Path, out_mask_path: Path, device: str = "cuda") -> Path:
|
| 302 |
"""Run FLAMeS (nnUNetv2) on a single input NIfTI and write a mask. Uses shared MODEL_ROOT."""
|
| 303 |
with (Path(input_nii).open("rb")):
|
|
@@ -508,7 +508,7 @@ def _redact_paths(s: str) -> str:
|
|
| 508 |
return s
|
| 509 |
|
| 510 |
|
| 511 |
-
@spaces.GPU(duration=
|
| 512 |
def run_pipeline(file1, file2, dilate_prev_radius_vox=1, min_lesion_vol_ml=0.01):
|
| 513 |
"""
|
| 514 |
file1: previous (baseline) FLAIR (.nii/.nii.gz or DICOM .zip)
|
|
@@ -800,7 +800,7 @@ with gr.Blocks(
|
|
| 800 |
rigid/affine co-registration of the two scans with SimpleITK,
|
| 801 |
and lesion segmentation using <em>FLAMeS</em> deep learning model.</p>
|
| 802 |
|
| 803 |
-
<p>
|
| 804 |
|
| 805 |
<p><strong>Note: This application is a <em>research preview</em>.
|
| 806 |
For clinical reporting, all results should be reviewed and validated by a qualified radiologist.</strong></p>
|
|
|
|
| 297 |
return registered_path, affine_tx, fixed
|
| 298 |
|
| 299 |
|
| 300 |
+
@spaces.GPU(duration=300)
|
| 301 |
def run_flames_single(input_nii: Path, out_mask_path: Path, device: str = "cuda") -> Path:
|
| 302 |
"""Run FLAMeS (nnUNetv2) on a single input NIfTI and write a mask. Uses shared MODEL_ROOT."""
|
| 303 |
with (Path(input_nii).open("rb")):
|
|
|
|
| 508 |
return s
|
| 509 |
|
| 510 |
|
| 511 |
+
@spaces.GPU(duration=300)
|
| 512 |
def run_pipeline(file1, file2, dilate_prev_radius_vox=1, min_lesion_vol_ml=0.01):
|
| 513 |
"""
|
| 514 |
file1: previous (baseline) FLAIR (.nii/.nii.gz or DICOM .zip)
|
|
|
|
| 800 |
rigid/affine co-registration of the two scans with SimpleITK,
|
| 801 |
and lesion segmentation using <em>FLAMeS</em> deep learning model.</p>
|
| 802 |
|
| 803 |
+
<p>Lesion difference masks between the two scans are then calculated and made available for download.</p>
|
| 804 |
|
| 805 |
<p><strong>Note: This application is a <em>research preview</em>.
|
| 806 |
For clinical reporting, all results should be reviewed and validated by a qualified radiologist.</strong></p>
|