Zum Inhalt springen
ModelAufgelistetExtern
Browse files

ACDC Heart Segmentation

A 5-fold cross-validated Attention U-Net ensemble trained on the ACDC cardiac MRI dataset for multi-class segmentation of cardiac structures.

ArtOtherVersionRevision 5f17ef5CBewertung

Modellquelle

Art
Other
Dateigröße
359 MB
Version
vRevision 5f17ef5
Aktualisiert
16. Sept. 2026
Downloads
0
Quelle
Hugging Face

Quellenbeschreibung

ACDC Heart Segmentation — Attention U-Net Ensemble

A 5-fold cross-validated Attention U-Net ensemble trained on the ACDC cardiac MRI dataset for multi-class segmentation of cardiac structures.

Model Description

This model segments cardiac MRI short-axis slices into 4 classes:

  • Class 0: Background
  • Class 1: Right Ventricle (RV)
  • Class 2: Myocardium (LVM)
  • Class 3: Left Ventricle (LVC)

Architecture

  • Base: U-Net with Attention Gates
  • Input: Single-channel grayscale MRI (256x256)
  • Output: 4-class segmentation map
  • Training: 5-fold cross-validation on the ACDC training set

Usage

import torch
from model import AttentionUNet

model = AttentionUNet(img_ch=1, output_ch=4)
state_dict = torch.load("fold_1_model.pth", map_location="cpu", weights_only=False)
if 'model_state_dict' in state_dict:
    state_dict = state_dict['model_state_dict']
model.load_state_dict(state_dict)
model.eval()

# Input: [batch, 1, 256, 256] normalized to mean=0.5, std=0.5
img_tensor = torch.randn(1, 1, 256, 256)
with torch.no_grad():
    output = model(img_tensor)  # [batch, 4, 256, 256]
    pred = torch.argmax(output, dim=1)  # [batch, 256, 256]

Files

FileDescription
model.pyModel architecture (AttentionUNet)
fold_1_model.pth - fold_5_model.pthTrained weights for each CV fold

Training Details

  • Dataset: ACDC (Automated Cardiac Diagnosis Challenge)
  • Optimizer: Adam
  • Loss: Cross-Entropy + Dice Loss
  • Image Size: 256x256
  • Normalization: (pixel - 0.5) / 0.5

Quellen

1 Quelle
Hugging FacePrimärVersion 5f17ef5b618627022597e50bf5473eb022d986ac
huggingface.co/MohidAbdullah/ACDC-Heart-Segmentation/tree/5f17ef5b618627022597e50bf5473eb022d986ac

Verifiziert 1. Sept.

Download files

Modellartefakte

5 Artefakte

fold_1_model.pth

pth · 359 MB · SHA-256 40b20ce24d53…db13 · Hugging Face

Download file

fold_2_model.pth

pth · 359 MB · SHA-256 89f2819809d3…652f · Hugging Face

Download file

fold_3_model.pth

pth · 359 MB · SHA-256 9366b1a2bb3a…80f3 · Hugging Face

Download file

fold_4_model.pth

pth · 359 MB · SHA-256 6134e260d120…817a · Hugging Face

Download file

fold_5_model.pth

pth · 359 MB · SHA-256 a7c2d759742a…50ee · Hugging Face

Download file

Quellenauszüge

2 Auszüge

--- license: mit tags: - medical-imaging - cardiac-mri - segmentation - attention-unet - pytorch datasets: - ACDC pipeline_tag: image-segmentation --- # ACDC Heart Segmentation — Attention U-Net Ensemble A 5-fold cross-validated **Attention U-Net** ensemble trained on the [ACDC cardiac MRI dataset](https://www.creatis.insa-lyon.fr/Challenge/acdc/) for multi-class segmentation of cardiac structures. ## Model Description This model segments cardiac MRI short-axis slices into 4 classes: - **Class 0**: Background - **Class 1**: Right Ventricle (RV) - **Class 2**: Myocardium (LVM) - **Class 3**: Left Ventricle (LVC) ### Architecture - **Base**: U-Net with Attention Gates - **Input**: Single-channel grayscale MRI (256x256) - **Output**: 4-class segmentation map - **Training**: 5-fold cross-validation on the ACDC training set ## Usage ```python import torch from model import AttentionUNet model = AttentionUNet(img_ch=1, output_ch=4) state_dict = torch.load("fold_1_model.pth", map_location="cpu", weights_only=False) if 'model_state_dict' in state_dict: state_dict = state_dict['model_state_dict'] model.load_state_dict(state_dict) model.eval() # Input: [batch, 1, 256, 256] normalized to mean=0.5, std=0.5 img_tensor = torch.randn(1, 1, 256, 256) with torch.no_grad(): output = model(img_tensor) # [batch, 4, 256, 256] pred = torch.argmax(output, dim=1) # [batch, 256, 256] ``` ## Files | File | Description | |------|-------------| | `model.py` | Model architecture (AttentionUNet) | | `fold_1_model.pth` - `fold_5_model.pth` | Trained weights for each CV fold | ## Training Details - **Dataset**: ACDC (Automated Cardiac Diagnosis Challenge) - **Optimizer**: Adam - **Loss**: Cross-Entropy + Dice Loss - **Image Size**: 256x256 - **Normalization**: (pixel - 0.5) / 0.5

Source context: 0 downloads · 0 likes · Pipeline image-segmentation · Repo MohidAbdullah/ACDC-Heart-Segmentation