|
a |
|
b/README.md |
|
|
1 |
[](https://badge.fury.io/py/DigiPathAI) |
|
|
2 |
[](https://pepy.tech/projects/digipathai) |
|
|
3 |
[](https://arxiv.org/abs/2001.00258) |
|
|
4 |
|
|
|
5 |
|
|
|
6 |
# DigiPathAI |
|
|
7 |
A software application built on top of [openslide](https://openslide.org/) for viewing [whole slide images (WSI)](https://www.ncbi.nlm.nih.gov/pubmed/30307746) and performing pathological analysis |
|
|
8 |
|
|
|
9 |
### Citation |
|
|
10 |
If you find this reference implementation useful in your research, please consider citing: |
|
|
11 |
``` |
|
|
12 |
@article{khened2020generalized, |
|
|
13 |
title={A Generalized Deep Learning Framework for Whole-Slide Image Segmentation and Analysis}, |
|
|
14 |
author={Khened, Mahendra and Kori, Avinash and Rajkumar, Haran and Srinivasan, Balaji and Krishnamurthi, Ganapathy}, |
|
|
15 |
journal={arXiv preprint arXiv:2001.00258}, |
|
|
16 |
year={2020} |
|
|
17 |
} |
|
|
18 |
``` |
|
|
19 |
# Features |
|
|
20 |
- Responsive WSI image viewer |
|
|
21 |
- State of the art cancer AI pipeline to segment and display the cancerous tissue regions |
|
|
22 |
|
|
|
23 |
# Application Overview |
|
|
24 |
<p align="center"> |
|
|
25 |
<img src="imgs/demo.gif"> |
|
|
26 |
</p> |
|
|
27 |
|
|
|
28 |
# Results |
|
|
29 |
<p align="center"> |
|
|
30 |
<img width="460" height="300" src="imgs/results_1.png"> |
|
|
31 |
</p> |
|
|
32 |
|
|
|
33 |
# Installation |
|
|
34 |
Running of the AI pipeline requires a GPU and several deep learning modules. However, you can run just the UI as well. |
|
|
35 |
|
|
|
36 |
## Just the UI |
|
|
37 |
### Requirements |
|
|
38 |
- `openslide` |
|
|
39 |
- `flask` |
|
|
40 |
|
|
|
41 |
The following command will install only the dependencies listed above. |
|
|
42 |
``` |
|
|
43 |
pip install DigiPathAI |
|
|
44 |
``` |
|
|
45 |
|
|
|
46 |
## Entire AI pipeline |
|
|
47 |
### Requirements |
|
|
48 |
- `pytorch` |
|
|
49 |
- `torchvision` |
|
|
50 |
- `opencv-python` |
|
|
51 |
- `imgaug` |
|
|
52 |
- `matplotlib` |
|
|
53 |
- `scikit-learn` |
|
|
54 |
- `scikit-image` |
|
|
55 |
- `tensorflow-gpu >=1.14,<2` |
|
|
56 |
- `pydensecrf` |
|
|
57 |
- `pandas` |
|
|
58 |
- `wget` |
|
|
59 |
|
|
|
60 |
The following command will install the dependencies mentioned |
|
|
61 |
``` |
|
|
62 |
pip install "DigiPathAI[gpu]" |
|
|
63 |
``` |
|
|
64 |
|
|
|
65 |
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. |
|
|
66 |
|
|
|
67 |
# Usage |
|
|
68 |
## Local server |
|
|
69 |
Traverse to the directory containing the openslide images and run the following command. |
|
|
70 |
``` |
|
|
71 |
digipathai <host: localhost (default)> <port: 8080 (default)> |
|
|
72 |
``` |
|
|
73 |
|
|
|
74 |
## Python API usage |
|
|
75 |
The application also has an API which can be used within python to perform the segmentation. |
|
|
76 |
``` |
|
|
77 |
from DigiPathAI.Segmentation import getSegmentation |
|
|
78 |
|
|
|
79 |
prediction = getSegmentation(img_path, |
|
|
80 |
patch_size = 256, |
|
|
81 |
stride_size = 128, |
|
|
82 |
batch_size = 32, |
|
|
83 |
quick = True, |
|
|
84 |
tta_list = None, |
|
|
85 |
crf = False, |
|
|
86 |
save_path = None, |
|
|
87 |
status = None) |
|
|
88 |
``` |
|
|
89 |
|
|
|
90 |
# Contact |
|
|
91 |
- Avinash Kori (koriavinash1@gmail.com) |
|
|
92 |
- Haran Rajkumar (haranrajkumar97@gmail.com) |
|
|
93 |
|
|
|
94 |
[](https://ko-fi.com/M4M132RPG) |
|
|
95 |
|