Image Segmentation
Keras
ONNX
English
tensorflow
medical-imaging
segmentation
in-context-learning
interactive-segmentation
ct
mri
Instructions to use machauer-p/lisp-net with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use machauer-p/lisp-net with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://machauer-p/lisp-net") - Notebooks
- Google Colab
- Kaggle
File size: 2,333 Bytes
1314508 6fd4c29 1314508 6fd4c29 1314508 6fd4c29 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | ---
language: en
license: mit
tags:
- medical-imaging
- segmentation
- in-context-learning
- interactive-segmentation
- tensorflow
- keras
- ct
- mri
- onnx
library_name: tensorflow
pipeline_tag: image-segmentation
---
# LISP-Net — Lightweight In-Context Slice Propagator Network
LISP-Net is a lightweight, purely convolutional framework for interactive volumetric medical image segmentation. Instead of sparse clicks, it uses a single dense 2D prompt — a reference image paired with a full mask — to derive structural guidance directly from the individual patient.
## Model Details
- **Architecture:** Asymmetrical dual-encoder U-Net with multi-resolution SE channel-attention
- **Parameters:** ~28M
- **Input:** Query image (128×128) + Prompt (reference image + binary mask, stacked as 2 channels)
- **Output:** Binary segmentation probability map (128×128)
- **Training data:** 208 patients across 7 datasets (NAKO, TotalSegmentator, MSD, BraTS-GLI, BraTS-MEN-RT, TopCoW MR, TopCoW CT)
## Performance
| Benchmark | vs. | Result |
|-----------|-----|--------|
| 2D (offset ±5) | UniverSeg | 0.798 vs. 0.597 DSC |
| 2D (offset ±12) | UniverSeg | 0.704 vs. 0.569 DSC |
| 3D (SSF only) | nnInteractive | 0.665 vs. 0.705 Vol. DSC |
| 3D (interactive) | nnInteractive | 0.879 vs. 0.810 Vol. DSC |
Peak GPU memory: 164–362 MB. Per-slice latency: ~14 ms (GPU) / ~150 ms (CPU).
## Usage
### Python (Keras)
```python
from inference.predictor import PromptUNetPredictor
# Downloads from Hugging Face automatically on first use
predictor = PromptUNetPredictor("Machauer-P/lisp-net")
mask = predictor.predict(query_image, prompt)
```
### ONNX (Browser / ONNX Runtime)
Download `lisp_net_332.onnx` and use with ONNX Runtime or integrate into a web application.
## Intended Use
- Interactive volumetric segmentation of CT and MRI
- Zero-shot generalization to novel anatomical targets without retraining
- Clinical research and annotation workflows
## Limitations
- Requires a full 2D dense annotation as initial prompt (higher upfront effort than sparse clicks)
- Optimized for medium-range propagation (offset ≤16 slices); distant slices may need prompt refreshes
## License
MIT
## Citation
Paper forthcoming. See [Machauer-P/lisp-net](https://github.com/Machauer-P/lisp-net) for updates.
|