Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hahnec/polar_segment

Repository files navigation

polar_segment

This is a polarimetric image segmentation framework developed for brain tumor identification. This framework uses the HORAO NPP dataset (formerly TumorMeasurementsCalib; see dataloader in git history) containing per-pixel Mueller matrices of ex-vivo brain tissues. Nonetheless, swapping the dataset loading file horao_dataset.py with a custom dataset should be possible as long as the labels of the custom dataset are arranged accordingly.

Schematic Overview

Schematic overview

Publications

IEEE Trans. on Image Processing

arXiv paper link

@misc{hahne:2024:polar_augment,
      title={Physically Consistent Image Augmentation for Deep Learning in Mueller Matrix Polarimetry}, 
      author={Christopher Hahne and Omar Rodriguez-Nunez and Éléa Gros and Théotim Lucas and Ekkehard Hewer and Tatiana Novikova and Theoni Maragkou and Philippe Schucht and Richard McKinley},
      year={2024},
      eprint={2411.07918},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2411.07918}, 
} 

Optics Express

opex paper link

@article{hahne:2025:polar_segment,
  author={Christopher Hahne and Ivan Diaz and Omar Rodriguez-Nuñez and Éléa Gros and Muriel Blatter and Théotim Lucas and David Hasler and Tatiana Novikova and Theoni Maragkou and Philippe Schucht and Richard McKinley},
  journal={Optics Express}, 
  title={Polarimetric feature analysis of Mueller matrices for brain tumor image segmentation},
  year={2025},
  volume={33},
  number={20},
  pages={1-14},
  keywords={Mueller matrix polarimetry, brain tumor segmentation, deep learning, medical diagnostics},
  doi={https://doi.org/10.1364/OE.561518}
}

Installation

Dependencies

This repo uses the following related polarimetry frameworks:

  • mm_torch for deterministic Mueller matrix processing
  • polar_augment for data augmentation tailored for polarimetry

They can be installed automatically by:

$ git clone github.com/hahnec/polar_segment
$ cd polar_segment
$ bash install.sh

Models

  1. Download a set of k-fold models and from our work in IEEE Trans. on Image Proc.:
  1. After successful download, make sure models are located under polar_segment/ckpts/.

  2. Adjust the configuration by changing the model_file variable in polar_segment/configs/infer.yml for inference or polar_segment/configs/train_local.yml for training.

Optional: This repo provides the possibility to feed decomposed Lu-Chipman features as inputs to the segmentation network. Note that this option takes significantly more processing time (see here). To enable the Lu-Chipman decomposition, open polar_segment/configs/infer.yml and set the levels variable to 1 while adapting the model_file (see point 3 above).

Data

The release of the herein used dataset is yet to come. Please send a request to [email protected] or [email protected] and ask for permission to download and use this dataset.

Run

Before running, make sure the previously installed environment is activated (e.g., via $ source venv/bin/activate).

Inference

$ python3 infer.py

Training

$ python3 train.py

Acknowledgment

This work was supported by the Swiss National Science Foundation (SNSF) Sinergia Grant No. CRSII5_205904, "HORAO - Polarimetric visualization of brain fiber tracts for tumor delineation in neurosurgery." We thank the Translational Research Unit, Institute of Tissue Medicine and Pathology, University of Bern, for their assistance with histology and acknowledge UBELIX, the HPC cluster at the University of Bern (https://www.id.unibe.ch/hpc), for computational resources.