Debug print pred shape
Browse files
app.py
CHANGED
|
@@ -32,6 +32,8 @@ def run(t1_file, t1ce_file, t2_file, flair_file):
|
|
| 32 |
model.to("cuda")
|
| 33 |
volume, affine = preprocess_volume(t1_file, t1ce_file, t2_file, flair_file)
|
| 34 |
pred = run_inference(model, volume, "cuda")
|
|
|
|
|
|
|
| 35 |
fig_path = make_slice_figure(volume, pred)
|
| 36 |
combined_path = make_combined_figure(volume, pred)
|
| 37 |
pdf_path = build_pdf_report(volume, pred, fig_path, combined_path)
|
|
|
|
| 32 |
model.to("cuda")
|
| 33 |
volume, affine = preprocess_volume(t1_file, t1ce_file, t2_file, flair_file)
|
| 34 |
pred = run_inference(model, volume, "cuda")
|
| 35 |
+
print("SPACE pred shape:", pred.shape)
|
| 36 |
+
print("SPACE TC sum:", pred[0].sum(), "WT sum:", pred[1].sum(), "ET sum:", pred[2].sum())
|
| 37 |
fig_path = make_slice_figure(volume, pred)
|
| 38 |
combined_path = make_combined_figure(volume, pred)
|
| 39 |
pdf_path = build_pdf_report(volume, pred, fig_path, combined_path)
|