GithubHelp home page GithubHelp logo

raghavendrasri / deepivus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dmolony3/deepivus

0.0 0.0 0.0 15.74 MB

Platform for deep learning based segmentation and phenotyping of IVUS pullbacks

License: Apache License 2.0

Python 100.00%

deepivus's Introduction



A Platform for Coronary Artery Intravascular Ultrasound Segmentation and Analysis

License GitHub tag (with filter)

DeepIVUS is a platform for deep learning based segmentation and analysis of coronary artery Intravascular Ultrasound (IVUS) images. The platform consists of a graphical user interface and serves to provide the following capabilities.

  • Viewer of IVUS pullbacks
  • End diastolic gating of IVUS pullbacks
  • Segmentation of internal and external elastic lamina
  • Automated lesion analysis
  • Phenotyping of IVUS pullbacks
  • Generation of IVUS pullback report

CURRENT VERSION DOES NOT SUPPORT PHENOTYPING

Installation

Installation

It is recommended to first setup a virtual environment using Anaconda or another environment manager

git clone https://github.com/dmolony3/DeepIVUS.git
cd DeepIVUS
python -m pip install .

Installation (detailed)

Recommended way to install is as a virtual environment with Anaconda. On a windows computer follow the following instructions

  1. Download and install Anaconda from here.
  2. Download DeepIVUS from here.
  3. Download the trained weights from here and extract to the DeepIVUS folder. After extraction the files should be in the model folder contained within DeepIVUS. If not, create this folder and move the files here.
  4. Open Anaconda Prompt and navigate to the folder containing the model using the following command (just remember to switch "C:/Users/David/Documents/" to whereever you downloaded DeepIVUS to):
cd C:/Users/David/Documents/DeepIVUS
  1. Create a virtual environment with the following command:
conda create -n DeepIVUS python=3.6
  1. Activate the virtual environment with the following command:
conda activate DeepIVUS
  1. Install all the dependency packages using the following commmand:
python -m pip install .
  1. Run the program using the following command:
DeepIVUS gui
  1. After installation to use the program again you just need to repeats steps 4-8 but skip step 5 and step 7.

Install binary

A Windows 11 binary is available from here https://github.com/dmolony3/DeepIVUS/releases

Model weights

Model weights are accessible from here.

Launching the GUI

DeepIVUS is launced directly from the command line. This will open the GUI and functionality is explained in more detail below

DeepIVUS gui

Reading and Display IVUS pullbacks

IVUS pullbacks in DICOM (.dcm) format can be loaded. Contours are stored in a .xml format and can be loaded for display. Alternatively reading a project file (.proj) will simultaneously read in the images and contours. Images are displayed in the cross-sectional view as well as the longitudinal view. The longitudinal view can be manipulated by rotating the marker in the cross-sectional view.

Alt Text

End-diatolic gating of IVUS pullbacks

End diastolic images from the pullback can be extracted by presssing the Extract Diastolic Frames button.

Automatic Gating

Segmentation of IVUS pullbacks

IVUS pullbacks can be segmented by pressing the Segment button. It is highly recommended to extract end-diastolic frames prior to segmentation. Checking the Gated Frames box will segment only the end-diastolic images. If this is unchecked segmentation will take a significantly longer time.

Segmentation

Manual contour editing

Contours can be manually edited by dragging anchor points.

Manual Editing

Contours can also be drawn from scratch by pressing the Manual Contour button

Manual Segmentation

Automated lesion analysis

After contours have been loaded or generated from segmentation lesion analysis is automatically performed. Areas of plaque burden > 40% are identified as lesions. The schematic view provides a quick visual assessment of lumen and plaque area over the entire vessel. Critical info including lesion length, minimum lumen area (MlA) and maximum plaque burden (MPB) are highlighted within this view. Clicking on the MLA or MPB will display the associated image in the cross-sectional view.

Lesion Analysis

Report Generation

A report in the form of a text file can be generated for each frame in the pullback by pressing Write Report. If Gated Frames is checked then the report will only include the end-diastolic images. The report consists of the following variables:
Frame, Lumen area, Plaque area, Vessel area, Plaque burden, Phenotype

Keyboard Shortcuts

➡️ Next proximal image
⬅️ Next distal image
⬆️ Next (gated) proximal image
⬇️ Next (gated) distal image
h Hide contours
j Jiggle current frame
q Quit session

CLI reference

Alternatively to using the GUI DeepIVUS can be used directly from the command line.

deepivus --help

Usage: [OPTIONS] COMMAND [ARGS]...

Options:
  --version  Show the version and exit
  --help     Show this message and exit

Commands:
  gui        Launches the GUI
  segment    Segment IVUS images
  gate       Identify end diastolic images

deepivus segment --help

Usage: DeepIVUS segment dicom_path [OPTIONS]
  Segment dicom file from the given dicom_path
  
Options:
  -g, --gated  Select whether only gated images should be segmented (much quicker)
  -f, --fname  Output filename for the contours\
  --help       Show this message

deepivus gate --help

Usage: DeepIVUS gate dicom_path [OPTIONS]
  Write end diastolic frames from the given dicom_path
  
Options:
  -w, --write  Write gated frames as jpgs
  --help       Show this message

DeepIVUS Project Roadmap

  • Deep ensembles for model uncertainty

deepivus's People

Contributors

dmolony3 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.