Skip to content

z-k-li/ReconUQ

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

ReconUQ

Reconstruction with Uncertainty Quantification

ReconUQ is a research software package developed to support the publication:

Deidda et al.
Epistemic Uncertainty Estimation in Unsupervised Deep Image Prior‑based PET Image Reconstruction
IEEE Transactions on Radiation and Plasma Medical Sciences (TRPMS), 2026

The package provides advanced PET image reconstruction algorithms with explicit modelling of epistemic uncertainty, including kernelised methods and deep image prior–based approaches.


Dependencies

ReconUQ is built on top of SIRF and is intended to be used with GPU acceleration.

You must do one of the following before using ReconUQ:

  • Use the SIRF GPU Docker container provided by CCP Synerbi, or
  • Install SIRF directly on your system with GPU support enabled.

Ensure that your CUDA, driver, and SIRF versions are mutually compatible.


Installation (Unix)

Create and activate a dedicated environment

python -m venv reconUQ_env
source reconUQ_env/bin/activate

You should now see:

(reconUQ_env)

Install the package directly from GitHub:

python -m pip install -e git+https://github.com/danieldeidda/ReconUQ.git

Algorithms

This package allows you to run the following algorithms as executables from Interfile input data. You can choose to save the reconstructed images in NumPy (.npy) or Interfile format.

HKEM

If you set the window (-w 1 or --window=1), the algorithm runs OSEM/MLEM.

HKEM --sino=../NEMA_low/myprompts_s1_b1_f1g1d0b0.hs --is2d=0 --add_sino=../NEMA_low/scaled_additive.hs --n_sino=../NEMA_low/LMnormprojdata_bed1.hs --umap=../NEMA_low/umap_small.hv --anatomic=../NEMA_low/umap_small.hv --save_every=1 --outpath=. -i 100 -w 5 --sigma_p=0.1 --sigma_m=0.5

KEM

KEM --sino=../NEMA_low/myprompts_s1_b1_f1g1d0b0.hs --is2d=0 --add_sino=../NEMA_low/LMadditive3d_bed1.hs --n_sino=../NEMA_low/LMnormprojdata_bed1.hs --umap=../NEMA_low/umap_zoomed_bed1.hv --anatomic=../NEMA_low/umap_zoomed_bed1.hv --save_every=1 --outpath=. -i 240 -w 9 -k 48

ADMMDIP

ADMMDIP --sino=../NEMA_low/myprompts_s1_b1_f1g1d0b0.hs --is2d=0 --add_sino=../NEMA_low/scaled_addittive_ssrb.hs --n_sino=../NEMA_low/LMnormprojdata_bed1.hs --umap=../NEMA_low/umap_small.hv --anatomic=../NEMA_low/umap_small.hv --save_every=1 --outpath=. -i 60 --optimiser=ADAM --ro=1000 --learning_rate=0.0001 --seed=0

OTDIP

OTDIP --sino=../NEMA_low/myprompts_s1_b1_f1g1d0b0.hs --is2d=0 --add_sino=../NEMA_low/scaled_addittive_ssrb.hs --n_sino=../NEMA_low/LMnormprojdata_bed1.hs --umap=../NEMA_low/umap_small.hv --anatomic=../NEMA_low/umap_small.hv --save_every=1 --outpath=. -i 400 --seed=0

neuralKEM

neuralKEM --sino=../NEMA_low/myprompts_s1_b1_f1g1d0b0.hs --is2d=0 --add_sino=../NEMA_low/LMadditive3d_bed1.hs --n_sino=../NEMA_low/LMnormprojdata_bed1.hs --umap=../NEMA_low/umap_small.hv --anatomic=../NEMA_low/umap_small.hv --save_every=1 --outpath=. -w 9 -k 48 -i 440 --ksigma=1 --seed=0

To save Interfile instead of NumPy output:

--format=interfile

Running with Ensembles

Single GPU

#!/bin/bash
set -e

for seed in $(seq 0 4); do
  CUDA_VISIBLE_DEVICES=0 neuralKEM --sino=../../NEMA-DL/projdata_bed1.hs --is2d=0 --add_sino=../../NEMA-DL/additive3d_bed1_3.hs --n_sino=../../NEMA-DL/normprojdata_bed1.hs --umap=../../NEMA-DL/umap_small.hv --anatomic=../../NEMA-DL/umap_small.hv --save_every=1 --outpath=. -w 9 -k 48 -i 440 --ksigma=1 --learning_rate=0.0001 --seed=$seed
done

Multiple GPUs

#!/bin/bash
set -e

for seed in $(seq 0 4); do
  CUDA_VISIBLE_DEVICES=$seed neuralKEM --sino=../../NEMA-DL/projdata_bed1.hs --is2d=0 --add_sino=../../NEMA-DL/additive3d_bed1_3.hs --n_sino=../../NEMA-DL/normprojdata_bed1.hs --umap=../../NEMA-DL/umap_small.hv --anatomic=../../NEMA-DL/umap_small.hv --save_every=1 --outpath=. -w 9 -k 48 -i 440 --ksigma=1 --learning_rate=0.0001 --seed=$seed
done

About

Pytorch implementation of the Kernel EM using SIRF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 89.3%
  • Jupyter Notebook 9.1%
  • Haskell 1.6%