Skip to main content

Embedding of whole slide images with Foundation Models

Project description

slide2vec

:warning: Make sure to run the following:

export PYTHONPATH="${PYTHONPATH}:/path/to/slide2vec"
export HF_TOKEN=<your-huggingface-api-token>

Extract features

  1. Create a .csv file 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
    ...
    
  2. Create a configuration file

    A good starting point is the default configuration file slide2vec/configs/default.yaml where 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
  3. Kick off distributed feature extraction

    python3 slide2vec/main.py --config-file </path/to/config.yaml>
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slide2vec-1.1.0.tar.gz (39.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slide2vec-1.1.0-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

Details for the file slide2vec-1.1.0.tar.gz.

File metadata

  • Download URL: slide2vec-1.1.0.tar.gz
  • Upload date:
  • Size: 39.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for slide2vec-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d7e7e5ef02aef36f9b0817931a52944899b74c6c780ed98674d3a4727bfdde50
MD5 ef9a89f005be95fe6e24c4cbb06184a2
BLAKE2b-256 1868b357bad596d0c256da2711a177e5b768e3a59e2b3b01da2755c30e0062a6

See more details on using hashes here.

File details

Details for the file slide2vec-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: slide2vec-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for slide2vec-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 234a91c1527dbc335c2c8514d6745f27defc430e48a952311c256a9b56969f06
MD5 c58bd600092ba0d52bff51de046b8c6e
BLAKE2b-256 424e2c822014b8afc852090bdc131e4d6258b3678380faeb3befa4ab02a90171

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page