This repository hosts a trained LCNN (Local-Global Combined Neural Network) for automatic brain stroke lesion segmentation from CT scans. The model achieves high precision by combining local anatomical details with global semantic context, specifically addressing the challenge of segmenting small lesions in complex brain structures.
Key Features
🎯 SEAN (Symmetry Enhanced Attention Network): Exploits the natural symmetry of the brain to detect anomalies by comparing left and right hemispheres.
🌐 Global Context via ResNeXt50: Utilizes a powerful backbone to understand the global context of the slice, significantly reducing false positives.
🔄 Dual-Path Fusion: Merges local detailed features with global semantic features for robust segmentation.
🏥 Clinical Alignment: Includes an alignment module to automatically correct head rotation, ensuring consistent processing.
📊 Visual Gallery
The model demonstrates robust performance across various stroke types and locations.
Segmentation Samples
Sample 2
Sample 4
Sample 5
Sample 6
📈 Performance & Results
Training Dashboard
The training process was monitored extensively to ensure stable convergence and optimal performance.
Training Dashboard
Figure 2: Comprehensive training dashboard showing loss, metrics, and resource usage.
Detailed Metrics
The model was evaluated using strict medical imaging metrics.
Metrics Comparison
Confusion Matrix
Training Progression
Tracking the loss components and validation Dice score throughout the training epochs. The graphs below demonstrate steady convergence and learning stability.
Training Loss
Validation Dice
Learning Rate
Figure 3: Top Left: Training Loss curve. Top Right: Validation Dice Score. Bottom: Learning Rate schedule.
🔬 Technical Details
Architecture Components
Local Path (SEAN): A 3D UNet-like structure that processes adjacent slices (T=1, total 3 slices) to capture volumetric continuity. It uses a Symmetry Enhanced Attention mechanism.
Global Path (ResNeXt50): A 2D CNN backbone that processes the center slice to capture high-level semantics.
Fusion: The outputs are fused with a weighted average (Local: 0.7, Global: 0.3).
Loss Function Analysis
We employ a composite loss function designed to handle class imbalance (Dice), pixel accuracy (Cross-Entropy), and symmetry enforcement (Alignment).
Loss Components
Figure 4: Breakdown of the combined loss function components over time.
python
1# Loss Composition2total_loss =0.7* dice_loss +0.3* ce_loss +0.05* alignment_loss