You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-8Lines changed: 32 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@
8
8
</a>
9
9
</div>
10
10
<br>
11
-
A package for microscopy image based deconvolution via Optim.jl. This package works with N dimensional Point Spread Functions and images.
11
+
A package for microscopy image based deconvolution via Optim.jl. This package works with N dimensional <ahref="https://github.com/RainerHeintzmann/PointSpreadFunctions.jl">Point Spread Functions</a> and images.
12
12
The package was created with microscopy in mind but since the code base is quite general it is possible to deconvolve different kernels as well.
13
-
14
-
We would be happy to deconvolve *real* data! File an issue if we can help deconvolving an image/stack. We would be also excited to adapt DeconvOptim.jl to your special needs!
15
13
<br>
14
+
15
+
Deconvolution of a dataset with size 512x256x128 took [2.2 seconds](https://proceedings.juliacon.org/papers/10.21105/jcon.00099) on a RTX 3060 GPU!
res, o =deconvolution(img_n, psf, regularizer=reg)
82
82
```
83
83
84
+
## Development
85
+
Feel free to file an issue regarding problems, suggestions or improvement ideas for this package!
86
+
We would be happy to deconvolve *real* data! File an issue if we can help deconvolving an image/stack. We would be also excited to adapt DeconvOptim.jl to your special needs!
87
+
88
+
## Citation
89
+
If you use this paper, please cite it. Thes [PDF is linked here](https://proceedings.juliacon.org/papers/10.21105/jcon.00099).
90
+
```bibtex
91
+
@article{Wechsler2023,
92
+
doi = {10.21105/jcon.00099},
93
+
url = {https://doi.org/10.21105/jcon.00099},
94
+
year = {2023},
95
+
publisher = {The Open Journal},
96
+
volume = {1},
97
+
number = {1},
98
+
pages = {99},
99
+
author = {Felix Wechsler and Rainer Heintzmann},
100
+
title = {DeconvOptim.jl - Signal Deconvolution with Julia},
101
+
journal = {Proceedings of the JuliaCon Conferences}
102
+
}
103
+
```
84
104
85
105
## Contributions
86
106
I would like to thank [Rainer Heintzmann](https://nanoimaging.de/) for the great support and discussions during development.
87
107
Furthermore without [Tullio.jl](https://github.com/mcabbott/Tullio.jl) and [@mcabbott](https://github.com/mcabbott/) this package wouldn't be as fast as it is. His package and ideas are the basis for the implementations of the regularizers.
88
108
109
+
## Related Packages
89
110
111
+
*[ThreeDeconv](https://github.com/computational-imaging/ThreeDeconv.jl): works great, CPU performance is much slower, GPU performance is slower
112
+
*[Deconvolution.jl](https://github.com/JuliaDSP/Deconvolution.jl): rather simple package with Wiener and Lucy Richardson deconvolution.
113
+
*[PointSpreadFunctions.jl](https://github.com/RainerHeintzmann/PointSpreadFunctions.jl): generates point spread functions for microscopy applications
Copy file name to clipboardExpand all lines: docs/src/background/loss_functions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ One common loss function (especially in deep learning) is simply the $L^2$ norm
7
7
8
8
9
9
So far we provide three adapted loss functions with our package. However, it is relatively easy to incorporate
10
-
custom defined loss functions or import them from packages like [Flux.ml](https://fluxml.ai/Flux.jl/stable/models/losses/).
11
-
The interface from Flux.ml is the same as for our loss functions.
10
+
custom defined loss functions or import them from packages like [Flux.jl](https://fluxml.ai/Flux.jl/stable/models/losses/).
11
+
The interface from Flux.jl is the same as for our loss functions.
12
12
13
13
14
14
## Poisson Loss
@@ -44,7 +44,7 @@ The numerical evaluation of the Poisson loss can lead to issues. Since $\mu(r)=0
44
44
45
45
## Scaled Gaussian Loss
46
46
It is well known that the Poisson density function behaves similar as a Gaussian density function for $\mu\gg 1$. This approximation is almost for all use cases in microscopy valid since regions of interest in an image usually consists of multiple photons and not to a single measured photon.
47
-
Mathematically the Poisson probability can be approximately (using Stirling's formula in the derivation) expressed as:
47
+
Mathematically the Poisson probability can be approximately (using [Stirling's formula](https://en.wikipedia.org/wiki/Stirling's_approximation) in the derivation) expressed as:
In frequency space (Fourier transforming the above equation) the equation with $b=0$ is:
26
26
27
-
$\tilde Y(k) = (\tilde S * \tilde{\text{PSF}})(k)$
27
+
$\tilde Y(k) = (\tilde S \cdot \tilde{\text{PSF}})(k),$
28
28
29
-
where $k$ is the spatial frequency. From that equation it is clear why the green and blue line in the plot look very similar. The reason is, that the orange line is constant and we basically multiply the OTF with the orange line.
29
+
where $k$ is the spatial frequency and $\cdot$ represents term-wise multiplication (this is due to the [convolution theorem of the Fourier transform](https://en.wikipedia.org/wiki/Convolution_theorem)). From that equation it is clear why the green and blue line in the plot look very similar. The reason is, that the orange line is constant and we basically multiply the OTF with the orange line.
In fluorescence microscopy the dominant noise is usually *Poisson shot noise* (see [Mertz:2019](@cite)).
40
40
The origin of that noise is the quantum nature of photons. Since the measurement process spans over a time T only a discrete number of photons is detected (in real experiment the amount of photons per pixel is usually in the order of $10^1 - 10^3$). Note that this noise is not introduced by the sensor and is just a effect due to quantum nature of light.
41
-
We can interprete every sensor pixel as a discrete random variable $X$. The expected value of that pixel would be $\mu(r)$ (true specimen convolved with the $\text{PSF})$. Due to noise, the systems measures randomly a signal for $X$ according to the Poisson distribution:
41
+
We can interpret every sensor pixel as a discrete random variable $X$. The expected value of that pixel would be $\mu(r)$ (true specimen convolved with the $\text{PSF})$. Due to noise, the systems measures randomly a signal for $X$ according to the Poisson distribution:
where $f$ is the probability density distribution, $y$ the measured value of the sensor, $\mu$ the expected value and $\Gamma$ the generalized factorial function.
45
+
where $f$ is the probability density distribution, $y$ the measured value of the sensor, $\mu$ the expected value and $\Gamma$ the generalized factorial function ([Gamma function](https://en.wikipedia.org/wiki/Gamma_function)).
0 commit comments