Downloads · 30 days
0
MohidAbdullah/ACDC-Heart-Segmentation
ACDC-Heart-Segmentation is a image segmentation model from MohidAbdullah. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A 5-fold cross-validated Attention U-Net ensemble trained on the ACDC cardiac MRI dataset for multi-class segmentation of cardiac structures.
Downloads · 30 days
0
Access
Public
Updated May 15, 2026
Repo size
1.9 GB
Likes
0
Public
Click a slice to open those files.
.pth1.9 GB · 100%
From the Hugging Face model README
A 5-fold cross-validated Attention U-Net ensemble trained on the ACDC cardiac MRI dataset for multi-class segmentation of cardiac structures.
This model segments cardiac MRI short-axis slices into 4 classes:
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]
| File | Description |
|---|---|
model.py | Model architecture (AttentionUNet) |
fold_1_model.pth - fold_5_model.pth | Trained weights for each CV fold |