This repository contains a clean and customizable implementation of a 3D U-Net model, designed for volumetric (3D) medical image segmentation tasks. It is particularly useful for segmenting organs or tumors in CT or MRI scans.
This implementation was tested on the Liver Tumor Segmentation (LiTS) dataset. It can be adapted for any medical image dataset that provides 3D volumetric data (NIfTI or NumPy format).
- β 3D U-Net architecture with encoder-decoder structure
- β
Works with NIfTI or
.npy3D data - β Patch-based training for memory efficiency
- β Visualizes slices and segmentation results
- β Easy integration with new datasets
- β Save/load model checkpoints
The 3D U-Net consists of:
- Encoder: 3D Convolution β BatchNorm β ReLU β MaxPool
- Bottleneck: Deepest feature representation
- Decoder: Transposed 3D Convolutions + Skip Connections
- Output: 1Γ1Γ1 convolution for voxel-wise classification
Trained on https://www.kaggle.com/datasets/andrewmvd/liver-tumor-segmentation