Downloads · 30 days
0
Lpremier/Brats-UNet
Brats-UNet is a machine learning model from Lpremier. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model is a deep learning model for 3D/2D brain tumor segmentation, trained on the BraTS 2020 dataset. It uses a PicoUNet architecture (a lightweight variant of U-Net) to segment brain tumors from MRI scans.
Downloads · 30 days
0
Access
Public
Updated Jan 27, 2026
Repo size
124 MB
Likes
0
Public
Click a slice to open those files.
.pth62.1 MB · 100%
From the Hugging Face model README
This model is a deep learning model for 3D/2D brain tumor segmentation, trained on the BraTS 2020 dataset. It uses a PicoUNet architecture (a lightweight variant of U-Net) to segment brain tumors from MRI scans.
The model fits on the MICCAI BraTS 2020 Challenge Data. The dataset consists of multimodal MRI scans of glioblastoma (GBM/HGG) and lower-grade glioma (LGG). All volumes are registered to the same template space (SRI24) and interpolated to the same resolution ($1 mm^3$).
Auto-generated from the model checkpoint:
To use this model, you need to preprocess your input image similarly to the training pipeline (extract 2 channels: FLAIR and T1Ce, resize to 128x128).
import torch
from miccai_brats.models.unet.unet import PicoUNet
# 1. Instantiate Model
model = PicoUNet(in_channels=2, num_classes=4)
# 2. Load Checkpoint
checkpoint = torch.load("best_model.pth", map_location="cpu")
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
# 3. Inference
input_tensor = torch.randn(1, 2, 128, 128) # Fake Batch of [FLAIR, T1Ce]
with torch.no_grad():
output = model(input_tensor)
prediction = torch.argmax(output, dim=1)
print("Predicted shape:", prediction.shape) # [1, 128, 128]
If you use the BraTS dataset, please cite: