File size: 9,402 Bytes
b0bcfd5 e3566c9 b0bcfd5 e3566c9 b0bcfd5 e3566c9 b0bcfd5 | 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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | {% extends "base.html" %}
{% block title %}About β AI Medical Intelligence Pipeline{% endblock %}
{% block content %}
<section class="hero">
<div class="hero-text">
<h1>About This System</h1>
<p>
AI Medical Intelligence Pipeline for CT Scan Analysis with Explainability
and Clinical Reporting
</p>
</div>
</section>
<!-- System Overview -->
<section class="panel">
<h3>System Overview</h3>
<p>
This is an AI medical intelligence pipeline designed to analyze CT brain
scans for intracranial hemorrhage (ICH). It combines deep learning with visual
explainability, confidence calibration, and structured clinical reporting to
support β not replace β medical decision-making.
</p>
<div class="arch-flow">
<div class="arch-step">
<div class="arch-num">1</div>
<div class="arch-label">CT Brain Image Input</div>
</div>
<div class="arch-arrow">β</div>
<div class="arch-step">
<div class="arch-num">2</div>
<div class="arch-label">Preprocessing & CT Windowing</div>
</div>
<div class="arch-arrow">β</div>
<div class="arch-step">
<div class="arch-num">3</div>
<div class="arch-label">2.5D Detection (EfficientNet-B4)</div>
</div>
<div class="arch-arrow">β</div>
<div class="arch-step">
<div class="arch-num">4</div>
<div class="arch-label">Grad-CAM Explainability</div>
</div>
<div class="arch-arrow">β</div>
<div class="arch-step">
<div class="arch-num">5</div>
<div class="arch-label">Confidence Calibration</div>
</div>
<div class="arch-arrow">β</div>
<div class="arch-step">
<div class="arch-num">6</div>
<div class="arch-label">Clinical Report</div>
</div>
</div>
</section>
<!-- Technical Details -->
<section class="about-grid">
<article class="panel">
<h3>Model Architecture</h3>
<div class="kv-group">
<div class="kv">
<span>Architecture</span><strong>EfficientNet-B4 (timm)</strong>
</div>
<div class="kv">
<span>Input Representation</span><strong>2.5D (prev/center/next)</strong>
</div>
<div class="kv">
<span>Channels</span><strong>9 (3 CT windows Γ 3 slices)</strong>
</div>
<div class="kv"><span>Outputs</span><strong>6 heads (any + 5 subtypes)</strong></div>
<div class="kv">
<span>Inference Strategy</span><strong>5-fold ensemble (logit averaging)</strong>
</div>
</div>
</article>
<article class="panel">
<h3>CT Preprocessing</h3>
<div class="kv-group">
<div class="kv">
<span>Brain Window</span><strong>WC=40, WW=80</strong>
</div>
<div class="kv">
<span>Subdural Window</span><strong>WC=75, WW=215</strong>
</div>
<div class="kv">
<span>Soft Tissue Window</span><strong>WC=40, WW=380</strong>
</div>
<div class="kv">
<span>Channels</span><strong>3 (one per window)</strong>
</div>
<div class="kv">
<span>Format</span><strong>DICOM β HU β windowed RGB</strong>
</div>
</div>
</article>
<article class="panel">
<h3>Calibration</h3>
<div class="kv-group">
<div class="kv">
<span>Method</span
><strong>{{ calib.get('method', calib.get('best_method', 'N/A')) }}</strong>
</div>
{% if calib %}
<div class="kv">
<span>Temperature</span
><strong>{{ '%.4f'|format(calib.temperature) }}</strong>
</div>
<div class="kv">
<span>Threshold</span
><strong>{{ '%.4f'|format(calib.calibrated_threshold) }}</strong>
</div>
{% endif %}
<div class="kv">
<span>ECE (Raw β Calibrated)</span
><strong>{{ '%.4f'|format(calib.get('raw_ece', 0.0)) }} β {{ '%.4f'|format(calib.get('cal_ece', 0.0)) }}</strong>
</div>
<div class="kv">
<span>Bands</span
><strong>
HIGH (β₯{{ '%.2f'|format(calib.get('high_threshold', 0.7)) }}) Β·
MEDIUM ({{ '%.2f'|format(calib.get('low_threshold', 0.3)) }}β{{ '%.2f'|format(calib.get('high_threshold', 0.7)) }}) Β·
LOW (<{{ '%.2f'|format(calib.get('low_threshold', 0.3)) }})
</strong>
</div>
</div>
</article>
<article class="panel">
<h3>Explainability</h3>
<div class="kv-group">
<div class="kv"><span>Method</span><strong>Grad-CAM</strong></div>
<div class="kv">
<span>Target Layer</span><strong>Last convolutional block</strong>
</div>
<div class="kv">
<span>Output</span><strong>Heatmap overlay on input</strong>
</div>
<div class="kv">
<span>Purpose</span><strong>Visual evidence for review</strong>
</div>
</div>
</article>
</section>
<!-- Confidence-Aware Triage -->
<section class="panel" style="margin-top: 16px">
<h3>Confidence-Aware Triage System</h3>
<p>
Instead of a simple binary output, the system incorporates prediction
confidence into a three-band triage workflow:
</p>
<div class="triage-grid">
<div class="triage-card triage-high">
<div class="triage-header">
<span class="badge badge-high">HIGH</span>
<span>β₯ {{ '%.2f'|format(calib.get('high_threshold', 0.7)) }} calibrated probability</span>
</div>
<p><strong>If positive:</strong> Urgent radiologist review recommended</p>
<p><strong>If negative:</strong> Standard workflow β no urgent action</p>
</div>
<div class="triage-card triage-medium">
<div class="triage-header">
<span class="badge badge-medium">MEDIUM</span>
<span>{{ '%.2f'|format(calib.get('low_threshold', 0.3)) }} β {{ '%.2f'|format(calib.get('high_threshold', 0.7)) }}</span>
</div>
<p>
<strong>If positive:</strong> Prioritised radiologist review recommended
</p>
<p>
<strong>If negative:</strong> Standard workflow β manual review if
clinically indicated
</p>
</div>
<div class="triage-card triage-low">
<div class="triage-header">
<span class="badge badge-low">LOW</span>
<span>< {{ '%.2f'|format(calib.get('low_threshold', 0.3)) }}</span>
</div>
<p>
<strong>If positive:</strong> Radiologist review recommended β low
confidence
</p>
<p>
<strong>If negative:</strong> Manual review recommended β model
uncertainty high
</p>
</div>
</div>
</section>
<!-- Dataset -->
<section class="panel" style="margin-top: 16px">
<h3>Dataset</h3>
<div class="kv-group" style="max-width: 600px">
<div class="kv">
<span>Source</span><strong>RSNA Intracranial Hemorrhage Detection</strong>
</div>
<div class="kv">
<span>Modality</span><strong>CT brain (axial slices)</strong>
</div>
<div class="kv"><span>Format</span><strong>DICOM</strong></div>
<div class="kv">
<span>Task</span><strong>Any-hemorrhage screening + subtype-aware outputs</strong>
</div>
</div>
</section>
<!-- Ethical Considerations -->
<section class="panel" style="margin-top: 16px">
<h3>Ethical Considerations & Limitations</h3>
<div class="ethics-columns">
<div>
<h4>This System Is:</h4>
<ul class="check-list">
<li>A screening and decision-support tool</li>
<li>Designed to assist, not replace, medical professionals</li>
<li>Transparent via Grad-CAM visual evidence</li>
<li>Calibrated for reliable confidence scores</li>
<li>Built on publicly available, ethically sourced data</li>
</ul>
</div>
<div>
<h4>This System Is NOT:</h4>
<ul class="cross-list">
<li>A diagnostic device or medical diagnosis tool</li>
<li>A replacement for qualified radiologist review</li>
<li>Cleared for standalone clinical deployment</li>
<li>A substitute for clinical subtype confirmation</li>
<li>Validated for real-time hospital use</li>
</ul>
</div>
</div>
</section>
<!-- Disclaimer -->
<section class="disclaimer-box" style="margin-top: 16px">
<strong>Important Disclaimer:</strong>
This system is produced by an AI-assisted screening tool and does NOT
constitute a medical diagnosis. All screening findings must be reviewed and
confirmed by a qualified, licensed medical professional before any clinical
decision is made. The system is intended solely as a decision-support aid in a
screening workflow and is not cleared for standalone diagnostic use.
</section>
<!-- Technology Stack -->
<section class="panel" style="margin-top: 16px">
<h3>Technology Stack</h3>
<div class="tech-tags">
<span class="tech-tag">Python</span>
<span class="tech-tag">PyTorch</span>
<span class="tech-tag">EfficientNet-B4</span>
<span class="tech-tag">timm</span>
<span class="tech-tag">2.5D Context</span>
<span class="tech-tag">5-Fold Ensemble</span>
<span class="tech-tag">Isotonic Calibration</span>
<span class="tech-tag">OpenCV</span>
<span class="tech-tag">NumPy</span>
<span class="tech-tag">Pandas</span>
<span class="tech-tag">Matplotlib</span>
<span class="tech-tag">Grad-CAM</span>
<span class="tech-tag">Flask</span>
<span class="tech-tag">pydicom</span>
<span class="tech-tag">scikit-learn</span>
</div>
</section>
{% endblock %}
|