Skip to content

Commit

Permalink
Rearrange exercises and clarify tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Holger Kohr committed Dec 4, 2017
1 parent d7803ba commit 1d6ed8b
Showing 1 changed file with 48 additions and 24 deletions.
72 changes: 48 additions & 24 deletions code/Exercises_Part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1. Tomography\n",
"\n",
"Instead of denoising, solve the TV-regularized tomography problem\n",
"\n",
"$$\n",
" \\min_{x \\geq 0} \\left[ \\| A x - y \\|_2^2 + \\alpha \\| \\nabla x \\|_1 \\right],\n",
"$$\n",
"\n",
"where $A$ is the ray transform. You may pick your favorite acquisition geometry (2D, 3D, parallel beam, cone beam, ...). Play with different solvers, regularizers and data fit terms (see e.g. Exercises 2 and 3).\n",
"\n",
"### Good to know\n",
"\n",
"- Find out how to set up the ray transform as ODL operator. You should use the ASTRA toolbox as backend if possible.\n",
"- The data fit $\\|\\cdot -y\\|_2^2$ is now defined on a different space than before, and also $y$ is no longer an element of the reconstruction space $X$. Make sure you understand the details."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Smooth solvers\n",
"## 1. Smooth solvers\n",
"\n",
"ODL also has a number of numerical solvers for smooth problems, most of them first-order methods, i.e., methods that involve the gradient of the cost function. The [LBFGS](https://github.com/odlgroup/odl/blob/ad32a286b69f34260d4428d7282b4058ed2e2603/odl/solvers/smooth/newton.py#L247-L487) method is the limited memory variant of the popular [BFGS algorithm](https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80%93Goldfarb%E2%80%93Shanno_algorithm) for smooth optimization.\n",
"\n",
Expand Down Expand Up @@ -110,6 +90,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Tasks\n",
"\n",
"- Set up the smooth version of the TV minimization problem using the Huber function.\n",
"- Solve it with a smooth solver, using, e.g., BFGS.\n",
"\n",
"### Good to know\n",
"\n",
"- You may think that this is a lot of work. It isn't! That's because the Huber function is the **Moreau envelope** of the 1-norm. You don't need to know what this means exactly -- the important property that you will apply is\n",
Expand All @@ -129,7 +114,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Other goal functions\n",
"## 2. Other goal functions\n",
"\n",
"So far we have considered $\\|\\cdot -y\\|_2^2$ as data fit and $\\|\\nabla \\cdot\\|_1$ as regularization term. Both can be changed, of course. \n",
"\n",
Expand All @@ -148,7 +133,41 @@
"- $\\|W \\cdot\\|_1$ with the wavelet decomposition operator $W$,\n",
"- ...\n",
"\n",
"Experiment with these alternatives."
"### Tasks\n",
"\n",
"- Generate an image that is corrupted with Poisson noise instead of white noise.\n",
"- Use KL as data fit in the TV denoising problem to remove the Poisson noise.\n",
"- Do the same with salt-and-pepper noise and $L^1$ data fit.\n",
"\n",
"### Good to know\n",
"\n",
"- All these noise variants are implemented in ODL.\n",
"- The KL divergence is differentiable, so you can use a smooth solver for the Huber-TV variant if you like."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Tomography\n",
"\n",
"Instead of denoising, solve the TV-regularized tomography problem\n",
"\n",
"$$\n",
" \\min_{x \\geq 0} \\left[ \\| A x - y \\|_2^2 + \\alpha \\| \\nabla x \\|_1 \\right],\n",
"$$\n",
"\n",
"where $A$ is the ray transform. You may pick your favorite acquisition geometry (2D, 3D, parallel beam, cone beam, ...). Play with different solvers, regularizers and data fit terms (see e.g. Exercises 2 and 3).\n",
"\n",
"### Tasks\n",
"1. Solve the TV-regularized tomography problem.\n",
"2. Use at least one non-smooth and one smooth solver (see exercise 1 for the latter).\n",
"3. Add Poisson noise instead of white noise, and use the KL divergence for regularization (see exercise 2).\n",
"\n",
"### Good to know\n",
"\n",
"- Find out how to set up the ray transform as ODL operator. You should use the ASTRA toolbox as backend if possible.\n",
"- The data fit $\\|\\cdot -y\\|_2^2$ is now defined on a different space than before, and also $y$ is no longer an element of the reconstruction space $X$. Make sure you understand the details."
]
},
{
Expand Down Expand Up @@ -197,7 +216,12 @@
"\n",
"The Kaczmarz method then successively updates $x$ using one block at a time, and repeating the outer loop a given number of times. (The [Wikipedia page](https://en.wikipedia.org/wiki/Kaczmarz_method) explains the basic form of the algorithm.)\n",
"\n",
"Use [`odl.solvers.kaczmarz`](https://github.com/odlgroup/odl/blob/ad32a286b69f34260d4428d7282b4058ed2e2603/odl/solvers/iterative/iterative.py#L387-L517) to solve a tomography problem by splitting along the angles. Experiment a bit with blocking schemes (block-sequential, interlaced, maximizing inter-block angle distance etc.).\n",
"### Tasks\n",
"- Split the tomography problem into chunks along the angle axis.\n",
"- Solve the split problem using the [`odl.solvers.kaczmarz`](https://github.com/odlgroup/odl/blob/ad32a286b69f34260d4428d7282b4058ed2e2603/odl/solvers/iterative/iterative.py#L387-L517) solver.\n",
"- Use a different block scheme (block-sequential, interlaced, maximizing inter-block angle distance etc.) for arranging the angles, and investigate the convergence behavior.\n",
"\n",
"Use to solve a tomography problem by splitting along the angles. Experiment a bit with blocking schemes .\n",
"\n",
"### Good to know\n",
"\n",
Expand Down

0 comments on commit 1d6ed8b

Please sign in to comment.