Spaces:
Sleeping
Sleeping
Commit ·
b7bef7e
1
Parent(s): d780007
Refactor DocsPage UI to API dark-neon style
Browse files
BacSense_v2_Technical_Documentation.docx-1.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf372800de468169f3e1fff7acd2eb447a4fc9c87398a096a986da11d217ecd3
|
| 3 |
+
size 299570
|
frontend/src/pages/DocsPage.tsx
CHANGED
|
@@ -1,212 +1,304 @@
|
|
| 1 |
-
import { useEffect } from "react";
|
| 2 |
|
| 3 |
export const DocsPage = () => {
|
| 4 |
useEffect(() => {
|
| 5 |
window.scrollTo(0, 0);
|
| 6 |
}, []);
|
| 7 |
|
|
|
|
|
|
|
| 8 |
return (
|
| 9 |
-
<main className="
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
<
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
</div>
|
| 29 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
<h3 className="text-3xl font-display font-bold mb-6 flex items-center gap-3">
|
| 34 |
-
<span className="material-symbols-outlined text-primary text-3xl">lightbulb</span>
|
| 35 |
-
1. Executive Summary
|
| 36 |
-
</h3>
|
| 37 |
-
<div className="bg-white/50 dark:bg-slate-800/50 backdrop-blur-md p-8 rounded-3xl border border-slate-200 dark:border-slate-700 shadow-xl prose prose-slate dark:prose-invert max-w-none">
|
| 38 |
-
<p className="lead text-lg">
|
| 39 |
-
<strong>BacSense v2</strong> is a two-stage cascaded hybrid classifier for the identification of five waterborne bacterial species from Gram-stained microscopy images. The system combines deep transfer learning (VGG16) with rich hand-crafted feature engineering and a binary specialist Support Vector Machine to resolve a critical confusion pair that the original single-stage model completely failed on.
|
| 40 |
</p>
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
</div>
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
</div>
|
| 58 |
-
</div>
|
| 59 |
-
</div>
|
| 60 |
-
</section>
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
</div>
|
| 68 |
-
<h3 className="text-2xl font-bold font-display text-slate-900 dark:text-white mb-4">Stage 1: Main Classifier</h3>
|
| 69 |
-
<p className="text-slate-600 dark:text-slate-300 text-sm leading-relaxed mb-6">
|
| 70 |
-
Uses a frozen <strong>VGG16</strong> backbone extracting semantic structural features fed into a PCA-reduced 94-dimensional RBF Support Vector Machine.
|
| 71 |
-
</p>
|
| 72 |
-
<ul className="space-y-3 text-sm font-medium">
|
| 73 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-blue-500">done</span> 5-Class Base Identification</li>
|
| 74 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-blue-500">done</span> 95.65% Baseline Accuracy</li>
|
| 75 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-blue-500">done</span> Triggers Specialist if Conf < 90%</li>
|
| 76 |
-
</ul>
|
| 77 |
-
</div>
|
| 78 |
|
| 79 |
-
|
| 80 |
-
<div className="
|
| 81 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
</div>
|
| 83 |
-
<h3 className="text-2xl font-bold font-display text-slate-900 dark:text-white mb-4">Stage 2: Specialist Evaluator</h3>
|
| 84 |
-
<p className="text-slate-600 dark:text-slate-300 text-sm leading-relaxed mb-6">
|
| 85 |
-
An <strong>RBF-SVM Binary Specialist</strong> explicitly formulated for differentiating <em>E. coli</em> and <em>P. aeruginosa</em> via 683-dimensional multi-domain matrices.
|
| 86 |
-
</p>
|
| 87 |
-
<ul className="space-y-3 text-sm font-medium">
|
| 88 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-orange-500">done</span> 683-dim Hand-crafted + Deep Features</li>
|
| 89 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-orange-500">done</span> 0.9863 ROC-AUC Score</li>
|
| 90 |
-
<li className="flex gap-3 text-slate-700 dark:text-slate-200"><span className="material-symbols-outlined text-orange-500">done</span> Virtually eliminates false-positives</li>
|
| 91 |
-
</ul>
|
| 92 |
-
</div>
|
| 93 |
-
</section>
|
| 94 |
-
|
| 95 |
-
{/* 3. Deep Dive into Specialist Features */}
|
| 96 |
-
<section className="mb-16">
|
| 97 |
-
<h3 className="text-3xl font-display font-bold mb-6 flex items-center gap-3">
|
| 98 |
-
<span className="material-symbols-outlined text-primary text-3xl">psychology</span>
|
| 99 |
-
Specialist Feature Engineering
|
| 100 |
-
</h3>
|
| 101 |
-
<div className="glass rounded-3xl overflow-hidden border border-slate-200 dark:border-slate-800 shadow-xl overflow-x-auto">
|
| 102 |
-
<table className="w-full text-left border-collapse min-w-[800px]">
|
| 103 |
-
<thead className="bg-slate-50 dark:bg-slate-800/80 border-b border-slate-200 dark:border-slate-700">
|
| 104 |
-
<tr>
|
| 105 |
-
<th className="px-6 py-4 text-xs font-bold w-1/4 uppercase tracking-wider text-slate-500">Feature Modality</th>
|
| 106 |
-
<th className="px-6 py-4 text-xs font-bold w-[10%] uppercase tracking-wider text-slate-500">Dims</th>
|
| 107 |
-
<th className="px-6 py-4 text-xs font-bold uppercase tracking-wider text-slate-500">Discriminative Target Signal</th>
|
| 108 |
-
</tr>
|
| 109 |
-
</thead>
|
| 110 |
-
<tbody className="divide-y divide-slate-200 dark:divide-slate-800 text-sm text-slate-700 dark:text-slate-300">
|
| 111 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 112 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">VGG16 Deep Features</td>
|
| 113 |
-
<td className="px-6 py-4 font-mono text-primary">512</td>
|
| 114 |
-
<td className="px-6 py-4">High-level semantic structural gradients. Extracts baseline foundational geometries.</td>
|
| 115 |
-
</tr>
|
| 116 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 117 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">LBP Histogram</td>
|
| 118 |
-
<td className="px-6 py-4 font-mono text-primary">59</td>
|
| 119 |
-
<td className="px-6 py-4">Local Binary Patterns (P=8, R=1). Catches local texture micro-aggregations distinct to <em>P. aeruginosa</em> biofilms.</td>
|
| 120 |
-
</tr>
|
| 121 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 122 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">HSV Bins</td>
|
| 123 |
-
<td className="px-6 py-4 font-mono text-primary">48</td>
|
| 124 |
-
<td className="px-6 py-4">Color distribution vectors mapped to isolate variations in staining saturation and intensity drops.</td>
|
| 125 |
-
</tr>
|
| 126 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 127 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">GLCM Descriptors</td>
|
| 128 |
-
<td className="px-6 py-4 font-mono text-primary">24</td>
|
| 129 |
-
<td className="px-6 py-4">Co-occurrence measurements at varying rotational angles detecting localized bacterial density changes.</td>
|
| 130 |
-
</tr>
|
| 131 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 132 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">Spatial Density</td>
|
| 133 |
-
<td className="px-6 py-4 font-mono text-primary">16</td>
|
| 134 |
-
<td className="px-6 py-4">4x4 raster grid assessing clustering severity vs. uniform dispersal of individual bacilli.</td>
|
| 135 |
-
</tr>
|
| 136 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 137 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">Morphology</td>
|
| 138 |
-
<td className="px-6 py-4 font-mono text-primary">5</td>
|
| 139 |
-
<td className="px-6 py-4">Exact Area, Perimeter, Circularity, and Aspect Ratios extracted from raw contours.</td>
|
| 140 |
-
</tr>
|
| 141 |
-
<tr className="hover:bg-slate-50/50 dark:hover:bg-slate-800/50">
|
| 142 |
-
<td className="px-6 py-4 font-bold text-slate-900 dark:text-white">Curvature Vectors</td>
|
| 143 |
-
<td className="px-6 py-4 font-mono text-primary">3</td>
|
| 144 |
-
<td className="px-6 py-4">Bending limits. Differentiates rigid <em>E. coli</em> rods from the characteristically curved <em>P. aeruginosa</em> forms.</td>
|
| 145 |
-
</tr>
|
| 146 |
-
</tbody>
|
| 147 |
-
</table>
|
| 148 |
</div>
|
| 149 |
-
</section>
|
| 150 |
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
<section className="mb-16">
|
| 154 |
-
<div className="bg-gradient-to-br from-slate-900 to-slate-800 rounded-3xl p-8 lg:p-12 text-white border border-slate-700 shadow-2xl relative overflow-hidden">
|
| 155 |
-
<div className="absolute top-0 right-0 opacity-10 blur-3xl w-96 h-96 bg-primary rounded-full translate-x-1/3 -translate-y-1/3"></div>
|
| 156 |
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
<strong className="block text-xl italic text-blue-300 mb-2">E. coli</strong>
|
| 165 |
-
<div className="flex gap-2 font-bold mb-3">
|
| 166 |
-
<span className="text-xs bg-red-500/20 text-red-200 px-2 py-0.5 rounded tracking-wider border border-red-500/30">GRAM -</span>
|
| 167 |
-
<span className="text-xs bg-blue-500/20 text-blue-200 px-2 py-0.5 rounded tracking-wider border border-blue-500/30">ROD</span>
|
| 168 |
</div>
|
| 169 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
|
| 172 |
-
<div className="
|
| 173 |
-
<
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
<
|
| 178 |
-
|
|
|
|
|
|
|
| 179 |
</div>
|
| 180 |
|
| 181 |
-
<div
|
| 182 |
-
<
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
<
|
| 187 |
-
|
|
|
|
|
|
|
|
|
|
| 188 |
</div>
|
|
|
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 195 |
</div>
|
| 196 |
-
<p className="text-sm text-slate-300">Resilient intestinal pathogen indicating prolonged exposure or remote sewage leakage.</p>
|
| 197 |
</div>
|
|
|
|
| 198 |
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
</div>
|
| 205 |
-
<p className="text-sm text-slate-300">Able to rapidly divide and multiply in near-freezing or low-temperature systems.</p>
|
| 206 |
</div>
|
| 207 |
</div>
|
|
|
|
| 208 |
</div>
|
| 209 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
</main>
|
| 211 |
);
|
| 212 |
};
|
|
|
|
|
|
| 1 |
+
import { useEffect, useState } from "react";
|
| 2 |
|
| 3 |
export const DocsPage = () => {
|
| 4 |
useEffect(() => {
|
| 5 |
window.scrollTo(0, 0);
|
| 6 |
}, []);
|
| 7 |
|
| 8 |
+
const [activeSection, setActiveSection] = useState("quickstart");
|
| 9 |
+
|
| 10 |
return (
|
| 11 |
+
<main className="min-h-screen bg-[#0b101e] text-slate-300 font-sans pt-20 flex">
|
| 12 |
+
|
| 13 |
+
{/* Left Sidebar */}
|
| 14 |
+
<aside className="w-64 flex-shrink-0 border-r border-slate-800/60 hidden lg:block overflow-y-auto h-[calc(100vh-5rem)] sticky top-20 custom-scrollbar pb-10">
|
| 15 |
+
<div className="p-6">
|
| 16 |
+
<div className="mb-8">
|
| 17 |
+
<h4 className="text-xs font-bold text-slate-500 tracking-widest uppercase mb-4">Introduction</h4>
|
| 18 |
+
<ul className="space-y-2 text-sm">
|
| 19 |
+
<li>
|
| 20 |
+
<button
|
| 21 |
+
onClick={() => setActiveSection("quickstart")}
|
| 22 |
+
className={`w-full text-left flex items-center gap-3 px-3 py-2 rounded-lg transition-colors ${activeSection === "quickstart" ? "text-[#00e599] bg-[#00e599]/10" : "text-slate-400 hover:text-slate-200 hover:bg-slate-800/50"}`}
|
| 23 |
+
>
|
| 24 |
+
<span className="material-symbols-outlined text-[18px]">verified</span>
|
| 25 |
+
Overview
|
| 26 |
+
</button>
|
| 27 |
+
</li>
|
| 28 |
+
<li>
|
| 29 |
+
<button
|
| 30 |
+
onClick={() => setActiveSection("architecture")}
|
| 31 |
+
className={`w-full text-left flex items-center gap-3 px-3 py-2 rounded-lg transition-colors ${activeSection === "architecture" ? "text-[#00e599] bg-[#00e599]/10" : "text-slate-400 hover:text-slate-200 hover:bg-slate-800/50"}`}
|
| 32 |
+
>
|
| 33 |
+
<span className="material-symbols-outlined text-[18px]">account_tree</span>
|
| 34 |
+
Architecture
|
| 35 |
+
</button>
|
| 36 |
+
</li>
|
| 37 |
+
</ul>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
<div className="mb-8">
|
| 41 |
+
<h4 className="text-xs font-bold text-slate-500 tracking-widest uppercase mb-4">Stages</h4>
|
| 42 |
+
<ul className="space-y-2 text-sm">
|
| 43 |
+
<li className="flex items-center justify-between group">
|
| 44 |
+
<button className="text-slate-400 hover:text-slate-200 px-3 py-1.5 transition-colors">Stage 1: VGG16</button>
|
| 45 |
+
<span className="text-[10px] font-bold bg-[#00e599]/20 text-[#00e599] px-1.5 py-0.5 rounded mr-3">MAIN</span>
|
| 46 |
+
</li>
|
| 47 |
+
<li className="flex items-center justify-between group">
|
| 48 |
+
<button className="text-slate-400 hover:text-slate-200 px-3 py-1.5 transition-colors">Stage 2: Specialist</button>
|
| 49 |
+
<span className="text-[10px] font-bold bg-[#00e599]/20 text-[#00e599] px-1.5 py-0.5 rounded mr-3">V2</span>
|
| 50 |
+
</li>
|
| 51 |
+
</ul>
|
| 52 |
+
</div>
|
| 53 |
+
|
| 54 |
+
<div>
|
| 55 |
+
<h4 className="text-xs font-bold text-slate-500 tracking-widest uppercase mb-4">Reference</h4>
|
| 56 |
+
<ul className="space-y-3 text-sm">
|
| 57 |
+
<li><button className="text-slate-400 hover:text-slate-200 px-3 transition-colors">Feature Engineering</button></li>
|
| 58 |
+
<li><button className="text-slate-400 hover:text-slate-200 px-3 transition-colors">Pathogen Scope</button></li>
|
| 59 |
+
<li><button className="text-slate-400 hover:text-slate-200 px-3 transition-colors">Performance</button></li>
|
| 60 |
+
</ul>
|
| 61 |
+
</div>
|
| 62 |
</div>
|
| 63 |
+
</aside>
|
| 64 |
+
|
| 65 |
+
{/* Main Content Area */}
|
| 66 |
+
<div className="flex-1 w-full flex flex-col xl:flex-row h-[calc(100vh-5rem)] overflow-y-auto">
|
| 67 |
+
|
| 68 |
+
{/* Center Document */}
|
| 69 |
+
<div className="flex-1 max-w-4xl px-8 py-10 lg:px-12 pb-24">
|
| 70 |
+
|
| 71 |
+
<div className="flex items-center gap-4 mb-6">
|
| 72 |
+
<span className="bg-[#00e599]/20 text-[#00e599] font-mono text-sm font-bold px-3 py-1 rounded border border-[#00e599]/30">V2.0</span>
|
| 73 |
+
<h1 className="text-4xl md:text-5xl font-display font-bold text-white tracking-tight">/architecture</h1>
|
| 74 |
+
</div>
|
| 75 |
|
| 76 |
+
<p className="text-slate-400 text-lg leading-relaxed mb-8">
|
| 77 |
+
The primary architecture used by the BacSense classification pipeline. Takes an input microscopy image, runs a two-stage cascaded hybrid evaluation (VGG16 + Hand-Crafted Features), and returns the predicted bacterial species with confidence metrics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
</p>
|
| 79 |
+
|
| 80 |
+
<div className="flex items-center gap-3 bg-[#131b2f] border border-slate-700/50 rounded-lg px-4 py-3 mb-12 font-mono text-sm text-slate-300 w-fit">
|
| 81 |
+
<span className="material-symbols-outlined text-[#00e599] text-[18px]">bolt</span>
|
| 82 |
+
<span className="text-slate-500">BASE MODEL:</span>
|
| 83 |
+
<span className="text-[#00e599]">Cascaded_Hybrid_Classifier</span>
|
| 84 |
+
</div>
|
| 85 |
+
|
| 86 |
+
<div className="mb-12 relative">
|
| 87 |
+
<div className="absolute left-0 top-0 bottom-0 w-1 bg-[#00e599] rounded-full"></div>
|
| 88 |
+
<h2 className="text-2xl font-bold text-white mb-6 pl-5">Pipeline Execution — /predict</h2>
|
| 89 |
+
|
| 90 |
+
<div className="bg-[#111827] border border-slate-800 rounded-xl overflow-hidden mb-6">
|
| 91 |
+
<div className="grid grid-cols-1 md:grid-cols-[1fr_2fr] divide-y md:divide-y-0 md:divide-x divide-slate-800">
|
| 92 |
+
<div className="p-5 flex flex-col justify-center">
|
| 93 |
+
<div className="flex items-center justify-between mb-2">
|
| 94 |
+
<code className="text-blue-400 font-bold">Image</code>
|
| 95 |
+
<span className="text-xs text-slate-500 font-semibold tracking-wider">FILE | REQUIRED</span>
|
| 96 |
+
</div>
|
| 97 |
+
<p className="text-sm text-slate-400">Microscopy image of water sample.</p>
|
| 98 |
+
</div>
|
| 99 |
+
<div className="p-5 flex flex-col justify-center bg-[#0d131f]">
|
| 100 |
+
<p className="text-sm text-slate-300">Accepted formats: .jpg, .jpeg, .png. Image should contain clearly visible Gram-stained bacterial formations.</p>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
</div>
|
| 104 |
+
|
| 105 |
+
<div className="bg-[#111827] border border-slate-800 rounded-xl overflow-hidden mb-6">
|
| 106 |
+
<div className="grid grid-cols-1 md:grid-cols-[1fr_2fr] divide-y md:divide-y-0 md:divide-x divide-slate-800">
|
| 107 |
+
<div className="p-5 flex flex-col justify-center">
|
| 108 |
+
<div className="flex items-center justify-between mb-2">
|
| 109 |
+
<code className="text-blue-400 font-bold">Stage 1: VGG16</code>
|
| 110 |
+
<span className="text-xs text-slate-500 font-semibold tracking-wider">NET | CORE</span>
|
| 111 |
+
</div>
|
| 112 |
+
<p className="text-sm text-slate-400">Main Classifier Backbone.</p>
|
| 113 |
+
</div>
|
| 114 |
+
<div className="p-5 flex flex-col justify-center bg-[#0d131f]">
|
| 115 |
+
<p className="text-sm text-slate-300">Outputs a 5-class prediction. If confidence is <90% on E.coli/P.aeruginosa, it triggers the specialist.</p>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
</div>
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
+
<div className="bg-[#111827] border border-slate-800 rounded-xl overflow-hidden">
|
| 121 |
+
<div className="grid grid-cols-1 md:grid-cols-[1fr_2fr] divide-y md:divide-y-0 md:divide-x divide-slate-800">
|
| 122 |
+
<div className="p-5 flex flex-col justify-center">
|
| 123 |
+
<div className="flex items-center justify-between mb-2">
|
| 124 |
+
<code className="text-blue-400 font-bold">Stage 2: Specialist</code>
|
| 125 |
+
<span className="text-xs text-slate-500 font-semibold tracking-wider">SVM | CONDITIONAL</span>
|
| 126 |
+
</div>
|
| 127 |
+
<p className="text-sm text-slate-400">683-dim RBF-SVM Evaluator.</p>
|
| 128 |
+
</div>
|
| 129 |
+
<div className="p-5 flex flex-col justify-center bg-[#0d131f]">
|
| 130 |
+
<p className="text-sm text-slate-300">Explicitly formulated to differentiate E. coli and P. aeruginosa using hand-crafted and deep features.</p>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
</div>
|
| 134 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
+
{/* Specialist Features Scope */}
|
| 137 |
+
<div className="mb-12 relative">
|
| 138 |
+
<div className="absolute left-0 top-0 bottom-0 w-1 bg-blue-500 rounded-full"></div>
|
| 139 |
+
<h2 className="text-2xl font-bold text-white mb-6 pl-5">Specialist Matrix — /features</h2>
|
| 140 |
+
<div className="bg-[#111827] rounded-xl border border-slate-800 overflow-hidden">
|
| 141 |
+
<table className="w-full text-left text-sm">
|
| 142 |
+
<thead className="bg-[#0d131f] border-b border-slate-800 text-slate-400">
|
| 143 |
+
<tr>
|
| 144 |
+
<th className="px-5 py-3 font-semibold w-1/4">Modality</th>
|
| 145 |
+
<th className="px-5 py-3 font-semibold text-[#00e599] w-[15%]">Dims</th>
|
| 146 |
+
<th className="px-5 py-3 font-semibold">Target Signal</th>
|
| 147 |
+
</tr>
|
| 148 |
+
</thead>
|
| 149 |
+
<tbody className="divide-y divide-slate-800">
|
| 150 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 151 |
+
<td className="px-5 py-4 font-mono text-slate-300">VGG16 FC</td>
|
| 152 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">512</td>
|
| 153 |
+
<td className="px-5 py-4 text-slate-400">High-level semantic structural gradients.</td>
|
| 154 |
+
</tr>
|
| 155 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 156 |
+
<td className="px-5 py-4 font-mono text-slate-300">LBP Hist</td>
|
| 157 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">59</td>
|
| 158 |
+
<td className="px-5 py-4 text-slate-400">Local texture micro-aggregations for biofilms.</td>
|
| 159 |
+
</tr>
|
| 160 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 161 |
+
<td className="px-5 py-4 font-mono text-slate-300">HSV Bins</td>
|
| 162 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">48</td>
|
| 163 |
+
<td className="px-5 py-4 text-slate-400">Staining saturation and intensity variation.</td>
|
| 164 |
+
</tr>
|
| 165 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 166 |
+
<td className="px-5 py-4 font-mono text-slate-300">GLCM</td>
|
| 167 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">24</td>
|
| 168 |
+
<td className="px-5 py-4 text-slate-400">Co-occurrence measurements for density changes.</td>
|
| 169 |
+
</tr>
|
| 170 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 171 |
+
<td className="px-5 py-4 font-mono text-slate-300">Spatial</td>
|
| 172 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">16</td>
|
| 173 |
+
<td className="px-5 py-4 text-slate-400">4x4 raster grid assessing clustering severity.</td>
|
| 174 |
+
</tr>
|
| 175 |
+
<tr className="hover:bg-[#0d131f]/50 transition-colors">
|
| 176 |
+
<td className="px-5 py-4 font-mono text-slate-300">Morphology</td>
|
| 177 |
+
<td className="px-5 py-4 text-[#00e599] font-mono">5</td>
|
| 178 |
+
<td className="px-5 py-4 text-slate-400">Area, Perimeter, Circularity, Aspect Ratios.</td>
|
| 179 |
+
</tr>
|
| 180 |
+
</tbody>
|
| 181 |
+
</table>
|
| 182 |
+
</div>
|
| 183 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
</div>
|
|
|
|
| 185 |
|
| 186 |
+
{/* Right Column / API Info */}
|
| 187 |
+
<div className="w-full xl:w-[400px] flex-shrink-0 bg-[#0b101e] xl:border-l border-slate-800/60 p-6 xl:p-8 xl:overflow-y-auto">
|
|
|
|
|
|
|
|
|
|
| 188 |
|
| 189 |
+
{/* JSON Block */}
|
| 190 |
+
<div className="bg-[#141b2d] rounded-xl border border-slate-700/60 overflow-hidden mb-10 shadow-2xl">
|
| 191 |
+
<div className="flex items-center gap-2 px-4 py-3 bg-[#0f1524] border-b border-slate-700/60">
|
| 192 |
+
<div className="flex gap-1.5">
|
| 193 |
+
<div className="w-3 h-3 rounded-full bg-red-500/80"></div>
|
| 194 |
+
<div className="w-3 h-3 rounded-full bg-yellow-500/80"></div>
|
| 195 |
+
<div className="w-3 h-3 rounded-full bg-green-500/80"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
</div>
|
| 197 |
+
<span className="text-xs text-slate-500 font-mono ml-2 uppercase tracking-wider">RESPONSE JSON — /predict</span>
|
| 198 |
+
</div>
|
| 199 |
+
<div className="p-5 font-mono text-sm overflow-x-auto text-slate-300">
|
| 200 |
+
<pre className="!bg-transparent !m-0 !p-0">
|
| 201 |
+
<code>
|
| 202 |
+
<span className="text-slate-400">{`{`}</span>{`\n`}
|
| 203 |
+
{` `}<span className="text-blue-300">"prediction"</span>{`: `}<span className="text-orange-300">"Escherichia coli"</span>{`,\n`}
|
| 204 |
+
{` `}<span className="text-blue-300">"confidence"</span>{`: `}<span className="text-purple-400">0.982</span>{`,\n`}
|
| 205 |
+
{` `}<span className="text-blue-300">"risk_level"</span>{`: `}<span className="text-[#00e599]">"HIGH"</span>{`,\n`}
|
| 206 |
+
{` `}<span className="text-blue-300">"routed_to_specialist"</span>{`: `}<span className="text-orange-400">true</span>{`,\n`}
|
| 207 |
+
{` `}<span className="text-blue-300">"characteristics"</span>{`: {\n`}
|
| 208 |
+
{` `}<span className="text-blue-300">"gram_stain"</span>{`: `}<span className="text-orange-300">"Negative (-)"</span>{`,\n`}
|
| 209 |
+
{` `}<span className="text-blue-300">"morphology"</span>{`: `}<span className="text-orange-300">"Rod (Bacillus)"</span>{`\n`}
|
| 210 |
+
{` `}<span className="text-slate-400">{`}\n`}</span>
|
| 211 |
+
<span className="text-slate-400">{`}`}</span>
|
| 212 |
+
</code>
|
| 213 |
+
</pre>
|
| 214 |
</div>
|
| 215 |
+
</div>
|
| 216 |
+
|
| 217 |
+
{/* Configuration / Quick Ref */}
|
| 218 |
+
<div className="mb-10">
|
| 219 |
+
<h4 className="text-[11px] font-bold text-[#00e599] tracking-widest uppercase mb-4">Configuration</h4>
|
| 220 |
|
| 221 |
+
<div className="mb-6">
|
| 222 |
+
<h5 className="text-sm font-semibold text-white mb-2 flex items-center gap-2">
|
| 223 |
+
<span className="material-symbols-outlined text-[18px]">rule</span>
|
| 224 |
+
Decision Rules
|
| 225 |
+
</h5>
|
| 226 |
+
<p className="text-sm text-slate-400 leading-relaxed mb-3">
|
| 227 |
+
The system dynamically routes ambiguously predicted inputs to the Specialist RBF-SVM if the primary confidence threshold is not met.
|
| 228 |
+
</p>
|
| 229 |
+
<code className="text-xs bg-slate-800/80 text-blue-300 px-2 py-1 rounded inline-block">> confidence < 0.90</code>
|
| 230 |
</div>
|
| 231 |
|
| 232 |
+
<div>
|
| 233 |
+
<h5 className="text-sm font-semibold text-white mb-2 flex items-center gap-2">
|
| 234 |
+
<span className="material-symbols-outlined text-[18px]">speed</span>
|
| 235 |
+
Performance Profile
|
| 236 |
+
</h5>
|
| 237 |
+
<p className="text-sm text-slate-400 leading-relaxed">
|
| 238 |
+
Base Accuracy: 95.65%<br/>
|
| 239 |
+
Specialist AUC: 0.9863<br/>
|
| 240 |
+
Avg Latency: < 850ms / image
|
| 241 |
+
</p>
|
| 242 |
</div>
|
| 243 |
+
</div>
|
| 244 |
|
| 245 |
+
{/* Quick Reference Table */}
|
| 246 |
+
<div className="mb-10">
|
| 247 |
+
<h4 className="text-[11px] font-bold text-[#00e599] tracking-widest uppercase mb-4">Quick Reference</h4>
|
| 248 |
+
|
| 249 |
+
<div className="space-y-4 text-sm border-t border-slate-800 pt-4">
|
| 250 |
+
<div className="flex justify-between items-center">
|
| 251 |
+
<span className="text-slate-500">Architecture</span>
|
| 252 |
+
<span className="text-slate-300 font-mono bg-slate-800/50 px-2 py-0.5 rounded">VGG16 + SVM</span>
|
| 253 |
+
</div>
|
| 254 |
+
<div className="flex justify-between items-center">
|
| 255 |
+
<span className="text-slate-500">Feature Dims</span>
|
| 256 |
+
<span className="text-slate-300 font-mono bg-slate-800/50 px-2 py-0.5 rounded">683 (Specialist)</span>
|
| 257 |
+
</div>
|
| 258 |
+
<div className="flex justify-between items-center">
|
| 259 |
+
<span className="text-slate-500">Classes Supported</span>
|
| 260 |
+
<span className="text-slate-300 font-mono bg-slate-800/50 px-2 py-0.5 rounded">5 Pathogens</span>
|
| 261 |
+
</div>
|
| 262 |
+
<div className="flex justify-between items-center">
|
| 263 |
+
<span className="text-slate-500">Version</span>
|
| 264 |
+
<span className="text-[#00e599] font-bold font-mono bg-[#00e599]/10 px-2 py-0.5 rounded">V2.0 STABLE</span>
|
| 265 |
</div>
|
|
|
|
| 266 |
</div>
|
| 267 |
+
</div>
|
| 268 |
|
| 269 |
+
{/* Changelog */}
|
| 270 |
+
<div>
|
| 271 |
+
<h4 className="text-[11px] font-bold text-[#00e599] tracking-widest uppercase mb-4">Changelog</h4>
|
| 272 |
+
<div className="relative pl-4 border-l-2 border-slate-800 pb-2 space-y-6">
|
| 273 |
+
<div className="relative">
|
| 274 |
+
<div className="absolute -left-[21px] top-1 w-2.5 h-2.5 rounded-full bg-[#00e599] ring-4 ring-[#0b101e]"></div>
|
| 275 |
+
<h5 className="text-white text-sm font-bold mb-1">V2.0 — Cascaded Network</h5>
|
| 276 |
+
<p className="text-xs text-slate-400">Added Binary RBF-SVM Specialist trained on 683-dim feature vectors to resolve E.coli vs P.aeruginosa confusion pairs.</p>
|
| 277 |
+
</div>
|
| 278 |
+
<div className="relative">
|
| 279 |
+
<div className="absolute -left-[21px] top-1 w-2.5 h-2.5 rounded-full bg-slate-600 ring-4 ring-[#0b101e]"></div>
|
| 280 |
+
<h5 className="text-slate-300 text-sm font-bold mb-1">V1.0 — Baseline Release</h5>
|
| 281 |
+
<p className="text-xs text-slate-500">Initial frozen VGG16 backbone extracting features mapped to PCA-reduced 94-dimensional RBF Support Vector Machine.</p>
|
| 282 |
</div>
|
|
|
|
| 283 |
</div>
|
| 284 |
</div>
|
| 285 |
+
<div className="h-10"></div>
|
| 286 |
</div>
|
| 287 |
+
</div>
|
| 288 |
+
|
| 289 |
+
<style dangerouslySetInnerHTML={{__html: `
|
| 290 |
+
.custom-scrollbar::-webkit-scrollbar {
|
| 291 |
+
width: 6px;
|
| 292 |
+
}
|
| 293 |
+
.custom-scrollbar::-webkit-scrollbar-track {
|
| 294 |
+
background: transparent;
|
| 295 |
+
}
|
| 296 |
+
.custom-scrollbar::-webkit-scrollbar-thumb {
|
| 297 |
+
background-color: #1e293b;
|
| 298 |
+
border-radius: 10px;
|
| 299 |
+
}
|
| 300 |
+
`}} />
|
| 301 |
</main>
|
| 302 |
);
|
| 303 |
};
|
| 304 |
+
|