Skip to content
ModelListedExternal
Download

Neuro Ai

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

KindOtherVersionRevision d9b47d1

Model source

Kind
Other
File size
10.6–118 MB
Version
vRevision d9b47d1
Updated
Sep 27, 2026
Downloads
0
Tasks
Image segmentation
Source
Hugging Face

Source description

Neuro-AI: AI-Driven MS Lesion Analysis Framework

Ventricles & WMH Segmentation:

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

Model Description

This repository should contain 6 pre-trained deep learning models (6 architectures) for automated, simultaneous Ventricles and WMH segmentation from FLAIR MRI images. The models implement a novel four-class approach that distinguishes between:

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

Model Architectures

Architecturemean DSCmean IoUmean HD95mean Precisionmean Recall
Baseline U-Net (WCE)0.714 ±0.0180.601 ±0.0206.50 ±0.460.616 ±0.0200.937 ±0.002
Baseline Pix2Pix (WCE)0.823 ±0.0110.721 ±0.0145.31 ±0.200.805 ±0.0050.848 ±0.010
Baseline Pix2Pix (UFL)0.817 ±0.0100.714 ±0.0125.50 ±0.350.791 ±0.0210.850 ±0.019
Pix2Pix + Attention Discriminator0.824 ±0.0080.723 ±0.0115.23 ±0.310.807 ±0.0140.843 ±0.009
Pix2Pix + Adaptive Hybrid Loss0.844 ±0.0020.750 ±0.0034.81 ±0.050.845 ±0.0090.843 ±0.010
Pix2Pix + Attention Discriminator + Adaptive Hybrid Loss ⭐0.852 ±0.0040.760 ±0.0064.87 ±0.130.856 ±0.0060.850 ±0.006

⭐ Recommended: Pix2Pix + Attention Discriminator + Adaptive Hybrid Loss (V5) for best performance

Repository Structure

results_fold_2_var_5_bet_zscore/
└── models/standard_4class/fold_2
    └── best_dice_generator.h5      # 4-Class: Background, Ventricles, Normal, Abnormal

Quick Start

Installation

pip install huggingface_hub tensorflow numpy nibabel

Download Models

from huggingface_hub import hf_hub_download

# Download best performing model (V5)
model_path = hf_hub_download(
    repo_id="Bawil/neuro-ai",
    filename="results_fold_2_var_5_bet_zscore/models/standard_4class/fold_2/best_dice_generator.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: Ventricles
# 2: Normal WMH (periventricular)
# 3: Abnormal WMH (pathological)

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

Training Data

Dataset Composition

  • Local Dataset: 300 MS patients (6,000 FLAIR MRI slices)

    • Demographics: 78 males, 222 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)
  • Four-class labeling: Background, Ventricles, Normal WMH, Abnormal WMH
  • Approved by Ethics Committee (IR.TBZMED.REC.1402.902)

Data Split

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

Model Training

Configuration

  • Framework: TensorFlow 2.11, Keras
  • Optimizer: Adam (learning rate: 0.0002)
  • Loss Functions:
    • Option 1: Weighted categorical cross-entropy
    • Option 2: Unified Focal Dice
  • Epochs: 60 (with early stopping)
  • Batch Size: 4
  • Input Size: 256×256×1

Hardware

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

Model Performance

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, Abolhassan Shakeri Bavil

Citation

@article{bawil2026neuro,
  title={AI-Driven Multi-Parametric MS Lesion Analysis from T2-FLAIR Imaging: A Clinical Decision Support Framework for Neuroradiology},
  author={Bawil, Mahdi Bashiri and Shamsi, Mousa and Bavil, Abolhassan Shakeri},
  year={2026},
  note={Models: https://huggingface.co/Bawil/neuro-ai}
}

License

MIT License - See LICENSE

Additional Resources

  • 📄 Paper: [Under Review]
  • 💻 GitHub Repository: mri-ms-analyzer/neuro-ai
  • 📧 Contact: m_bashiri99@sut.ac.ir | mehdi.bashiri.b@gmail.com
  • 🏥 Institution: Sahand University of Technology & Tabriz University of Medical Sciences

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: Artificial intelligence (AI), multiple sclerosis, neuroradiology, clinical decision support, automated lesion analysis, deep learning, clinical AI

Sources

1 source
Hugging FacePrimaryVersion d9b47d14dd498f2499fcbff02d4e4704ca7d3873
huggingface.co/Bawil/neuro-ai/tree/d9b47d14dd498f2499fcbff02d4e4704ca7d3873

Verified Sep 27

Model artifacts

12 artifacts

results_fold_2_var_0_bet_zscore/models/standard_4class/fold_2/best_dice_model.h5

h5 · 118 MB · SHA-256 75112813cd86…1251 · Hugging Face

Download

results_fold_2_var_1_bet_zscore/models/standard_4class/fold_2/best_dice_discriminator.h5

h5 · 10.6 MB · SHA-256 da5d8e1808bb…d265 · Hugging Face

Download

results_fold_2_var_1_bet_zscore/models/standard_4class/fold_2/best_dice_generator.h5

h5 · 118 MB · SHA-256 cd2b0485c559…fc19 · Hugging Face

Download

results_fold_2_var_2_bet_zscore/models/standard_4class/fold_2/best_dice_discriminator.h5

h5 · 10.6 MB · SHA-256 1af790468753…d2ea · Hugging Face

Download

results_fold_2_var_2_bet_zscore/models/standard_4class/fold_2/best_dice_generator.h5

h5 · 118 MB · SHA-256 4b36aff9dd5f…a9b0 · Hugging Face

Download

results_fold_2_var_3_bet_zscore/models/standard_4class/fold_2/best_dice_discriminator.h5

h5 · 10.6 MB · SHA-256 f5f4da8c72ca…3db1 · Hugging Face

Download

results_fold_2_var_3_bet_zscore/models/standard_4class/fold_2/best_dice_generator.h5

h5 · 118 MB · SHA-256 e44b5743a589…d40b · Hugging Face

Download

results_fold_2_var_4_bet_zscore/models/standard_4class/fold_2/best_dice_discriminator.h5

h5 · 10.6 MB · SHA-256 2038ea3722cf…c181 · Hugging Face

Download

results_fold_2_var_4_bet_zscore/models/standard_4class/fold_2/best_dice_generator.h5

h5 · 118 MB · SHA-256 64fa4ac554e5…a09a · Hugging Face

Download

results_fold_2_var_5_bet_zscore/models/standard_4class/fold_2/best_dice_discriminator.h5

h5 · 10.6 MB · SHA-256 67741d3ba107…f341 · Hugging Face

Download

results_fold_2_var_5_bet_zscore/models/standard_4class/fold_2/best_dice_generator.h5

h5 · 118 MB · SHA-256 51cde99f4c7d…620a · Hugging Face

Download

results_fold_2_var_5_bet_zscore/models/standard_4class/fold_2/final_model.h5

h5 · 118 MB · SHA-256 12fdf0e903dc…deda · Hugging Face

Download

Source excerpts

2 excerpts

--- 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 --- # **Neuro-AI: AI-Driven MS Lesion Analysis Framework** # Ventricles & WMH Segmentation: Pre-trained models for **ventricles and white matter hyperintensity (WMH) segmentation** with explicit distinction between normal periventricular changes (normal WMH) and pathological lesions (abnormal WMH). ## Model Description This repository should contain 6 pre-trained deep learning models (6 architectures) for automated, simultaneous Ventricles and WMH segmentation from FLAIR MRI images. The models implement a novel **four-class approach** that distinguishes between: - **Class 0**: Background - **Class 1**: Ventricular system - **Class 2**: Normal WMH (aging-related periventricular changes) - **Class 3**: Abnormal WMH (pathologically significant lesions) ## Model Architectures | Architecture | mean DSC | mean IoU | mean HD95 | mean Precision | mean Recall | |--------------|----------|----------|-----------|----------------|-------------| | **Baseline U-Net (WCE)** | 0.714 ±0.018 | 0.601 ±0.020 | 6.50 ±0.46 | 0.616 ±0.020 | **0.937 ±0.002** | | **Baseline Pix2Pix (WCE)** | 0.823 ±0.011 | 0.721 ±0.014 | 5.31 ±0.20 | 0.805 ±0.005 | 0.848 ±0.010 | | **Baseline Pix2Pix (UFL)** | 0.817 ±0.010 | 0.714 ±0.012 | 5.50 ±0.35 | 0.791 ±0.021 | 0.850 ±0.019 | | **Pix2Pix + Attention Discriminator** | 0.824 ±0.008 | 0.723 ±0.011 | 5.23 ±0.31 | 0.807 ±0.014 | 0.843 ±0.009 | | **Pix2Pix + Adaptive Hybrid Loss** | 0.844 ±0.002 | 0.750 ±0.003 | **4.81 ±0.05** | 0.845 ±0.009 | 0.843 ±0.010 | | **Pix2Pix + Attention Discriminator + Adaptive Hybrid Loss** ⭐| **0.852 ±0.004** | **0.760 ±0.006** | 4.87 ±0.13 | **0.856 ±0.006** | 0.850 ±0.006 | ⭐ **Recommended**: Pix2Pix + Attention Discriminator + Adaptive Hybrid Loss (V5) for best performance ## Repository Structure ``` results_fold_2_var_5_bet_zscore/ └── models/standard_4class/fold_2 └── best_dice_generator.h5 # 4-Class: Background, Ventricles, Normal, Abnormal ``` ## Quick Start ### Installation ```bash pip install huggingface_hub tensorflow numpy nibabel ``` ### Download Models ```python from huggingf...

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