Skip to content

Deep learning system for automatic liver & tumor segmentation from CT scans using U-Net architectures, with 3D reconstruction and a web-based inference pipeline.

Notifications You must be signed in to change notification settings

motasemwed/eyetech-liver-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EyeTech – Liver & Tumor Segmentation from CT Images

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.


Overview

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.


Key Features

  • 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

Architectures

DenseUNet169

  • DenseNet-169 encoder with U-Net–style decoder
  • Strong feature reuse via dense connections
  • High segmentation accuracy
  • Higher computational and memory cost

EfficientNet-based U-Net

  • EfficientNet encoder with U-Net–style decoder
  • Lightweight and computationally efficient
  • Faster training and inference
  • Competitive segmentation performance

Datasets

  • 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.


Preprocessing

  • 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

Project Structure

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


Model Weights

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)

Running the Project

Install dependencies: pip install -r requirements.txt

Run backend: python app/backend/main.py

Open frontend: app/frontend/index.html


Results (Test Set)

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.


3D Visualization

Predicted 2D masks are stacked to reconstruct 3D liver and tumor volumes, enabling spatial inspection of organ shape and tumor location.


Notes

  • 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

Author

Motasem Bassam Al-Wedyan
Artificial Intelligence Student
Computer Vision & Medical Imaging

About

Deep learning system for automatic liver & tumor segmentation from CT scans using U-Net architectures, with 3D reconstruction and a web-based inference pipeline.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages