Spaces:
Sleeping
Sleeping
Added README
Browse files
README.md
CHANGED
@@ -1 +1,89 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: wsi-annotation-demo
|
3 |
+
emoji: 🔬
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: red
|
6 |
+
sdk: docker
|
7 |
+
sdk_version: "24.0.6"
|
8 |
+
app_file: Dockerfile
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
|
12 |
+
# wsi-annotation-demo
|
13 |
+
|
14 |
+
[![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/andreped/wsi-annotation-demo/blob/main/LICENSE.md)
|
15 |
+
<a target="_blank" href="https://huggingface.co/spaces/andreped/wsi-annotation-demo"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
|
16 |
+
|
17 |
+
## Why?
|
18 |
+
|
19 |
+
This repository was developed to demonstrate how to do the following:
|
20 |
+
* Creating a simple web application for rendering a whole slide image in real time.
|
21 |
+
* Allow annotating a whole slide image in real-time.
|
22 |
+
* Containerizing and deploying a web app for deployment on Hugging Face Spaces.
|
23 |
+
|
24 |
+
To access the live demo, click on the `Hugging Face` badge above. Below is a snapshot of the current state of the demo app.
|
25 |
+
|
26 |
+
<img width="1400" alt="demo-hf-spaces" src="X">
|
27 |
+
|
28 |
+
## Stack
|
29 |
+
|
30 |
+
For this demonstration, we have used the following:
|
31 |
+
|
32 |
+
| Component | Description |
|
33 |
+
| - | - |
|
34 |
+
| **OpenSeadragon** | The actual library for rendering the WSI |
|
35 |
+
| **Annotorious** | Library supporting annotation of large images |
|
36 |
+
| **Deep Zoom Image (DZI)** | Image file format compatible with OpenSeadragon |
|
37 |
+
| **npm** | Installation of frontend dependencies |
|
38 |
+
| **nginx** | HTTP web server |
|
39 |
+
| **Docker** | Containerization of the web app |
|
40 |
+
| **Hugging Face Spaces** | Deployment platform |
|
41 |
+
|
42 |
+
## Continuous integration
|
43 |
+
|
44 |
+
For this project, we continuously update the Hugging Face deployment for each commit to the main branch.
|
45 |
+
|
46 |
+
| Build Type | Status |
|
47 |
+
| - | - |
|
48 |
+
| **HF Space Deploy** | [![CI](https://github.com/andreped/wsi-annotation-demo/workflows/Deploy/badge.svg)](https://github.com/andreped/wsi-annotation-demo/actions) |
|
49 |
+
| **File Size Check** | [![CI](https://github.com/andreped/wsi-annotation-demo/workflows/Check%20file%20size/badge.svg)](https://github.com/andreped/wsi-annotation-demo/actions) |
|
50 |
+
|
51 |
+
## Local development
|
52 |
+
|
53 |
+
This example is for macOS development, so `brew` is required.
|
54 |
+
|
55 |
+
1. Install `node`:
|
56 |
+
```
|
57 |
+
brew install node
|
58 |
+
```
|
59 |
+
|
60 |
+
2. Install deps:
|
61 |
+
```
|
62 |
+
npm install
|
63 |
+
```
|
64 |
+
|
65 |
+
3. Open in browser:
|
66 |
+
```
|
67 |
+
open index.html
|
68 |
+
```
|
69 |
+
|
70 |
+
## Docker
|
71 |
+
|
72 |
+
1. Build image:
|
73 |
+
```
|
74 |
+
docker build -t wsi-annotation .
|
75 |
+
```
|
76 |
+
|
77 |
+
2. Run image:
|
78 |
+
```
|
79 |
+
docker run -p 7860:7860 wsi-annotation
|
80 |
+
```
|
81 |
+
|
82 |
+
3. Open in browser:
|
83 |
+
```
|
84 |
+
open http://localhost:7860
|
85 |
+
```
|
86 |
+
|
87 |
+
## License
|
88 |
+
|
89 |
+
This project has MIT License.
|