A Python wrapper that adapts SIRF objective functions for use with scipy's L-BFGS-B optimiser. Some of the code here should be generalisable but currently it's relatively hard-coded to deal with RDP regularised PET reconstruction
The main functionality is in two files:
pet_recon/optimisation/objective_function.py- Wraps SIRF objectives, handles the sign flip (return -objective_func(image)- see below)pet_recon/optimisation/bfgs_optimiser.py- Implements the L-BFGS-B optimisation loop with proper bounds and callbacks
- SIRF objective functions are maximisers (log-likelihood), but L-BFGS-B is a minimiser.
- CUDA RelativeDifferencePrior is giving NaNs for some reason.
python scripts/main.py --data_path /path/to/pet_data --num_iters 100 --gpuThere's a run.sh script that I'm using to run stuff locally
- SIRF (PET reconstruction framework)
- scipy (L-BFGS-B optimiser)
- numpy
- Handles non-negativity constraints naturally via bounds
- Memory efficient for large PET images
- Well-tested, robust convergence
- Built-in line search
The rest of the codebase is just organisational scaffolding around these core optimisation components.
