1 |
1 |
2 # Julia codes for “Predictive online optimisation with applications to optical flow” |
2 # Julia codes for “Predictive online optimisation with applications to optical flow” |
3 |
3 |
4 These are the Julia codes for the optical flow experiments of the manuscript _“Predictive online optimisation with applications to optical flow”_ by [Tuomo Valkonen](https://tuomov.iki.fi) ([arXiv:2002.03053](https://arxiv.org/abs/2002.03053)). |
4 This version of Julia codes contains the experiments in the manuscript _"Prediction Techniques for Dynamic Imaging with Online Primal-dual Methods"_ built on top of the experiments for the manuscript _“Predictive online optimisation with applications to optical flow”_ by [Tuomo Valkonen](https://tuomov.iki.fi) ([Journal of Mathematical Imaging and Vision](https://link.springer.com/article/10.1007/s10851-020-01000-4)). |
5 |
5 |
6 ## Prerequisites |
6 ## Prerequisites |
7 |
7 |
8 These codes were written for Julia 1.3. The Julia package prequisites are from November 2019 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/). |
8 These codes were written for Julia 1.3. The Julia package prequisites are from November 2019 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/). |
9 |
9 |
10 ## Using |
10 ## Usage |
11 |
11 |
12 Navigate your unix shell to the directory containing this `README.md` and then run: |
12 Navigate your unix shell to the directory containing this `README.md` and then run: |
13 |
13 |
14 $ julia --project=. |
14 $ julia --project=. |
15 |
15 |
19 |
19 |
20 Afterwards in the Julia shell, type: |
20 Afterwards in the Julia shell, type: |
21 |
21 |
22 > using PredictPDPS |
22 > using PredictPDPS |
23 |
23 |
24 This may take a while as Julia precompiles the code. Then, to generate all the experiments in the manuscript, run: |
24 This may take a while as Julia precompiles the code. Then, to generate all the experiments in the manuscript _“Predictive online optimisation with applications to optical flow”_, run: |
25 |
25 |
26 > batchrun_article() |
26 > batchrun_article() |
27 |
27 |
28 This will save the results under `img/`. |
28 To see the experiments running visually, and not save the results, run |
29 To see the experiments running visually, and not save the results, run |
|
30 |
29 |
31 > demo_known1() |
30 > demo_known1() |
32 |
31 |
33 or any of `demo_XY()`, where `X`=1,2,3 and `Y`=`known`,`unknown`. |
32 or any of `demo_XY()`, where `X`=`known`,`unknown` and `Y`=1,2,3. |
34 Further parameters and experiments are available via `run_experiments`. See the source code for details. |
33 |
|
34 Additionally, to generate all the experiments in the manuscript _"Prediction Techniques for Dynamic Imaging with Online Primal-dual Methods"_, run: |
|
35 |
|
36 > batchrun_predictors() |
|
37 |
|
38 Both will save the results under `img/`. |
|
39 |
|
40 To see the experiments running visually, and not save the results, run |
|
41 |
|
42 > demo_denoising1() |
|
43 |
|
44 or |
|
45 |
|
46 > demo_pet1() |
|
47 |
|
48 or any of `demo_denoisingZ()` for image stabilisation experiments and `demo_petZ()` for dynamic PET reconstruction 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. |
|
49 |
|
50 See the source code for more details details. |
35 |
51 |
36 To run the data generation multi-threadeadly parallel to the algorithm, set the `JULIA_NUM_THREADS` environment variable to a number larger than one. |
52 To run the data generation multi-threadeadly parallel to the algorithm, set the `JULIA_NUM_THREADS` environment variable to a number larger than one. |