This repository contains a segmentation project that combines:
- U-Net (deep learning)
- GraphCut (classical / interactive segmentation)
It includes notebooks, source modules, and a pretrained model checkpoint.
If you want to regenerate outputs/results, use the notebook(s) in Online Notebooks/ and the parameter files in that same folder.
This is the preferred way to reproduce outputs correctly.
Do not rely on random local changes if you want consistent results.
Online Notebooks/→ online notebooks + parameters for regeneration (use this for output reproduction)src/models/→ U-Net model codesrc/training/→ training loopsrc/data/→ dataset loader / preprocessingsrc/graphcut/→ GraphCut functionstrain_unet_model.ipynb→ U-Net training notebookmain.ipynb→ main experiment notebookenhanced_unet_model.pth→ pretrained model checkpoint
Please do not delete the GraphCut functions.
Instead, keep them and separate/label them clearly so it is easy to see what is:
- U-Net code
- GraphCut code
- Notebook experiment code
This keeps the project organized and preserves your original work.
- Open the notebook(s) in
Online Notebooks/ - Use the parameter files in that same folder
- Run cells in order
- The final file is
inference_Unet_plus_Graphcut.ipynbthat compares UNet and UNet + Graphcut approaches. - For regenerating UNet only results you can use.
inference_enhanced_unet_model.ipynbfor enhanced UNet andtrain_inference_base_unet_model.ipynb(which includes inference code). - The code used for brain tumor segmentation on private dataset is available in
braintumor_segmentation_private_dataset.ipynbbut unfortunately we can not put the link to dataset in the nootebook.
Use train_unet_model.ipynb and the modules inside src/.
This repo is meant to preserve both:
- the U-Net pipeline
- the GraphCut pipeline
Please keep both parts documented and clearly separated.