andreped commited on
Commit
241ef3e
1 Parent(s): c26cae9

Added HF space deployment

Browse files
Files changed (2) hide show
  1. .github/workflows/deploy.yml +20 -0
  2. README.md +108 -1
.github/workflows/deploy.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy
2
+ on:
3
+ push:
4
+ branches: [ main ]
5
+
6
+ # to run this workflow manually from the Actions tab
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ sync-to-hub:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ with:
15
+ fetch-depth: 0
16
+ lfs: true
17
+ - name: Push to hub
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ run: git push https://andreped:$HF_TOKEN@huggingface.co/spaces/andreped/AeroPath main
README.md CHANGED
@@ -1 +1,108 @@
1
- #AeroPath
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: 'AeroPath: automatic airway segmentation using deep learning'
3
+ colorFrom: indigo
4
+ colorTo: indigo
5
+ sdk: docker
6
+ app_port: 7860
7
+ emoji: 🧠
8
+ pinned: false
9
+ license: mit
10
+ app_file: app.py
11
+ ---
12
+
13
+ <div align="center">
14
+ <h1 align="center">AeroPath</h1>
15
+ <h3 align="center">automatic airway segmentation using deep learning</h3>
16
+
17
+ [![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE)
18
+ [![CI/CD](https://github.com/raidionics/AeroPath/actions/workflows/deploy.yml/badge.svg)](https://github.com/raidionics/AeroPath/actions/workflows/deploy.yml)
19
+ <a target="_blank" href="https://huggingface.co/spaces/andreped/AeroPath"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
20
+
21
+ **AeroPath** was developed by SINTEF Medical Image Analysis to accelerate medical AI research.
22
+
23
+ </div>
24
+
25
+ ## Brief intro
26
+
27
+ This web application enables users to easily test our deep learning model for airway segmentation in CTs. The plugin is built on top of gradio using the same backend as used for the [Raidionics](https://raidionics.github.io/) software. Raidionics is an open-source, free-to-use desktop application for pre- and postoperative central nervous system tumor segmentation and standardized reporting, but the same core backend principles can easily be adapted to other applications, as demonstrated in this repository.
28
+
29
+ ## Demo <a target="_blank" href="https://huggingface.co/spaces/andreped/AeroPath"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
30
+
31
+ To access the live demo, click on the `Hugging Face` badge above. Below is a snapshot of the current state of the demo app.
32
+
33
+ <img width="1722" alt="Screenshot 2023-06-06 at 21 53 25" src="https://github.com/andreped/AeroPath/assets/29090665/e67f35c2-482b-409c-b1a9-bc987fbb5c6a">
34
+
35
+ ## Development
36
+
37
+ ### Docker
38
+
39
+ Alternatively, you can deploy the software locally. Note that this is only relevant for development purposes. Simply dockerize the app and run it:
40
+
41
+ ```
42
+ docker build -t AeroPath .
43
+ docker run -it -p 7860:7860 AeroPath
44
+ ```
45
+
46
+ Then open `http://127.0.0.1:7860` in your favourite internet browser to view the demo.
47
+
48
+ ### Python
49
+
50
+ It is also possible to run the app locally without Docker. Just setup a virtual environment and run the app.
51
+ Note that the current working directory would need to be adjusted based on where `AeroPath` is located on disk.
52
+
53
+ ```
54
+ git clone https://github.com/andreped/AeroPath.git
55
+ cd AeroPath/
56
+
57
+ virtualenv -ppython3 venv --clear
58
+ source venv/bin/activate
59
+ pip install -r requirements.txt
60
+
61
+ python app.py --cwd ./
62
+ ```
63
+
64
+ ### CoLab
65
+
66
+ To aid people developing in the cloud, we have made a simple Jupyter Notebook example which is hosted on Google CoLab.
67
+
68
+ Click the badge above to access it. This is mainly of interest to developers.
69
+
70
+ ## Troubleshooting
71
+
72
+ Due to `share=True` being enabled by default when launching the app,
73
+ internet access is required for the app to be launched. This can disabled by setting
74
+ the argument to `--share 0`.
75
+
76
+ ## Citation
77
+
78
+ ## [How to cite](https://github.com/raidionics/Raidionics#how-to-cite)
79
+
80
+ If you found this tool relevant in your research, please cite the following references enabling the backend compute magic.
81
+
82
+ The final software including updated performance metrics for preoperative tumors and introducing postoperative tumor segmentation:
83
+ ```
84
+ @article{bouget2023raidionics,
85
+ author = {Bouget, David and Alsinan, Demah and Gaitan, Valeria and Holden Helland, Ragnhild and Pedersen, André and Solheim, Ole and Reinertsen, Ingerid},
86
+ year = {2023},
87
+ month = {09},
88
+ pages = {},
89
+ title = {Raidionics: an open software for pre-and postoperative central nervous system tumor segmentation and standardized reporting},
90
+ volume = {13},
91
+ journal = {Scientific Reports},
92
+ doi = {10.1038/s41598-023-42048-7},
93
+ }
94
+ ```
95
+
96
+ For the preliminary preoperative tumor segmentation validation and software features:
97
+ ```
98
+ @article{bouget2022preoptumorseg,
99
+ title={Preoperative Brain Tumor Imaging: Models and Software for Segmentation and Standardized Reporting},
100
+ author={Bouget, David and Pedersen, André and Jakola, Asgeir S. and Kavouridis, Vasileios and Emblem, Kyrre E. and Eijgelaar, Roelant S. and Kommers, Ivar and Ardon, Hilko and Barkhof, Frederik and Bello, Lorenzo and Berger, Mitchel S. and Conti Nibali, Marco and Furtner, Julia and Hervey-Jumper, Shawn and Idema, Albert J. S. and Kiesel, Barbara and Kloet, Alfred and Mandonnet, Emmanuel and Müller, Domenique M. J. and Robe, Pierre A. and Rossi, Marco and Sciortino, Tommaso and Van den Brink, Wimar A. and Wagemakers, Michiel and Widhalm, Georg and Witte, Marnix G. and Zwinderman, Aeilko H. and De Witt Hamer, Philip C. and Solheim, Ole and Reinertsen, Ingerid},
101
+ journal={Frontiers in Neurology},
102
+ volume={13},
103
+ year={2022},
104
+ url={https://www.frontiersin.org/articles/10.3389/fneur.2022.932219},
105
+ doi={10.3389/fneur.2022.932219},
106
+ issn={1664-2295}
107
+ }
108
+ ```