Sync install section with voxtell 0.1.2 on PyPI
#3
by MoritzLangenberg - opened
README.md
CHANGED
|
@@ -96,21 +96,27 @@ conda activate voxtell
|
|
| 96 |
|
| 97 |
### 2. Install PyTorch
|
| 98 |
|
| 99 |
-
> [!WARNING]
|
| 100 |
-
> **Temporary Compatibility Warning**
|
| 101 |
-
> There is a known issue with **PyTorch 2.9.0** causing **OOM errors during inference** (related to 3D convolutions — see the PyTorch issue [here](https://github.com/pytorch/pytorch/issues/166122)).
|
| 102 |
-
> **Until this is resolved, please use PyTorch 2.8.0 or earlier.**
|
| 103 |
-
|
| 104 |
Install PyTorch compatible with your CUDA version. For example, for Ubuntu with a modern NVIDIA GPU:
|
| 105 |
|
| 106 |
```bash
|
| 107 |
-
pip install torch
|
| 108 |
```
|
| 109 |
|
|
|
|
|
|
|
|
|
|
| 110 |
*For other configurations (macOS, CPU, different CUDA versions), please refer to the [PyTorch Get Started](https://pytorch.org/get-started/previous-versions/) page.*
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
```bash
|
| 116 |
pip install git+https://github.com/MIC-DKFZ/VoxTell.git
|
|
@@ -191,10 +197,11 @@ voxtell-predict -i case001.nii.gz -o output_folder -p "liver" "spleen" --save-co
|
|
| 191 |
|
| 192 |
| Argument | Short | Required | Description |
|
| 193 |
|----------|-------|----------|-------------|
|
| 194 |
-
| `--input` | `-i` | Yes
|
| 195 |
| `--output` | `-o` | Yes | Path to output folder |
|
| 196 |
| `--model` | `-m` | No | Path to a local model directory. If omitted, uses `VOXTELL_MODEL` or downloads the default model (`voxtell_v1.1`) from Hugging Face |
|
| 197 |
-
| `--prompts` | `-p` | Yes | Text prompt(s) for segmentation |
|
|
|
|
| 198 |
| `--device` | | No | Device to use: `cuda` (default) or `cpu` |
|
| 199 |
| `--gpu` | | No | GPU device ID (default: 0) |
|
| 200 |
| `--save-combined` | | No | Save multi-label file instead of individual files |
|
|
@@ -374,6 +381,28 @@ for i, prompt in enumerate(text_prompts):
|
|
| 374 |
napari.run()
|
| 375 |
```
|
| 376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
## 🎯 Fine-Tuning
|
| 378 |
|
| 379 |
Transfer VoxTell's pretrained image **encoder** into nnU-Net and fine-tune it for
|
|
|
|
| 96 |
|
| 97 |
### 2. Install PyTorch
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
Install PyTorch compatible with your CUDA version. For example, for Ubuntu with a modern NVIDIA GPU:
|
| 100 |
|
| 101 |
```bash
|
| 102 |
+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
|
| 103 |
```
|
| 104 |
|
| 105 |
+
Any PyTorch >= 2.1.2 works except the 2.9.x series, which has a 3D-convolution memory
|
| 106 |
+
regression (also excluded by nnU-Net).
|
| 107 |
+
|
| 108 |
*For other configurations (macOS, CPU, different CUDA versions), please refer to the [PyTorch Get Started](https://pytorch.org/get-started/previous-versions/) page.*
|
| 109 |
|
| 110 |
+
### 3. Install VoxTell
|
| 111 |
+
|
| 112 |
+
Install the latest release from PyPI (you can also use [uv](https://docs.astral.sh/uv/)):
|
| 113 |
+
|
| 114 |
+
```bash
|
| 115 |
+
pip install voxtell
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
For the development version (the `main` branch, which may contain unreleased changes), install
|
| 119 |
+
directly from GitHub:
|
| 120 |
|
| 121 |
```bash
|
| 122 |
pip install git+https://github.com/MIC-DKFZ/VoxTell.git
|
|
|
|
| 197 |
|
| 198 |
| Argument | Short | Required | Description |
|
| 199 |
|----------|-------|----------|-------------|
|
| 200 |
+
| `--input` | `-i` | Yes (unless `--jobs`) | Input NIfTI file(s), or a single folder of NIfTI files |
|
| 201 |
| `--output` | `-o` | Yes | Path to output folder |
|
| 202 |
| `--model` | `-m` | No | Path to a local model directory. If omitted, uses `VOXTELL_MODEL` or downloads the default model (`voxtell_v1.1`) from Hugging Face |
|
| 203 |
+
| `--prompts` | `-p` | Yes (unless `--jobs`) | Text prompt(s) for segmentation, applied to every input image |
|
| 204 |
+
| `--jobs` | | No | Per-image prompts instead of `-i`/`-p`: a `.json` file or inline JSON list of `{"image": ..., "prompts": [...]}` |
|
| 205 |
| `--device` | | No | Device to use: `cuda` (default) or `cpu` |
|
| 206 |
| `--gpu` | | No | GPU device ID (default: 0) |
|
| 207 |
| `--save-combined` | | No | Save multi-label file instead of individual files |
|
|
|
|
| 381 |
napari.run()
|
| 382 |
```
|
| 383 |
|
| 384 |
+
## 🌐 Remote Inference Server
|
| 385 |
+
|
| 386 |
+
Run VoxTell as an HTTP server so a lightweight client (e.g. the
|
| 387 |
+
[napari-voxtell](https://github.com/MIC-DKFZ/napari-voxtell) plugin on a laptop) can drive
|
| 388 |
+
inference on a remote GPU machine. The client uploads a NIfTI once; the server reorients it,
|
| 389 |
+
runs sliding-window inference, streams per-patch progress, and returns the masks.
|
| 390 |
+
|
| 391 |
+
```bash
|
| 392 |
+
pip install "voxtell[server]"
|
| 393 |
+
|
| 394 |
+
# Bind to localhost (reach it over an SSH tunnel) - safe default for a single user
|
| 395 |
+
voxtell-server --host 127.0.0.1 --port 1527
|
| 396 |
+
|
| 397 |
+
# ...or expose it on a trusted LAN behind a static bearer token
|
| 398 |
+
voxtell-server --host 0.0.0.0 --port 1527 --api-key "$VOXTELL_API_KEY"
|
| 399 |
+
```
|
| 400 |
+
|
| 401 |
+
Model resolution matches `voxtell-predict` (`-m/--model` → `$VOXTELL_MODEL` → Hugging Face
|
| 402 |
+
download). From a laptop, forward the port with `ssh -N -L 1527:127.0.0.1:1527 workstation`
|
| 403 |
+
and point the client at `http://127.0.0.1:1527`. The client/server design is inspired by
|
| 404 |
+
MIC-DKFZ's [nnInteractive](https://github.com/MIC-DKFZ/nnInteractive) (Apache-2.0).
|
| 405 |
+
|
| 406 |
## 🎯 Fine-Tuning
|
| 407 |
|
| 408 |
Transfer VoxTell's pretrained image **encoder** into nnU-Net and fine-tune it for
|