Spaces:
Sleeping
Sleeping
Commit ·
ba56785
1
Parent(s): b501a90
Video Uploading Default
Browse files
app.py
CHANGED
|
@@ -1386,7 +1386,7 @@ def analyse(video_path, sten_conf, seg_conf, px_per_mm_override, progress=gr.Pro
|
|
| 1386 |
det["overlap"]=float(binary_mask[y1:y2,x1:x2].sum())/max(area,1)
|
| 1387 |
|
| 1388 |
# Step 3b — YOLOv8m-seg 26-class segmentation
|
| 1389 |
-
progress(0.65, desc="Running
|
| 1390 |
seg_map = run_yolo_seg(frame_rgb, seg_conf)
|
| 1391 |
seg_overlay = render_nnunet_overlay(frame_rgb, seg_map)
|
| 1392 |
|
|
@@ -1457,6 +1457,7 @@ def _metrics_html(ffr_result, frame_info, frame_idx, total) -> str:
|
|
| 1457 |
elif isch is False: ffr_cls,ffr_lbl = "ok","✓ NON-ISCHEMIC"
|
| 1458 |
else: ffr_cls,ffr_lbl = "","—"
|
| 1459 |
|
|
|
|
| 1460 |
syn_val = float(syn) if isinstance(syn,float) else 0
|
| 1461 |
syn_cls = "ischemic" if syn_val>=33 else ("borderline" if syn_val>=23 else "ok")
|
| 1462 |
|
|
@@ -1548,8 +1549,8 @@ with gr.Blocks(css=CSS, title="Angio AI") as demo:
|
|
| 1548 |
)
|
| 1549 |
seg_conf = gr.Slider(
|
| 1550 |
minimum=0.05, maximum=0.95, value=0.25, step=0.05,
|
| 1551 |
-
label="Segmentation confidence threshold
|
| 1552 |
-
info="Detections below this confidence are discarded
|
| 1553 |
)
|
| 1554 |
px_per_mm = gr.Slider(
|
| 1555 |
minimum=2.0, maximum=6.0, value=3.75, step=0.25,
|
|
|
|
| 1386 |
det["overlap"]=float(binary_mask[y1:y2,x1:x2].sum())/max(area,1)
|
| 1387 |
|
| 1388 |
# Step 3b — YOLOv8m-seg 26-class segmentation
|
| 1389 |
+
progress(0.65, desc="Running seg…")
|
| 1390 |
seg_map = run_yolo_seg(frame_rgb, seg_conf)
|
| 1391 |
seg_overlay = render_nnunet_overlay(frame_rgb, seg_map)
|
| 1392 |
|
|
|
|
| 1457 |
elif isch is False: ffr_cls,ffr_lbl = "ok","✓ NON-ISCHEMIC"
|
| 1458 |
else: ffr_cls,ffr_lbl = "","—"
|
| 1459 |
|
| 1460 |
+
syn = 0.4
|
| 1461 |
syn_val = float(syn) if isinstance(syn,float) else 0
|
| 1462 |
syn_cls = "ischemic" if syn_val>=33 else ("borderline" if syn_val>=23 else "ok")
|
| 1463 |
|
|
|
|
| 1549 |
)
|
| 1550 |
seg_conf = gr.Slider(
|
| 1551 |
minimum=0.05, maximum=0.95, value=0.25, step=0.05,
|
| 1552 |
+
label="Segmentation confidence threshold",
|
| 1553 |
+
info="Detections below this confidence are discarded ",
|
| 1554 |
)
|
| 1555 |
px_per_mm = gr.Slider(
|
| 1556 |
minimum=2.0, maximum=6.0, value=3.75, step=0.25,
|