SyneRBI / PETRIC

PET Image Reconstruction Challenge 2024
https://www.ccpsynerbi.ac.uk/events/petric/
7 stars 2 forks source link

run NEMA reconstruction (BSREM Algorithm) #9

Closed paskino closed 3 months ago

paskino commented 4 months ago

I'm going through points in https://github.com/SyneRBI/Challenge24/issues/5

Trying to run NEMA phantom with BSREM algorithm. The code by @KrisThielemans supposes to have the following 4 files available

acquired_data = STIR.AcquisitionData('prompts.hs')
background = STIR.AcquisitionData('background.hs')
mult_factors = STIR.AcquisitionData('mult_factors.hs')

# somewhat crazy initialisation, currently hand-tuned scale
initial_image = STIR.ImageData('20170809_NEMA_MUMAP_UCL.hv')+.5

However, the prepare_data.py script does not save a background rather an additive file. Is this the same @KrisThielemans @evgueni-ovtchinnikov ?

https://github.com/SyneRBI/Challenge24/blob/7d7942e3fc30f3751d03f805f3d30463d68593b4/src/SIRF_data_preparation/prepare_data.py#L22-L25

What should file should I use?

paskino commented 4 months ago

Anyway, the BSREM example reconstructs the following. Is this what you expect?

image

KrisThielemans commented 4 months ago

no it isn't,.

Background-> additive, use set_additive_term. I will fix this tonight

KrisThielemans commented 4 months ago

See https://github.com/SyneRBI/SIRF-Contribs/pull/18

Also, looks like you used far too few counts. Probably using default settings from somewhere. I think I used 10 mins for the time interval.

paskino commented 4 months ago

Also, looks like you used far too few counts. Probably using default settings from somewhere. I think I used 10 mins for the time interval.

You are right @KrisThielemans ! I am using the default in prepare_data.py (hard coded) that are 0 and 10 (seconds?)

paskino commented 4 months ago

I believe it's working now with 600 sec (?) data image

KrisThielemans commented 4 months ago

@paskino, I was wrong regarding the penalty factor. It's the first parameter of add_RDP. The second is the "espilon". At present, for the NEMA it does

prior = add_RDP(5, initial_image.max()*1e-4, obj_funs)"

so try with 50 as opposed to 5 (not 10000 larger, which would get you into convergence issues, step sizes and all that).

KrisThielemans commented 3 months ago

done via #16, results in #13