Git Product home page Git Product logo

rapid's Introduction

RAPID - Reconstruct Any Pathology In 3 Dimensions

What is RAPID?

RAPID is a deep learning-based algorithm to convert a list of whole slide images into a full resolution three-dimensional reconstruction. These 3D reconstructions with their accompanying visualization allow for new insights in tumour growth and tissue microarchitecture. Furthermore, these 3D reconstructions can greatly accelerate multimodal AI development where multiple 3D volumes from different imaging modalities are used for a downstream task such as diagnosis. RAPID leverages several state-of-the-art deep-learning based keypoint detectors and matchers, such as LightGlue and DeDoDe, for robustness in various conditions. Stay tuned for our upcoming publication [in preparation] for more technical details of RAPID.

Does RAPID also work on my data?

We have primarily tested RAPID on sparsely sampled prostatectomy specimens where slides were acquired every ~4 mm. The main strength of RAPID is that it was designed to be robust against arbitrary slice gaps, providing a valuable addition to other methods which can only handle serial sections with micron-scale slice gaps. Therefore, if your data has sub 4 mm slice gaps and is ordered along the desired reconstruction dimension, we expect that RAPID will be able to reconstruct it in 3D. Moreover, RAPID expects that each input slide has multiple resolution layers, also known as a pyramidal file, and preferably uses .mrxs or .tiff files. In addition, RAPID requires a tissue mask of said tissue. This tissue mask can be generated by your tissue segmentation algorithm of choice, otherwise RAPID will automatically generate masks for you using Otsu thresholding.

How do I run RAPID?

Docker container

It is highly recommended to run RAPID as a Docker container, since RAPID uses some libraries that need to be built from source. The Docker container comes prepackaged with these libraries and any additional model weights, and should run out-of-the-box. We will soon provide a link to directly pull the pre-built container, but for now you can build the container yourself locally with the provided Dockerfile in /build.

docker build . --tag dnschouten/rapid:v0.1

Data preparation

Your input data should be prepared as follows, where you make a separate directory for each volume to be reconstructed. Ensure that the name of the tissue mask, if provided, is exactly the same as that of the image but with a "_mask" suffix.

data/ 
└── case_ID_001
|    └── 001.tif
|    ├── 001_mask.tif
|    ├── 002.tif
|    ├── 002_mask.tif
|    └── etc.

Usage instructions

After preparing the input data in the aforementioned format, you can run the RAPID container with:

docker run -it --gpus all -v /home/user:/home/user --network host dnschouten/rapid:v0.1

Inside the container you can clone the RAPID repo to get the latest version after which you can run the main.py script. The main.py script expects three main arguments: datadir which refers to the directory with your input data, savedir which refers to the location to save the results and mode which refers to the reconstruction mode ["affine", "deformable"] in which you want to run RAPID. You can use the -v /home/user:/home/user flag to attach any local storage with your data to the container.

Sample data

If you don't have any data available, but are still curious to try RAPID, we will soon provide some sample data on Zenodo.

Licensing

The source code of RAPID is licensed under the GNU Lesser General Public License (LGPL).

rapid's People

Contributors

dnschouten avatar

Stargazers

Nadieh avatar Emre Çağatay KÖSE avatar

Watchers

 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.