Aller au contenu
ModelPrésentéExterne
Télécharger

Wmh Leverage Normal Abnormal Segmentation

Pre-trained models for white matter hyperintensity (WMH) segmentation with explicit distinction between normal periventricular changes and pathological lesions.

TypeOtherVersionRevision ab8e6fe

Source du modèle

Type
Other
Taille du fichier
355–463 MB
Version
vRevision ab8e6fe
Mis à jour
27 sept. 2026
Téléchargements
0
Tâches
Segmentation d'image
Source
Hugging Face

Description de la source

WMH Segmentation: Normal vs Abnormal Classification

Pre-trained models for white matter hyperintensity (WMH) segmentation with explicit distinction between normal periventricular changes and pathological lesions.

Model Description

This repository contains 8 pre-trained deep learning models (4 architectures × 2 training scenarios) for automated WMH segmentation from FLAIR MRI images. The models implement a novel three-class approach that distinguishes between:

  • Class 0: Background
  • Class 1: Normal WMH (aging-related periventricular changes)
  • Class 2: Abnormal WMH (pathologically significant lesions)

This approach addresses the critical challenge of false positive detection in periventricular regions, achieving up to 27.1% improvement in Dice coefficient compared to traditional binary segmentation.

Model Architectures

ArchitectureParametersBest Dice (3-Class)Binary BaselineImprovement
U-Net ⭐31.0M0.7680.497+54.5%
Attention U-Net34.9M0.7400.486+52.1%
TransUNet105.3M0.7000.510+37.3%
DeepLabV3Plus40.3M0.5860.374+56.7%

⭐ Recommended: U-Net with Scenario 2 (three-class) for optimal performance

Repository Structure

models/
├── unet/models/
│   ├── scenario1_binary_model.h5          # Binary: Background vs Abnormal
│   └── scenario2_multiclass_model.h5      # 3-Class: Background, Normal, Abnormal
├── attention_unet/models/
│   ├── scenario1_binary_model.h5
│   └── scenario2_multiclass_model.h5
├── deeplabv3plus/models/
│   ├── scenario1_binary_model.h5
│   └── scenario2_multiclass_model.h5
└── transunet/models/
    ├── scenario1_binary_model.h5
    └── scenario2_multiclass_model.h5

Quick Start

Installation

pip install huggingface_hub tensorflow numpy nibabel

Download Models

from huggingface_hub import hf_hub_download

# Download best performing model (U-Net Three-Class)
model_path = hf_hub_download(
    repo_id="Bawil/wmh_leverage_normal_abnormal_segmentation",
    filename="unet/models/scenario2_multiclass_model.h5"
)

# Load model
from tensorflow.keras.models import load_model
model = load_model(model_path)

Inference Example

import numpy as np
from tensorflow.keras.models import load_model

# Load pre-trained model
model = load_model(model_path)

# Prepare input (256x256 grayscale FLAIR MRI, normalized)
# input_image shape: (batch_size, 256, 256, 1)
input_image = preprocess_flair(your_flair_image)

# Run inference
predictions = model.predict(input_image)

# Get class predictions
predicted_classes = np.argmax(predictions, axis=-1)
# 0: Background
# 1: Normal WMH (periventricular)
# 2: Abnormal WMH (pathological)

# Extract pathological lesions only
abnormal_mask = (predicted_classes == 2).astype(np.uint8)

Training Data

Dataset Composition

  • Local Dataset: 100 MS patients (2,000 FLAIR MRI slices)

    • Demographics: 26 males, 74 females
    • Age range: 18-68 years
    • Scanner: 1.5-Tesla TOSHIBA Vantage
  • Public Dataset: MSSEG2016 (15 patients, 750 FLAIR slices)

Annotations

  • Expert annotations by board-certified neuroradiologists (20+ years experience)
  • Three-class labeling: Background, Normal WMH, Abnormal WMH
  • Approved by Ethics Committee (IR.TBZMED.REC.1402.902)

Data Split

  • Training: 80% patients (local) + 60% patients (public)
  • Validation: 10% patients (local) + 20% patients (public)
  • Testing: 10% patients (local) + 20% patients (public)
  • Strategy: Patient-level stratified split (no slice-level leakage)

Model Training

Configuration

  • Framework: TensorFlow 2.11, Keras
  • Optimizer: Adam (learning rate: 0.0001)
  • Loss Functions:
    • Scenario 1: Weighted binary cross-entropy
    • Scenario 2: Weighted categorical cross-entropy
  • Epochs: 50 (with early stopping)
  • Batch Size: 8
  • Input Size: 256×256×1
  • Data Augmentation: Rotation, flipping, elastic deformation

Hardware

  • GPU: NVIDIA RTX 3060 (12GB VRAM)
  • Training Time: 2-3 hours per model
  • Inference Time: ~35-40ms per image

Model Performance

Dice Coefficient (Primary Metric)

ModelScenario 1Scenario 2Δ Improvementp-valueCohen's d
U-Net0.497±0.1450.768±0.124+0.271<0.00010.564
Attention U-Net0.486±0.1570.740±0.133+0.253<0.00010.442
TransUNet0.510±0.1160.700±0.097+0.190<0.00010.478
DeepLabV3Plus0.374±0.1100.586±0.092+0.212<0.00010.565

Additional Metrics

  • Hausdorff Distance: 27.4mm (U-Net 3-class) vs 29.8mm (binary)
  • Precision: Significant improvement in pathological lesion detection
  • False Positive Reduction: Marked decrease in periventricular regions
  • Clinical Feasibility: 1.5s total processing time per case (40 slices)

Statistical Validation

  • Paired t-tests confirm significant improvements (all p < 0.0001)
  • Effect sizes range from medium (0.44) to large (0.56)
  • 95% confidence intervals reported for all metrics
  • Wilcoxon signed-rank test for non-parametric validation

Use Cases

Clinical Applications

  • MS Lesion Quantification: Accurate measurement of disease burden
  • Differential Diagnosis: Distinguish pathological from normal aging
  • Longitudinal Monitoring: Track disease progression over time
  • Treatment Response: Evaluate therapeutic efficacy
  • Radiological Reporting: Reduce false positive alerts

Research Applications

  • Baseline Comparisons: Standardized evaluation framework
  • Method Development: Foundation for advanced segmentation approaches
  • Multi-center Studies: Protocol for broader validation
  • Reproducible Research: Complete implementation available

Limitations

  • Single Modality: Trained on FLAIR MRI only
  • Scanner Specificity: Primarily 1.5T TOSHIBA data
  • Disease Focus: Optimized for MS patients
  • 2D Segmentation: Slice-by-slice processing (no 3D context)
  • Resolution: Fixed 256×256 input size

Model Card

Intended Use

  • Primary: Automated WMH segmentation for research and clinical decision support
  • Users: Radiologists, neurologists, researchers, AI developers
  • Out-of-scope: Not FDA/CE approved; not for standalone clinical diagnosis

Ethical Considerations

  • Privacy: All data anonymized per HIPAA/GDPR standards
  • Bias: Limited scanner/protocol diversity may affect generalization
  • Clinical Validation: Requires expert review before clinical use
  • Transparency: Complete methodology and code openly available

Model Card Authors

Mahdi Bashiri Bawil, Mousa Shamsi, Ali Fahmi Jafargholkhanloo, Abolhassan Shakeri Bavil

Citation

@article{bawil2025wmh,
  title={Incorporating Normal Periventricular Changes for Enhanced Pathological 
         White Matter Hyperintensity Segmentation: On Multi-Class Deep Learning Approaches},
  author={Bawil, Mahdi Bashiri and Shamsi, Mousa and Jafargholkhanloo, Ali Fahmi and 
          Bavil, Abolhassan Shakeri},
  year={2025},
  note={Models: https://huggingface.co/Bawil/wmh_leverage_normal_abnormal_segmentation}
}

License

MIT License - See LICENSE

Additional Resources

Acknowledgments

  • Golgasht Medical Imaging Center, Tabriz, Iran for providing clinical data
  • Expert neuroradiologists for manual annotations
  • Ethics Committee approval: IR.TBZMED.REC.1402.902

Keywords: white matter hyperintensities, FLAIR MRI, medical imaging, deep learning, image segmentation, multiple sclerosis, U-Net, attention mechanisms, transformers, clinical AI

Sources

1 source
Hugging FacePrincipalVersion ab8e6fe6bd8eaa73348ae37e871b65e6375237db
huggingface.co/Bawil/wmh_leverage_normal_abnormal_segmentation/tree/ab8e6fe6bd8eaa73348ae37e871b65e6375237db

Vérifié 27 sept.

Artefacts du modèle

8 artefacts

attention_unet/models/scenario1_binary_model.h5

h5 · 359 MB · SHA-256 de0431922ec6…7881 · Hugging Face

Télécharger

attention_unet/models/scenario2_multiclass_model.h5

h5 · 359 MB · SHA-256 5028c17a2da1…d153 · Hugging Face

Télécharger

deeplabv3plus/models/scenario1_binary_model.h5

h5 · 463 MB · SHA-256 bf22b01b17a7…6825 · Hugging Face

Télécharger

deeplabv3plus/models/scenario2_multiclass_model.h5

h5 · 463 MB · SHA-256 521521903a9b…de88 · Hugging Face

Télécharger

transunet/models/scenario1_binary_model.h5

h5 · 447 MB · SHA-256 94218617ef8a…1a6f · Hugging Face

Télécharger

transunet/models/scenario2_multiclass_model.h5

h5 · 447 MB · SHA-256 ca58ae763e50…cebb · Hugging Face

Télécharger

unet/models/scenario1_binary_model.h5

h5 · 355 MB · SHA-256 5f3b2eeea24f…8a20 · Hugging Face

Télécharger

unet/models/scenario2_multiclass_model.h5

h5 · 355 MB · SHA-256 ecf057dcc7b1…c4e2 · Hugging Face

Télécharger

Extraits de sources

2 extraits

--- license: mit tags: - medical-imaging - image-segmentation - white-matter-hyperintensities - mri - flair - deep-learning - tensorflow - keras - neurology - multiple-sclerosis datasets: - custom - msseg2016 metrics: - dice-coefficient - hausdorff-distance library_name: tensorflow pipeline_tag: image-segmentation --- # WMH Segmentation: Normal vs Abnormal Classification Pre-trained models for **white matter hyperintensity (WMH) segmentation** with explicit distinction between normal periventricular changes and pathological lesions. ## Model Description This repository contains 8 pre-trained deep learning models (4 architectures × 2 training scenarios) for automated WMH segmentation from FLAIR MRI images. The models implement a novel **three-class approach** that distinguishes between: - **Class 0**: Background - **Class 1**: Normal WMH (aging-related periventricular changes) - **Class 2**: Abnormal WMH (pathologically significant lesions) This approach addresses the critical challenge of false positive detection in periventricular regions, achieving up to **27.1% improvement** in Dice coefficient compared to traditional binary segmentation. ## Model Architectures | Architecture | Parameters | Best Dice (3-Class) | Binary Baseline | Improvement | |--------------|-----------|---------------------|-----------------|-------------| | **U-Net** ⭐ | 31.0M | **0.768** | 0.497 | **+54.5%** | | **Attention U-Net** | 34.9M | 0.740 | 0.486 | +52.1% | | **TransUNet** | 105.3M | 0.700 | 0.510 | +37.3% | | **DeepLabV3Plus** | 40.3M | 0.586 | 0.374 | +56.7% | ⭐ **Recommended**: U-Net with Scenario 2 (three-class) for optimal performance ## Repository Structure ``` models/ ├── unet/models/ │ ├── scenario1_binary_model.h5 # Binary: Background vs Abnormal │ └── scenario2_multiclass_model.h5 # 3-Class: Background, Normal, Abnormal ├── attention_unet/models/ │ ├── scenario1_binary_model.h5 │ └── scenario2_multiclass_model.h5 ├── deeplabv3plus/models/ │ ├── scenario1_binary_model.h5 │ └── scenario2_multiclass_model.h5 └── transunet/models/ ├── scenario1_binary_model.h5 └── scenario2_multiclass_model.h5 ``` ## Quick Start ### Installation ```bash pip install huggingface_hub tensorflow numpy nibabel ``` ### Download Models ```python from huggingface_hub import hf_hub_download # Download best performing model (U-Net Three-Class) model_path = hf_hub_download(...

Source context: 0 downloads · 0 likes · Pipeline image-segmentation · Library tensorflow · Repo Bawil/wmh_leverage_normal_abnormal_segmentation