Downloads · 30 days
0
Bawil/neuro-ai
neuro-ai is a image segmentation model from Bawil. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for tensorflow. The card lists the license as mit.
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).
Downloads · 30 days
0
Access
Public
Updated Feb 20, 2026
Repo size
1.6 GB
Likes
0
Public
Click a slice to open those files.
.h5925 MB · 56%
From the Hugging Face model README
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).
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:
| 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
results_fold_2_var_5_bet_zscore/
└── models/standard_4class/fold_2
└── best_dice_generator.h5 # 4-Class: Background, Ventricles, Normal, Abnormal
pip install huggingface_hub tensorflow numpy nibabel
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)
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)
Local Dataset: 300 MS patients (6,000 FLAIR MRI slices)
Public Dataset: MSSEG2016 (15 patients, 750 FLAIR slices)
Mahdi Bashiri Bawil, Mousa Shamsi, Abolhassan Shakeri Bavil
@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}
}
MIT License - See LICENSE
Keywords: Artificial intelligence (AI), multiple sclerosis, neuroradiology, clinical decision support, automated lesion analysis, deep learning, clinical AI