A deep learning–based computer vision system for automatic liver and liver tumor segmentation from abdominal CT scans, including 3D reconstruction and a web-based user interface connected to backend inference.
This project focuses on medical image segmentation using deep learning.
It segments liver and liver tumors from abdominal CT scans and reconstructs the results into a 3D representation to improve visualization and analysis.
Two modern encoder–decoder architectures were implemented and compared under the same experimental conditions:
- DenseUNet169
- EfficientNet-based U-Net
The project covers the full pipeline: preprocessing, training, evaluation, inference, and visualization.
- Automatic liver & tumor segmentation from CT images
- Supports multiple medical datasets
- Slice-based 2D inference with 3D reconstruction
- Web-based user interface connected to backend inference
- Quantitative evaluation (Dice score) and qualitative visualization
- DenseNet-169 encoder with U-Net–style decoder
- Strong feature reuse via dense connections
- High segmentation accuracy
- Higher computational and memory cost
- EfficientNet encoder with U-Net–style decoder
- Lightweight and computationally efficient
- Faster training and inference
- Competitive segmentation performance
- 3D-IRCADb-01: 20 abdominal CT volumes with liver and tumor annotations
- LiTS – Liver Tumor Segmentation Challenge: 131 abdominal CT volumes with high variability and class imbalance
Datasets are not included in this repository due to size constraints.
- DICOM loading and slice ordering
- Hounsfield Unit (HU) windowing and normalization
- Conversion from 3D volumes to relevant 2D slices
- Multi-class mask generation (background, liver, tumor)
- Data augmentation during training
eyetech-liver-segmentation/ ├─ app/ │ ├─ backend/ │ │ ├─ main.py │ │ └─ preprocessing_liver_2d.py │ └─ frontend/ │ └─ index.html ├─ notebooks/ │ └─ models/ │ ├─ Computer_Vision_Preprocessing.ipynb │ ├─ DenseUNet169 (Model 1).ipynb │ ├─ DenseUNet169(2).ipynb │ └─ EfficientNet-based U-Net.ipynb ├─ docs/ ├─ requirements.txt ├─ .gitignore └─ README.md
Pretrained model weights are NOT included in this repository.
Download and place them locally before running inference:
- DenseUNet169 weights: (add link here)
- EfficientNet-based U-Net weights: (add link here)
Install dependencies: pip install -r requirements.txt
Run backend: python app/backend/main.py
Open frontend: app/frontend/index.html
DenseUNet169:
- Liver Dice: ~91%
- Tumor Dice: ~51%
EfficientNet-based U-Net:
- Liver Dice: ~89%
- Tumor Dice: ~52%
These results demonstrate strong liver segmentation performance and reasonable tumor detection despite class imbalance and variability.
Predicted 2D masks are stacked to reconstruct 3D liver and tumor volumes, enabling spatial inspection of organ shape and tumor location.
- Patient-level data splitting was used to avoid data leakage
- Models were trained using PyTorch with GPU acceleration
- Automatic Mixed Precision (AMP) was applied to optimize memory usage
Motasem Bassam Al-Wedyan
Artificial Intelligence Student
Computer Vision & Medical Imaging