Coder Social home page Coder Social logo

jackzhousz / 3d-ocrt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kevinczhou/3d-ocrt

0.0 0.0 0.0 30 KB

Computational 3D microscopy with optical coherence refraction tomography (OCRT)

License: MIT License

Python 87.91% Jupyter Notebook 12.09%

3d-ocrt's Introduction

3D optical coherence refraction tomography

We have extended optical coherence refraction tomography (OCRT) to 3D by incorporating a parabolic mirror, allowing acquisition of 3D OCT volumes across two rotation axes without moving the sample. This repository includes code that registers and combines these volumes to form a resolution-enhanced, speckle-reduced, refraction-corrected 3D OCRT reconstruction along with a coregistered refractive index map of the sample.

See also our original 2D OCRT implementation: https://github.com/kevinczhou/optical-coherence-refraction-tomography/

Datasets

The datasets for the four biological samples analyzed in the paper (fruit fly, zebrafish, mouse trachea, mouse esophagus) can be downloaded from here as hdf5 files. Be warned that they are rather large -- 123 GB per sample. This corresponds to 96 multi-angle OCT volumes with 400 by 400 A-scans, each with 2000 pixels (96*400*400*2000*32 bits = 122.88 GB). I've also included tensorflow checkpoint files for each sample (tf_ckpts), which contain pre-calibrated boundary conditions that are used by tensorflow to initialize the optimization variables.

Note that the A-scans in these hdf5 files are saved in a pre-scrambled order so that the A-scans can be read in a random order contiguously, and therefore more efficiently, from storage for stochastic gradient descent optimization. If you wish to form images (i.e., B-scans) from the A-scans, then use the get_Bscan function in paraOCRT.py by specifying indices for the angle and lateral coordinate.

Dependencies

The code depends on the following libraries:

  • tensorflow (>=2.2, gpu version preferable)
  • numpy
  • scipy
  • matplotlib
  • h5py
  • jupyter

Alternatively, you can use environment.yml to recreate the conda environment I used, e.g.:

conda env create --name tf2 --file=environment.yml

Usage

Download the biological sample(s) into /data and run the jupyter notebook. I tested this code on an 11-GB GPU, but if your GPU is smaller (or larger), you can try adjusting batch_size_stratified in the second notebook cell. Unlike our 2D implementation, this version doesn't require as much CPU RAM (but does require significantly more storage space to accommodate the 123-GB/sample datasets).

Citation

TBD

3d-ocrt's People

Contributors

kevinczhou avatar

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.