Skip to content

hdkhunti/pet-gmf

Repository files navigation

pet-gmf

Generalized Mapping Function for PET image reconstruction

Table of Contents

Introduction

This repository accompanies the paper "Learning Generalized Mapping Functions via Deep-Unrolling for PET Image Reconstruction" by Hitesh D. Khunti and Bhaskar D. Rao. We present a novel framework that unifies traditional iterative algorithms and modern deep learning techniques for PET image reconstruction. By leveraging a Generalized Mapping Function (GMF), we accelerate Expectation Maximization (EM) algorithms and reparametrize iterative methods as special cases of a learnable mapping between iterations. Our approach introduces a compact and interpretable deep neural network architecture that:

  • Learns robust reconstructions with limited or no supervised data
  • Performs voxel-wise acceleration of EM updates
  • Demonstrates strong generalization to varying noise levels, scan durations, and out-of-distribution data.

Key results:

  • Outperforms traditional EM and MAP algorithms in accuracy and speed
  • Surpasses existing deep learning approaches in generalization and robustness
  • Maintains theoretical interpretability with significant practical improvements Explore the codebase to reproduce experiments, train models in supervised and self-supervised settings, and test the GMF framework on synthetic and real-world PET data.

Installation

Prerequisites

  • Install SIRF Superbuild docker

  • Run SIRF docker Command template:

    cd ~/docker_shared/SIRF-SuperBuild/docker/
    sudo docker run \ 
    --name sirf-gpu1 \ 
    --rm -it -p 9999:8888 --gpus all \  
    -p 5022:22 \ 
    -v ./devel:/home/jovyan/work \ 
    -v ~/docker_shared:/home/jovyan/docker_shared \ 
    ghcr.io/synerbi/sirf:latest-gpu
    
  • Setup docker and jovyan user settings

    • Login to the running docker
      sudo docker exec -it --user root sirf-gpu1 /bin/bash
      
    • Install vim editor, ssh server and run it so that you can ssh to the docker and connect via vs-code if required.
      	sudo apt-get update && \
      	sudo apt-get install openssh-server && \
      	sudo apt-get install vim && \
      	service ssh start
    
    • Set jovyan (default user) password passwd jovyan
  • Install Pytroch and other required libraries

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 && \
    pip3 install astra-toolbox==2.2.0 && \
    pip3 install pydicom && \ 
    pip3 install brainweb
    
  • Connect to the docker now using ssh. Note the same forward port used as provided during docker run command in first step above.

    ssh jovyan@localhost -p 5022

  • Clone pet-gmf repository

    cd ~/docker_shared
    git clone [email protected]:hdkhunti/pet-gmf.git
    
  • Connect using vs-code to remote setup using ssh using the forward port 5022, jovyan username and set password.

  • Configure vs-code to use /opt/conda/bin/python interpreter of the docker instance

Usage

  • After the above installation steps, run pet-gmf/dnn_tir_main.py for trainning the DNN networks and pet-gmf/tir_algo_sweep_test.ipynb for running sweep tests on the trained networks and analytical algorithms.
  • Use the following command to train gmf networks on brain phantom:
python dnn_tir_main.py --model gmf --nn_arch fcnn --epoch 100 --noise_pc 10.0  --phantom brain --lr=1e-5 --train_samps=1360 --test_samp=240 --val_samp=80 --en_mse_loss=1 --mdl_em_iter=4 --mdl_nlayers=8 --mdl_nchs=64 --mdl_act='selu' --mdl_t1byt2=0 
  • Please cite the following paper if you use or build further on this work: H. D. Khunti and B. D. Rao, "Learning Generalized Mapping Functions via Deep-Unrolling for PET Image Reconstruction," in IEEE Transactions on Computational Imaging, vol. 11, pp. 1654-1667, 2025, doi: 10.1109/TCI.2025.3636751.

Contributing

Please reach out to hdkhunti in case you would like to contribute or collaborate further on this work.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Releases

No releases published

Packages

No packages published