Skip to content

Latest commit

 

History

History
111 lines (80 loc) · 2.56 KB

File metadata and controls

111 lines (80 loc) · 2.56 KB

U-Net Medical Image Segmentation for Maxillary Sinus (CBCT)

This project implements a deep learning medical image segmentation pipeline using the U-Net architecture in PyTorch.

The model is trained to segment maxillary sinus regions from grayscale Cone Beam CT (CBCT) slices, serving as a preliminary step to validate the segmentation pipeline before extending the approach to the segmentation of sinus pathologies such as sinusitis and mucosal wall thickening.


Project Structure

project/
│
├── train.py                 # Training script
├── test.py                  # Inference script
├── visualise_prediction.py  # Prediction visualisation script
├── viz/                     # Visualisation between image, groundtruth and prediction
├── unet/                    # U-Net architecture implementation (milesial/Pytorch-UNet)
│
└── data/
    ├── train_img/           # Training images (PNG)
    ├── train_lab/           # Training masks (PNG)
    ├── test_img/            # Test images (PNG)
    └── test_lab/            # Test masks (PNG)

Installation

Create conda environment from provided file:

conda env create -f environment.yml
conda activate maxsinus

Alternatively, install via pip:

pip install -r requirements.txt

Training

python train.py

The trained model checkpoint will be saved as:

unet_model.pth

Training configuration:

  • Loss: Binary Cross Entropy
  • Optimizer: Adam
  • Validation loss monitoring
  • Batch training on 512×512 grayscale images

Testing (Inference)

python test.py

Predicted segmentation masks will be saved to:

predictions/

Visualisation

python visualise_prediction.py

Comparison images will be saved to:

viz/

Each visualisation contains:

  • Original CBCT slice
  • Ground truth mask
  • Predicted segmentation mask

Example image

References

Dataset

Chen JY. rawdataACEM CBCT Dataset. Zenodo, 2024.
Available at: https://doi.org/10.5281/zenodo.14441638

This study utilises CBCT images from the dataset. Although the dataset contains axial, sagittal, and coronal planes, only axial slices were used for model training and evaluation in this project.


Related Research

Chen JY. (2025).
Convolutional neural network for maxillary sinus segmentation based on the U-Net architecture at different planes in the Chinese population: A semantic segmentation study. https://doi.org/10.1186/s12903-025-06408-1