File size: 1,911 Bytes
0e91bec
a185e27
 
 
 
0e91bec
4697972
0e91bec
 
65204e4
0e91bec
 
a185e27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65204e4
a185e27
 
 
 
 
 
 
 
 
65204e4
 
a185e27
65204e4
 
a185e27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
title: Angio AI
emoji: 🫀
colorFrom: red
colorTo: blue
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
license: apache-2.0
---

# Angio AI — Coronary Angiography Analysis System

**MS Data Science Thesis · Information Technology University Lahore**  
**Supervisor: Dr. Arif Mehmood**

---

## What it does

Upload a coronary X-ray angiography (XCA) video and the pipeline automatically:

| Step | Module | Output |
|------|--------|--------|
| 1 | Keyframe extraction | Best diagnostic frame (contrast × sharpness score) |
| 2 | Mask2Former | Stenosis detection — bounding boxes + instance masks |
| 3a | ResUNet | Binary vessel mask (Dice 0.8015 on ARCADE) |
| 3b | YOLOv8m-seg | 26-class coronary anatomy segmentation |
| 4 | FFR Pipeline v4 | Quantitative Flow Ratio (QFR) estimation |
| 5 | SYNTAX Score | Lesion complexity scoring |

---

## Models

All checkpoints are stored in [`MuhammadAdil63/angio-ai-checkpoints`](https://huggingface.co/MuhammadAdil63/angio-ai-checkpoints) and downloaded automatically on first run.

| File | Architecture | Task | Performance |
|------|-------------|------|------------|
| `mask2former_best.pth` | Mask2Former Swin-Base | Stenosis detection | — |
| `binary_best.pth` | ResUNet (16→256 ch) | Binary vessel segmentation | Dice 0.8015 |
| `best.pt` | YOLOv8m-seg (nc=26) | 26-class coronary anatomy | — |

Dataset: [ARCADE Challenge](https://arcade.grand-challenge.org/) (syntax + stenosis splits)

---

## Notes

- **Hardware**: CPU-only (HF free tier) — inference takes ~30–60 seconds per video
- **Input**: MP4 / AVI coronary angiography video, ideally ≥5 seconds
- **Scale**: Default 3.75 px/mm (ARCADE hardware). Adjust slider for non-ARCADE data.
- **FFR formula**: QFR = 1 − (0.33·DS + 0.60·DS²) — Tu et al. JACC 2016 / FAVOR II

---

*This tool is for research purposes only and is not intended for clinical use.*