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
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)
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 for updates.