Extract slide-level embeddings from whole-slide images using PRISM.
PRISM Embedder is a containerized algorithm for computing slide-level representations from whole-slide images using PRISM.
⚠️ Access Required
This algorithm depends on the gated models PRISM and Virchow.
You need to have requested and been granted access to both models on Hugging Face.
Requirements:
- Linux-based OS (e.g., Ubuntu 22.04)
- Python 3.10+
- Docker installed
git clone https://github.com/clemsgrs/prism-embedder.git
cd prism-embedderDownload the required model weights:
./download_weights.shReplace
</path/to/your/slide.tif>and</path/to/your/mask.tif>with your actual file paths.
Replace</path/to/your/output/folder>with the path to a folder where you have write access.
docker pull waticlems/prism_embedder:latest
docker run --rm -it \
-v </path/to/your/slide.tif>:/input/images/whole-slide-image/slide.tif:ro \
-v </path/to/your/mask.tif>:/input/images/tissue-mask/mask.tif:ro \
-v model:/opt/ml/model
-v </path/to/your/output/folder>:/output \
waticlems/prism_embedder:latestUpon execution, the following files will be saved in /output:
image-neural-representation.json: 1280-dimensional slide-level embedding (JSON)whole-slide-tiling-thumbnail.png: PNG image showing the tissue tiling layout
- add tSNE plot
- improve CLI customization (e.g., for spacing, resolution)
