Code Monkey home page Code Monkey logo

oai_analysis_2's Introduction

OAI Analysis 2

PyPI - Version PyPI - Python Version

Table of Contents

Installation

pip install oai-analysis

Introduction

This repository contains open-source analysis approaches for the Osteoarthritis Initiative (OAI) magnetic resonance image (MRI) data. The analysis code is largely written in Python with the help of ITK and VTK for data I/O and mesh processing as well as PyTorch for the deep learning approaches for segmentation and registration. The intial development of this work was led by UNC Chapel Hill as well as Kitware. This work is also an outgrowth of conversations within the Community for Open and Reproducible Musculoskeletal Imaging Research (JC|MSK). Going forward, contributions by the broader community are, of course, not only welcome but encouraged.

The following functionality is currently supported:

  1. Deep Learning Segmentation: Automatic cartilage segmentation (femoral and tibial cartilage) using a 3D UNet.
  2. Cartilage thickness: Extraction of femoral and tibial cartilage meshes and measuring of cartilage thickness based on a closest-point thickness estimation.
  3. Deep Learning Atlas registration: Registration of the carilage meshes with associated cartilage thickness to a knee atlas space via a deep registration network.
  4. 2D thickness mapping: Mapping of the thickness maps to a common 2D atlas space which provides full spatial correspondence. This is achieved via unrolling (based on a cylindrical coordinate system) for the femoral cartilage and a planar projection for the tibial cartilage.
  5. Statistical analysis: [Longitudinal statistical analysis approaches will be added shortly]

OAI analysis workflow

Difference between OAI Analysis and OAI Analysis 2

The analysis approaches in this repository are based on our initial OAI Analysis work. Much of the functionality of the original code-base has been ported to the OAI Analysis 2 repository. The main differences are

  1. Refactoring: A significant refactoring of the code so that it makes better use of ITK conventions as well as VTK for all the mesh processing needs.
  2. ICON registration: We switched to the new ICON registration approach (see manuscripts below).
  3. Data processing: We improved the data processing by better handling of data objects. Whereas the previous OAI Analysis pipeline largely depended on reading and writing various different files, the OAI Aanalysis 2 refactoring uses ITK and VTK objects.
  4. Jupyter notebooks: Better support of analysis in Jupyter notebooks.

We are currently working on the following features which should be available in the near future:

  1. Distributed processing: Whereas OAI Analysis was set up for cluster computing via a simple SLURM script OAI Analysis 2 is moving toward using Dask to allow for parallel processing on clusters and the cloud.
  2. Workflow management: Whereas OAI Analysis used custom code to avoid recomputing results, we are switching to Dagster to manage data dependencies in OAI Analysis 2.
  3. Distribution of analysis results: As we are planning on not only distributing code, but also analysis results (such as segmentations, meshes, thickness maps) we are planning on supporting data access via the Interplanetary File System (IPFS).

Development

Contributions are appreciated and welcome.

git clone https://github.com/uncbiag/OAI_analysis_2
cd OAI_analysis_2
pip install -e .
pip install pytest
pytest

To view the demo notebooks:

cd notebooks
jupyter notebook

upload test data to https://data.kitware.com/#collection/6205586c4acac99f42957ac3/folder/620559344acac99f42957d63

Citation

While we used the following stationary velocity field registration approach available in easyReg for OAI Analysis [paper]

@InProceedings{Shen_2019_CVPR,
title={Networks for joint affine and non-parametric image registration},
author={Shen, Zhengyang and Han, Xu and Xu, Zhenlin and Niethammer, Marc},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4224--4233},
year={2019}
}

we now support the ICON registration approach which provides a very simple registration interface and makes use of ITK images and transforms: [paper]

@InProceedings{Greer_2021_ICCV,
author    = {Greer, Hastings and Kwitt, Roland and Vialard, Francois-Xavier and Niethammer, Marc},
title     = {ICON: Learning Regular Maps Through Inverse Consistency},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month     = {October},
year      = {2021},
pages     = {3396-3405}
}

An overview of the current analysis framework will be available as a QMSKI abstract

@InProceedings{Sahu_2022_QMSKI,
author    = {Sahu, Pranjal and Greer, Hastings and Xu, Zhenlin and Shen, Zhengyang and Bonaretti, Serena and McCormick, Matt and Niethammer, Marc},3
title     = {Reproducible Workflow for Visualization and Analysis of OsteoArthritis Abnormality Progression},
booktitle = {Proceedings of the International Workshop on Quantitative Musculoskeletal Imaging (QMSKI)},
year      = {2022}
}

Results obtained by the OAI Analysis pipeline can be found in this manuscript [paper]

@article{huang2022dadp,
  title={DADP: Dynamic abnormality detection and progression for longitudinal knee magnetic resonance images from the Osteoarthritis Initiative},
  author={Huang, Chao and Xu, Zhenlin and Shen, Zhengyang and Luo, Tianyou and Li, Tengfei and Nissman, Daniel and Nelson, Amanda and Golightly, Yvonne and Niethammer, Marc and Zhu, Hongtu},
  journal={Medical Image Analysis},
  pages={102343},
  year={2022},
  publisher={Elsevier}
}

Acknowledgements

This work was developed with support in part from the National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS) under award numbers 1R44AR074375 and 1R01AR072013.

License

oai-analysis is distributed under the terms of the Apache-2.0 license.

oai_analysis_2's People

Contributors

hastingsgreer avatar marcniethammer avatar pranjalsahu avatar thewtex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

oai_analysis_2's Issues

Clean up repository size

The repository is currently 753 MB, and takes 17 minutes to clone from GitHub.

There are some large files in Git history and large files in the current working directory data/ directory.

Remove the large files from Git History, data/, push to main, make main the default GitHub branch and delete master and other branches.

Change order of segmentation processing

Old order:
warp segmentation of cartilage
extract mesh
compute thickness

New order:
extract mesh
compute thickness
warp mesh, bringing metadata with it
move mesh to atlas cartilage mesh
move mesh to 2D

Remove mermaid

I was looking at the code and looks like mermaid is not needed anymore. The only place it is used is where some ParameterDict is being needed. Can we do it using just json and remove mermaid from dependencies ?

Target cuda 11.7/11.8

Available on longleaf, along with:

cuda: cuda/8.0, cuda/9.0, cuda/9.2, cuda/10.0, cuda/10.1, cuda/11.2, cuda/11.3, cuda/11.4, cuda/11.5, cuda/11.8, cuda/12.2

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.