Giter Site home page Giter Site logo

cryocare_t2t's Introduction


A memory efficient implementation can be found here.


Cryo-CARE_Preview

Cryo-CARE: Content-Aware Image Restoration for Cryo-Transmission Electron Microscopy Data

Tim-Oliver Buchholz1, Mareike Jordan, Gaia Pigino, Florian Jug
1[email protected]

Multiple approaches to use deep learning for image restoration have recently been proposed. Training such approaches requires well registered pairs of high and low quality images. While this is easily achievable for many imaging modalities, e.g. fluorescence light microscopy, for others it is not. Cryo-transmission electron microscopy (cryo-TEM) could profoundly benefit from improved denoising methods, unfortunately it is one of the latter. Here we show how recent advances in network training for image restoration tasks, i.e. denoising, can be applied to cryo-TEM data. We describe our proposed method and show how it can be applied to single cryo-TEM projections and whole cryo-tomographic image volumes. Our proposed restoration method dramatically increases contrast in cryo-TEM images, which improves the interpretability of the acquired data. Furthermore we show that automated downstream processing on restored image data, demonstrated on a dense segmentation task, leads to improved results.

Publications:

This is the implementation of the Tomo2Tomo denoising scheme for direct-detector movie acquisitions.

Usage

Prerequisits:

  • NVIDIA GPU with driver >= 430.40

Installation with Singularity

First step is to clone this github repository.

Then the simplest way to run the examples is to use the Singularity container. Singularity allows us to provied you with a fully configured environment, which has all needed packages and dependecies installed. But it requires you to install Singularity on your system:

Once you have installed Singularity you can either build the container yourself with the following commands:

  1. Change direcotry into the cloned repository:
    $ cd cryoCARE_T2T
  2. Run the Singularity build:
    $ sudo singularity build cryoCARE_v0.1.1.simg cryoCARE.Singularity

If you don't have sudo rights you can also download the built Singularity container from here.

MotionCor2

Due to licensing we can not ship MotionCor2 directly with the singularity container. You have to download MotionCor2 v1.3.0 CUDA-10.1 from here and place it in cryoCARE_T2T/example.

Note: It is important to get the CUDA-10.1 version, since we specifically installed CUDA-10.1 in the singularity container.

Example Data

We would like to thank Mareike Jordan from the Pigino Lab at MPI-CBG for the example data.

The data can be downloaded here.

Once the data is downloaded unpack it into cryoCARE_T2T/example/data/.

You should now have the following directory tree:

cryo_CARE_T2T
|   └─── example
|           └─── data
|           |       └─── Tomo110
|           |               └─── frames
|           |               └─── imod
|           |--- MotionCor2 v1.3.0 CUDA-10.1

Run the Singularity Image

To start a jupyter notebook from the singularity image run this command:
$ singularity run --nv -B user:/run/user -B example/:/notebooks -B example/data/:/data cryoCARE_v0.1.1.simg

This will display a link to the running jupyter server. Open this link in a browser and you will be able to run the five example notebooks in 'cryoCARE_simg/example':

  • 01_Split_Frames.ipynb: This notebook aligns and splits the movie frames into even/odd halves.
  • 02_Tomogram_Reconstruction.ipynb: This notebook reconstructs the two (even/odd) tomograms based on a previous IMOD-reconstruction.
  • 03_Training_Data_Generation.ipynb: This notebook is used to extract training and validation data.
  • 04_Train_cryoCARE_Network.ipynb: This notebook shows how a cryo-CARE network is trained.
  • 05_Predict_cryoCARE.ipynb: The last notebook is used to apply a trained model to tomographic data.

Manual Installation

You can also install the packages on your own:

Note: If you run it without the Singularity container you probably have to adjust the paths inside the jupyter notebooks.


How to cite:

@inproceedings{buchholz2019cryo,
  title={Cryo-CARE: content-aware image restoration for cryo-transmission electron microscopy data},
  author={Buchholz, Tim-Oliver and Jordan, Mareike and Pigino, Gaia and Jug, Florian},
  booktitle={2019 IEEE 16th International Symposium on Biomedical Imaging (ISBI 2019)},
  pages={502--506},
  year={2019},
  organization={IEEE}
}

@article{buchholz2019content,
  title={Content-aware image restoration for electron microscopy.},
  author={Buchholz, Tim-Oliver and Krull, Alexander and Shahidi, R{\'e}za and Pigino, Gaia and J{\'e}kely, G{\'a}sp{\'a}r and Jug, Florian},
  journal={Methods in cell biology},
  volume={152},
  pages={277--289},
  year={2019}
}

cryocare_t2t's People

Contributors

tibuch avatar sbliven avatar

Stargazers

Wen Jiang avatar Genevieve Buckley avatar  avatar Kithmini Herath avatar Zhenhang-Lu avatar  avatar Joran Deschamps avatar  avatar An Mu avatar CalvinKlein96 avatar  avatar  avatar yuhx avatar Lorena Marcelo avatar Zhengyi Yang avatar Benoît Zuber avatar Ricardo Righetto avatar  avatar Nemo avatar Michaël Defferrard avatar  avatar Benjamin Barad avatar Robert Haase avatar Xhark avatar Kamil Slowikowski avatar Florian Jug avatar

Watchers

James Cloos avatar  avatar  avatar Nemo avatar  avatar paper2code - bot avatar

cryocare_t2t's Issues

IndexError in 02_Tomogram_reconstruction.ipynb

Hi,
The 7th code cell in 02_Tomogram_reconstruction.ipynb is triggering an IndexError.
It can be fixed by replacing
pixel_spacing = float(p[1].split()[0])*0.1
with
pixel_spacing = float(p[0].split()[0])*0.1

Reconstructed half tomograms look strange

Hello,

When I reconstruct 6x binned half tomograms and look at them within the "tomogram inspection", they look very strange. Please see attached. What could be the reason?

Thanks,
Elena
Screen Shot 2022-02-17 at 4 23 25 PM

Adding cryoCare to Scipion?

Dear developers, we are working on a tomography set of plugins for tomography.

We have imod, Eman, dynamo novaCTF, motincor2 ctffind4, gCtf...deepfinder just joined the project.

There isn't a denoiser, you can be the first one. Is this something you will be interested in.

You'll count with our assistance, of course.

UnkownError in 04_Train_cryoCARE_Network

while training model (6th code cell), an UnkownError is thrown, see cell output. The error message suggests cuDNN failed to initialize.
jupyter notebook output in the terminal indeed suggest that cuDNN had an issue.
Tensorflow spits out a lot of deprecation warnings.

This issue happens with a container built following instructions given in this repo, as well as with the precompiled container available from this repo.

To solve the issue, I followed the procedure described in this solution

Specifically I added the following lines at the beginning of the notebook:

import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
  try:
    # Currently, memory growth needs to be the same across GPUs
    for gpu in gpus:
      tf.config.experimental.set_memory_growth(gpu, True)
    logical_gpus = tf.config.experimental.list_logical_devices('GPU')
    print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
  except RuntimeError as e:
    # Memory growth must be set before GPUs have been initialized
    print(e)

The GPUs on my system are 4x 2080Ti

Absolute paths required in utils.py

I'm running cryoCARE without using singularity. I have to update several paths in the notebooks for /data and the MotionCor2 binaries (as expected). However, I also run into File-not-found errors in the reconstruct_tomo call of 02_Tomogram_Reconstruction. I'm using a relative path, so some filepaths are no longer correct after the initial os.chdir call.

I am preparing a PR with the fix.

MotionCor2 Access

Can't ship MotionCor2 with Singularity (license issues?).
Maybe MotionCor2 can be mounted via examples. --> User has to download MotionCor2 but doesn't need sudo rights to build the container.

build error

Hi,
While building the singularity package, I am getting an error:

+ wget -P /imod http://bio3d.colorado.edu/ftp/latestIMOD/RHEL6-64_CUDA8.0/imod_4.10.16_RHEL6-64_CUDA8.0.sh
--2020-12-17 16:40:38--  http://bio3d.colorado.edu/ftp/latestIMOD/RHEL6-64_CUDA8.0/imod_4.10.16_RHEL6-64_CUDA8.0.sh
Resolving bio3d.colorado.edu (bio3d.colorado.edu)... 128.138.72.88
Connecting to bio3d.colorado.edu (bio3d.colorado.edu)|128.138.72.88|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://bio3d.colorado.edu/ftp/latestIMOD/RHEL6-64_CUDA8.0/imod_4.10.16_RHEL6-64_CUDA8.0.sh [following]
--2020-12-17 16:40:39--  https://bio3d.colorado.edu/ftp/latestIMOD/RHEL6-64_CUDA8.0/imod_4.10.16_RHEL6-64_CUDA8.0.sh
Connecting to bio3d.colorado.edu (bio3d.colorado.edu)|128.138.72.88|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-12-17 16:40:39 ERROR 404: Not Found.

ABORT: Aborting with RETVAL=255
Cleaning up...

IMOD version needs to be updated

Only 4.12.9 through 4.12.17 are available now but the script tries to download 4.10.52
`+ mkdir /imod

FATAL: While performing build: while running engine: exit status 8
`

IMOD version

I noticed that the singularity container uses IMOD 4.10.16. This is an older beta release (latest stable: 4.9.12, beta: 4.10.32). I was wondering if there were specific features of IMOD 4.10 that are especially important for cryoCARE, or if it would also work with the 4.9 series.

I did come across one difference already (the new -dfixed parameter of mtffilter)

fixed.st is missing

Hello,

When I am running reconstruct tomogram. I am getting error "FileNotFoundError: [Errno 2] No such file or directory: 'tomo001_fixed.st'" What is this file?

Thanks,
Elena

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.