Coder Social home page Coder Social logo

haranrk / digipathai Goto Github PK

View Code? Open in Web Editor NEW
63.0 6.0 25.0 141.58 MB

Tool to visualize gigantic pathology images and use AI to segment cancer cells and present as an overlay

License: MIT License

Python 14.80% JavaScript 83.31% HTML 1.77% CSS 0.12%
deep-learning cancer-research segmentation gui medical-image-analysis openslide python wsi

digipathai's Introduction

PyPI version Downloads arXiv

DigiPathAI

A software application built on top of openslide for viewing whole slide images (WSI) and performing pathological analysis

Citation

If you find this reference implementation useful in your research, please consider citing:

@article{khened2020generalized,
  title={A Generalized Deep Learning Framework for Whole-Slide Image Segmentation and Analysis},
  author={Khened, Mahendra and Kori, Avinash and Rajkumar, Haran and Srinivasan, Balaji and Krishnamurthi, Ganapathy},
  journal={arXiv preprint arXiv:2001.00258},
  year={2020}
}

Features

  • Responsive WSI image viewer
  • State of the art cancer AI pipeline to segment and display the cancerous tissue regions

Application Overview

Results

Installation

Running of the AI pipeline requires a GPU and several deep learning modules. However, you can run just the UI as well.

Just the UI

Requirements

  • openslide
  • flask

The following command will install only the dependencies listed above.

pip install DigiPathAI

Entire AI pipeline

Requirements

  • pytorch
  • torchvision
  • opencv-python
  • imgaug
  • matplotlib
  • scikit-learn
  • scikit-image
  • tensorflow-gpu >=1.14,<2
  • pydensecrf
  • pandas
  • wget

The following command will install the dependencies mentioned

pip install "DigiPathAI[gpu]"

Both installation methods install the same package, just different dependencies. Even if you had installed using the earlier command, you can install the rest of the dependencies manually.

Usage

Local server

Traverse to the directory containing the openslide images and run the following command.

digipathai <host: localhost (default)> <port: 8080 (default)>

Python API usage

The application also has an API which can be used within python to perform the segmentation.

from DigiPathAI.Segmentation import getSegmentation

prediction = getSegmentation(img_path, 
			patch_size  = 256, 
			stride_size = 128,
			batch_size  = 32,
			quick       = True,
			tta_list    = None,
			crf         = False,
			save_path   = None,
			status      = None)

Contact

ko-fi

digipathai's People

Contributors

codacy-badger avatar haranrk avatar mahendrakhened avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

digipathai's Issues

Validation set results

Hello

Thank you for providing this pipeline. I have a question about the validation set (10 WSIs) of the PAIP2019 dataset; in the supplementary data of your paper, you mentioned the clipped Jaccard index of the individual models that make up the ensemble (table 9).
Using the pipeline, I produced the predictions of the validation set for the Densenet model, but when I calculated the clipped metric for the generated predictions it gave (0.595517) while in your supplementary file, you stated that it was (0.679).
Can you please explain why I got that different results? Is the used pre-trained model in the pipeline the same as the one you used to get that results?

Many thanks

module 'tensorflow' has no attribute 'set_random_seed'

This error " module 'tensorflow' has no attribute 'set_random_seed'" occurs after running the following code :

from DigiPathAI.Segmentation import getSegmentation

prediction = getSegmentation(img_path,
patch_size = 256,
stride_size = 128,
batch_size = 32,
quick = True,
tta_list = None,
crf = False,
save_path = None,
status = None)

cannot install using pip

I tried installing using pip install DigiPathAI or pip install DigiPathAI==0.1.3

but got the below error :-

ERROR: Could not find a version that satisfies the requirement DigiPathAI (from versions: none)
ERROR: No matching distribution found for DigiPathAI

also the verbose i got from pip install DigiPathAI -vvv : -

Created temporary directory: /tmp/pip-ephem-wheel-cache-tl8zisak
Created temporary directory: /tmp/pip-req-tracker-wn0ph20o
Created requirements tracker '/tmp/pip-req-tracker-wn0ph20o'
Created temporary directory: /tmp/pip-install-ve44mpso
1 location(s) to search for versions of DigiPathAI:

TensorFlow2.0

Is there any plan to run DigiPathAI with TensorFlow2.0?

Unsupported or missing image file

The current setup is complete, but this problem has occurred.
The execution code is Python API usage
(openslide.lowlevel.openslideunsupportedformaterror: unsupported or missing image)

openslide_error

Feature Request

The file names are to be hardcoded in a specific format. Please provide features for recursively searching for files in base directory

CUDA not found

I am using an externally located LD_LIBRARY_PATH for my CUDA installation, and DigipathAI cannot access this, blocking GPU processing. It is looking for the necessary files in the current working directory + LD_LIBRARY_PATH versus just LD_LIBRARY_PATH. Any way to edit the base code?

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.