Bundle inference code, update quick start
Browse files
README.md
CHANGED
|
@@ -53,16 +53,26 @@ For context: the original course leaderboard had 28 teams. This release would pl
|
|
| 53 |
|
| 54 |
## Quick start
|
| 55 |
|
| 56 |
-
The
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
```bash
|
| 63 |
-
|
|
|
|
|
|
|
| 64 |
```
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
## What is in this repo
|
| 67 |
|
| 68 |
Two sets of five fold checkpoints plus a tiny threshold model:
|
|
|
|
| 53 |
|
| 54 |
## Quick start
|
| 55 |
|
| 56 |
+
The two essential inference scripts (`predict_ensemble.py` and `train_global_unet.py`) ship inside this repo along with the weights, so the model is runnable without any external code.
|
| 57 |
|
| 58 |
+
```bash
|
| 59 |
+
hf download Enorenio/scribble-segmentation --local-dir release
|
| 60 |
+
cd release
|
| 61 |
+
pip install torch numpy pillow opencv-python scipy
|
| 62 |
+
```
|
| 63 |
|
| 64 |
+
Inference expects images at `dataset/test1/images/*.jpg` and matching scribbles at `dataset/test1/scribbles/*.png` (values 0=bg, 1=fg, 255=unlabeled). It also needs a reference palette file at `dataset/train/ground_truth/<any>.png` to colorize the output (any PASCAL VOC palette PNG works).
|
| 65 |
|
| 66 |
```bash
|
| 67 |
+
python predict_ensemble.py \
|
| 68 |
+
--ckpt-dirs runs_v4:64:44 runs_v7_pseudo:64:47 \
|
| 69 |
+
--gpu 0
|
| 70 |
```
|
| 71 |
|
| 72 |
+
Predictions land at `dataset/test1/predictions/*.png`.
|
| 73 |
+
|
| 74 |
+
The interactive demo at https://enorenio.github.io/scribble-seg-demo/ shows side by side predictions for every method on all 682 train and test images, plus an analysis of the five universally hardest cases.
|
| 75 |
+
|
| 76 |
## What is in this repo
|
| 77 |
|
| 78 |
Two sets of five fold checkpoints plus a tiny threshold model:
|