This is the repo for my Master Thesis from my M. Sc. in Mathematics at TUM. The main idea of my work was to explore denoising techniques to enhace visualization of cryo-electron tomograms (CET) using Deep Learning. In the CET setting, no ground truth data is available and therefore the denoising exploration was made using two separate ways. One way implements a current denoising network based on self-supervised learning and dropout. The other was is a proposed mechanism that implements sampling in Fourier space to generate different versions of the noisy image which are to some degree independent and which can then be mapped under the Noise2Noise paradigm. I believe that this last implementation can be further developed to achieve significantly better denoising results because only a single CET reconstruction is needed to achieve denoising.
One very interesting line for further development would be to apply the present method to Fluorescent Microscopy images, where no ground truth nor second noisy images can be obtained.
First part of the Readme is a small description of my work, followed by installation of packages used to run the code. Then I describe some details on the implementation. Afterwards, some of my results are described. And finally possible next steps for anyone interested.
The implemented denoising network is based on the U-net as follows:
3D implementation of the network based on the U-net used to map noisy volumes to denoised outputs. Blue boxes are part of the encoding path; red ones are used for the decoding path.
A sample script for denoising images using the proposed Fourier sampling strategy (described below) can be found here
Install Miniconda, then add some channels thet are important for conda installation by running:
conda config --add channels pytorch,simpleitk,anaconda,conda-forge
Afterwards, from this folder run
conda create --name <yourEnvNameHere> --file master-thesis/requirements_S2SdDenoising.txt
Finally, install some code I developed for my use case:
cd cryoS2Sdrop; pip install --editable ./
cd tomoSegmentPipeline; pip install --editable ./
Workflow to obtain an input batch using Bernoulli samples in real space. First, a square subtomogram,
In this setting we are mapping randomly zeroed out pixels and using the surrounding pixels to predict them.
Inference
In order to get the denoised version of the tomogram, the trained network is used with dropout on on each of the overlapping patches that form the image. A new version of the network, with parameters
Workflow to obtain an input batch using Bernoulli samples in Fourier space. First, the Fourier transform of the input image,
Inference
The final denoised image is obtained by predicting the individual patches of the input image and averaging in a similar fashion as described for the real space strategy. More specifically, to predict one patch
and we repeat this process for each patch of the image. Taking the average of the denoised patches whenever there is overlap between them.
This can be consulted more thoroughly on the final manuscript of my Master Thesis (TODO)