Fri, 05 Jul 2024 14:48:02 -0500
Added tag v2.0.2 for changeset afeaa6f6d1ae
0 | 1 | |
59 | 2 | # Predictive online optimisation codes for dynamic inverse imaging problems |
0 | 3 | |
63 | 4 | These codes implement the experiments for the 2024 manuscript _“[Prediction techniques for dynamic imaging with online primal-dual methods](https://arxiv.org/abs/2405.02497)”_ by Neil Dizon, Jyrki Jauhiainen, and Tuomo Valkonen. It is built on top of, and includes the experiments for the 2020 article _“[Predictive online optimisation with applications to optical flow](https://arxiv.org/abs/2002.03053)”_ by [Tuomo Valkonen](https://tuomov.iki.fi). |
0 | 5 | |
6 | ## Prerequisites | |
7 | ||
10 | 8 | These codes were written for Julia 1.9. The Julia package prequisites are from April 2024 when our experiments were run, and have not been updated to maintain the same environment we used to do the experiments in the manuscript. You may get Julia from [julialang.org](https://julialang.org/). |
0 | 9 | |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
10 | ## Usage |
0 | 11 | |
12 | Navigate your unix shell to the directory containing this `README.md` and then run: | |
13 | ||
14 | $ julia --project=. | |
15 | ||
16 | The first time doing this, to ensure all the dependencies are installed, run | |
17 | ||
18 | $ ]instantiate | |
19 | ||
20 | Afterwards in the Julia shell, type: | |
21 | ||
22 | > using PredictPDPS | |
23 | ||
10 | 24 | This may take a while as Julia precompiles the code. |
25 | ||
26 | Below we document how to run the experiments for each article. See the source code for more details. | |
27 | ||
28 | To run the data generation multi-threadeadly parallel to the algorithm, set the `JULIA_NUM_THREADS` environment variable to a number larger than one. | |
29 | ||
63 | 30 | ### Experiments for 2020 article |
10 | 31 | |
32 | To generate all the experiments for _“Predictive online optimisation with applications to optical flow”_, run: | |
0 | 33 | |
34 | > batchrun_article() | |
35 | ||
10 | 36 | To see the experiments running visually, and not save the results, run |
0 | 37 | |
38 | > demo_known1() | |
39 | ||
10 | 40 | or any of `demo_XY()`, where `X`=`known`,`unknown` and `Y`=1,2,3. |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
41 | |
33 | 42 | ### Experiments for 2024 article |
10 | 43 | |
61 | 44 | To generate all the experiments for _“Prediction techniques for dynamic imaging with online primal-dual methods”_, run: |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
45 | |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
46 | > batchrun_predictors() |
40 | 47 | > batchrun_shepplogan() |
48 | > batchrun_brainphantom() | |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
49 | |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
50 | Both will save the results under `img/`. |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
51 | |
10 | 52 | To see the experiments running visually, and not save the results, run |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
53 | |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
54 | > demo_denoising1() |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
55 | |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
56 | or |
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
57 | |
60
33d5956e7e7f
README demo options added
Neil Dizon <neil.dizon@helsinki.fi>
parents:
59
diff
changeset
|
58 | > demo_petS1() |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
59 | |
60
33d5956e7e7f
README demo options added
Neil Dizon <neil.dizon@helsinki.fi>
parents:
59
diff
changeset
|
60 | or any of `demo_denoisingZ()` for image stabilisation experiments, and `demo_petSZ()` or `demo_petBZ()` for dynamic PET reconstruction with Shepp-Logan and brain phantoms, resp., where `Z=1` for Dual Scaling, `Z=2` for Greedy, `Z=3` for No Prediction, `Z=4` for Primal Only, `Z=5` for Proximal, and `Z=6` for Rotation predictors. |
8
e4ad8f7ce671
Added PET and updated README
Neil Dizon <neil.dizon@helsinki.fi>
parents:
0
diff
changeset
|
61 | |
49 | 62 | ## Data sources |
63 | ||
64 | The lighthouse image is from the free [Kodak Lossless True Color Image Suite](https://r0k.us/graphics/kodak/). It is loaded via the Julia `TestImages` package. | |
65 | ||
66 | The file `phantom_slice.mat` is extracted, as described in `phantom_slice.md`, from | |
67 | ||
68 | * Belzunce, M. A. (2018). High-Resolution Heterogeneous Digital PET [18F]FDG Brain Phantom based on the BigBrain Atlas (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.1190598 |