MedAdapt-SAM-AI / visualizations /workflow_diagram.html
viraj-421's picture
Upload folder using huggingface_hub
1c1956b verified
Raw History Blame Contribute Delete
11.9 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MedAdapt-SAM Final Workflow</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-color: #7CA9E1;
--stage-bg: rgba(255, 255, 255, 0.18);
--title-yellow: #FFD966;
--box-blue-start: #B4D4FF;
--box-blue-end: #8EBAFF;
--oval-blue: #C4E4FF;
--db-green: #A2D9A2;
--border-primary: #7092BE;
--text-black: #000000;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-color);
padding: 60px 40px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
}
.main-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 40px;
max-width: 1400px;
width: 100%;
}
/* Top row layout */
.top-row {
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
width: 100%;
flex-wrap: nowrap;
}
.stage {
position: relative;
background: var(--stage-bg);
border: 2px dashed rgba(255, 255, 255, 0.6);
border-radius: 12px;
padding: 35px 15px 15px 15px;
display: flex;
flex-direction: column;
gap: 10px;
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
min-width: 200px;
}
.stage-title {
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
background: var(--title-yellow);
border: 1.5px solid #000;
padding: 6px 20px;
font-size: 0.85rem;
font-weight: 700;
white-space: nowrap;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
color: var(--text-black);
}
.box {
background: linear-gradient(to bottom, var(--box-blue-start), var(--box-blue-end));
border: 1.5px solid var(--border-primary);
border-radius: 6px;
padding: 10px;
text-align: center;
font-size: 0.8rem;
font-weight: 600;
color: var(--text-black);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.oval {
background: var(--oval-blue);
border: 1.5px solid var(--border-primary);
border-radius: 50px;
padding: 6px 14px;
font-size: 0.75rem;
font-style: italic;
text-align: center;
color: var(--text-black);
}
.database-node {
display: flex;
flex-direction: column;
align-items: center;
padding: 10px;
}
.db-shape {
width: 80px;
height: 100px;
background: linear-gradient(to bottom, #A2D9A2, #76C776);
border: 2px solid #558B55;
border-radius: 15px / 35px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
font-weight: 700;
font-size: 0.8rem;
position: relative;
margin-top: 15px;
}
.db-shape::before {
content: '';
position: absolute;
top: -12px;
left: -2px;
width: 100%;
height: 24px;
background: #A2D9A2;
border: 2px solid #558B55;
border-radius: 50%;
}
/* Flow elements */
.arrow-right {
width: 40px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.plus-sign {
font-size: 1.8rem;
font-weight: 900;
color: #FFF;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
padding: 0 10px;
}
.vertical-connector {
height: 50px;
display: flex;
justify-content: center;
align-items: center;
}
/* Bottom section refinement */
.bottom-section {
width: 100%;
display: flex;
justify-content: center;
}
.output-flow {
display: flex;
align-items: center;
justify-content: space-around;
width: 100%;
gap: 15px;
background: rgba(255, 255, 255, 0.1);
padding: 20px;
border-radius: 15px;
border: 2px solid rgba(255, 255, 255, 0.2);
}
.flow-step {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
flex: 1;
}
.flow-label {
font-size: 0.65rem;
font-weight: 800;
color: #FFF;
text-transform: uppercase;
letter-spacing: 1.5px;
opacity: 0.9;
}
.flow-arrow-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
}
.flow-tag {
font-size: 0.6rem;
background: #000;
color: #FFF;
padding: 2px 8px;
border-radius: 4px;
font-weight: 700;
}
/* Specific ID styles */
#stage1 {
background: transparent;
border: none;
box-shadow: none;
min-width: 150px;
}
.row-group {
display: flex;
align-items: center;
gap: 8px;
}
.line {
height: 1.5px;
background: #000;
width: 15px;
}
@media (max-width: 1024px) {
.top-row {
flex-wrap: wrap;
}
}
</style>
</head>
<body>
<div class="main-container">
<!-- TOP SECTION: Stages 1-4 -->
<div class="top-row">
<!-- Stage 1 -->
<div id="stage1" class="stage">
<div class="stage-title">1. Data Collection</div>
<div class="database-node">
<div class="db-shape">BraTS 2021<br>Dataset</div>
</div>
</div>
<div class="arrow-right">
<svg width="40" height="20" viewBox="0 0 40 20">
<path d="M0 10h32M28 5l10 5-10 5" stroke="#FFF" stroke-width="3" fill="none"
stroke-linecap="round" />
</svg>
</div>
<!-- Stage 2 -->
<div class="stage">
<div class="stage-title">2. Pre-processing</div>
<div class="row-group">
<div class="box" style="flex:1">Normalization</div>
<div class="line"></div>
<div class="oval" style="flex:1">Standardization</div>
</div>
<div class="row-group">
<div class="box" style="flex:1">Data Augmentation</div>
<div class="line"></div>
<div class="oval" style="flex:1">Rotate, Flip</div>
</div>
<div class="box">Resizing (256x256)</div>
<div class="box">Mask Binarization</div>
</div>
<div class="arrow-right">
<svg width="40" height="20" viewBox="0 0 40 20">
<path d="M0 10h32M28 5l10 5-10 5" stroke="#FFF" stroke-width="3" fill="none"
stroke-linecap="round" />
</svg>
</div>
<!-- Stage 3 -->
<div class="stage" style="min-width: 220px;">
<div class="stage-title">3. Prompt Engineering</div>
<div class="box">Box Prompts</div>
<div class="box">Point Prompts</div>
<div class="box">Hybrid Strategy</div>
<div class="box">Uncertainty-Guided</div>
</div>
<div class="plus-sign">+</div>
<!-- Stage 4 -->
<div class="stage" style="min-width: 220px;">
<div class="stage-title">4. Core Architecture</div>
<div class="box">SAM Backbone</div>
<div class="box">Domain Adapters</div>
<div class="box">Prompt Encoder</div>
<div class="box">Multi-Mask Head</div>
</div>
</div>
<!-- MIDDLE SECTION: Transition -->
<div class="vertical-connector">
<svg width="24" height="50" viewBox="0 0 24 50">
<path d="M12 0v40M7 35l5 10 5-10" stroke="#FFF" stroke-width="3" fill="none" stroke-linecap="round" />
</svg>
</div>
<!-- BOTTOM SECTION: Stage 5 perfected -->
<div class="bottom-section">
<div class="stage" style="min-width: 900px; padding-bottom: 30px;">
<div class="stage-title">5. Output & Representation</div>
<div class="output-flow">
<!-- Results -->
<div class="flow-step">
<div class="box"
style="width: 100%; height: 50px; display: flex; align-items: center; justify-content: center;">
Segmentation Results
</div>
<div class="flow-label">Primary Output</div>
</div>
<!-- Flow 1 -->
<div class="flow-arrow-container">
<div class="flow-tag">VALIDATE</div>
<svg width="40" height="20" viewBox="0 0 40 20">
<path d="M0 10h32M28 5l10 5-10 5" stroke="#FFF" stroke-width="2" fill="none" />
</svg>
</div>
<!-- Metrics -->
<div class="flow-step">
<div class="box"
style="width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, #FFD966, #F4B400);">
Dice / IoU Metrics
</div>
<div class="flow-label">Evaluation Engine</div>
</div>
<!-- Flow 2 -->
<div class="flow-arrow-container">
<div class="flow-tag">INTEGRATE</div>
<svg width="40" height="20" viewBox="0 0 40 20">
<path d="M0 10h32M28 5l10 5-10 5" stroke="#FFF" stroke-width="2" fill="none" />
</svg>
</div>
<!-- Web App -->
<div class="flow-step">
<div class="box"
style="width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom, #A2D9A2, #34A853); border-color: #2E7D32;">
Streamlit Web App
</div>
<div class="flow-label">Clinical Interface</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>