Embedding of whole slide images with Foundation Models
Project description
slide2vec
🛠️ Installation
System requirements: Linux-based OS (e.g., Ubuntu 22.04) with Python 3.10+ and Docker installed.
We recommend running the script inside a container using the latest slide2vec image from Docker Hub:
docker pull waticlems/slide2vec:latest
docker run --rm -it \
-v /path/to/your/data:/data \
-e HF_TOKEN=<your-huggingface-api-token> \
waticlems/slide2vec:latest
Replace /path/to/your/data with your local data directory.
Alternatively, you can install slide2vec via pip:
pip install slide2vec
🚀 Extract features
-
Create a
.csvfile with slide paths. Optionally, you can provide paths to pre-computed tissue masks.wsi_path,mask_path /path/to/slide1.tif,/path/to/mask1.tif /path/to/slide2.tif,/path/to/mask2.tif ...
-
Create a configuration file
A good starting point is the default configuration file
slide2vec/configs/default.yamlwhere parameters are documented.
We've also added default configuration files for each of the foundation models currently supported:- tile-level:
uni,uni2,virchow,virchow2,prov-gigapath,h-optimus-0,h-optimus-1 - slide-level:
prov-gigapath,titan,prism
- tile-level:
-
Kick off distributed feature extraction
python3 -m slide2vec.main --config-file </path/to/config.yaml>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slide2vec-1.2.2.tar.gz.
File metadata
- Download URL: slide2vec-1.2.2.tar.gz
- Upload date:
- Size: 50.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
799f5dfd8d143bee336d5052b6308cc746a076f32dbdb815c65b0c302fa2382e
|
|
| MD5 |
7ea07e2e236b501a684d4b93dc4cf5dc
|
|
| BLAKE2b-256 |
fb692875d16f5aeb879ee41221e20ba70609c32248c9e8c40a5c63f8991999b9
|
File details
Details for the file slide2vec-1.2.2-py3-none-any.whl.
File metadata
- Download URL: slide2vec-1.2.2-py3-none-any.whl
- Upload date:
- Size: 58.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e5213c877d457b7c60f0ded91262068b381d490986ea02ec409458c47bbd196
|
|
| MD5 |
8f70251157c8ef17898042e043d0c038
|
|
| BLAKE2b-256 |
15c85069e818f585ddeced797375abdb9add1f453df96e119527f0da8680b8ea
|