diff --git a/pyproject.toml b/pyproject.toml index 047bfca..4f61e34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ warn_unused_configs = true no_implicit_reexport = true [tool.bumpver] -current_version = "1.3.0" +current_version = "1.4.0" version_pattern = "MAJOR.MINOR.PATCH" commit = false # We do version bumping in CI, not as a commit tag = false # Git tag already exists — we don't auto-tag diff --git a/setup.cfg b/setup.cfg index ea8eefb..858067b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = slide2vec -version = 1.3.0 +version = 1.4.0 description = Embedding of whole slide images with Foundation Models author = Clément Grisi platforms = unix, linux, osx, cygwin, win32 diff --git a/slide2vec/__init__.py b/slide2vec/__init__.py index 67bc602..3e8d9f9 100644 --- a/slide2vec/__init__.py +++ b/slide2vec/__init__.py @@ -1 +1 @@ -__version__ = "1.3.0" +__version__ = "1.4.0" diff --git a/slide2vec/configs/conch.yaml b/slide2vec/configs/conch.yaml index 79ca8ca..e5f0bcf 100644 --- a/slide2vec/configs/conch.yaml +++ b/slide2vec/configs/conch.yaml @@ -1,4 +1,4 @@ -csv: # path to csv containing slide paths +csv: "/data/temporary/clement/notebooks/discern/prostate-bladder-breast-debug.csv" # path to csv containing slide paths output_dir: "output" # output directory @@ -15,4 +15,11 @@ model: batch_size: 1 speed: - fp16: true # use mixed precision during model inference \ No newline at end of file + fp16: true # use mixed precision during model inference + +wandb: + enable: true + project: "discern" + username: "clemsg" + exp_name: "features" + tags: ["features", "${model.name}", "${model.level}", "${tiling.params.tile_size}"] diff --git a/slide2vec/configs/default.yaml b/slide2vec/configs/default.yaml index 35acec7..0b772d2 100644 --- a/slide2vec/configs/default.yaml +++ b/slide2vec/configs/default.yaml @@ -41,7 +41,7 @@ model: mode: "cls" # embedding mode ["cls", "full"] arch: # architecture of custom model pretrained_weights: # path to the pretrained weights when using a custom model - batch_size: 1 + batch_size: 256 tile_size: ${tiling.params.tile_size} patch_size: 256 # if level is "region", size used to unroll the region into patches save_tile_embeddings: false # whether to save tile embeddings alongside the pooled slide embedding when level is "slide" diff --git a/slide2vec/configs/virchow2.yaml b/slide2vec/configs/virchow2.yaml index f8b96fb..41f1057 100644 --- a/slide2vec/configs/virchow2.yaml +++ b/slide2vec/configs/virchow2.yaml @@ -1,9 +1,9 @@ # csv: "/data/temporary/clement/dataset/tcga-prad/mutations/tcga-prad-tp53-slide2vec.csv" # csv: "/data/temporary/clement/dataset/tcga-blca/mutations/tcga-blca-tp53-slide2vec.csv" # csv: "/data/temporary/clement/dataset/tcga-brca/mutations/tcga-brca-tp53-slide2vec.csv" -csv: "/data/temporary/clement/leopard/csvs/dev-slide2vec.csv" +csv: "/data/temporary/clement/leopard/csvs/brazil-slide2vec-august-2025-revision.csv" -output_dir: "output" +output_dir: "/data/temporary/clement/code/slide2vec/output" visualize: true @@ -11,14 +11,11 @@ tiling: # read_coordinates_from: "/data/temporary/clement/code/slide2vec/output/vjh3hrr6/coordinates" params: spacing: 0.5 # spacing at which to tile the slide, in microns per pixel - # tolerance: 0.07 # tolerance for matching the spacing (float between 0 and 1, deciding how much the spacing can deviate from the one specified in the slide metadata) tolerance: 0.05 # tolerance for matching the spacing (float between 0 and 1, deciding how much the spacing can deviate from the one specified in the slide metadata) tile_size: 2048 # size of the tiles to extract, in pixels - # min_tissue_percentage: 0.1 # threshold used to filter out tiles that have less tissue than this value (percentage) - min_tissue_percentage: 0.01 # threshold used to filter out tiles that have less tissue than this value (percentage) + min_tissue_percentage: 0.1 # threshold used to filter out tiles that have less tissue than this value (percentage) filter_params: - # ref_tile_size: 224 - ref_tile_size: 16 + ref_tile_size: 256 model: level: "region" @@ -29,10 +26,10 @@ speed: fp16: true wandb: - enable: false - project: "mut-pred" + enable: true + project: "leopard" username: "clemsg" exp_name: "features" - tags: ["features", "tcga-prad", "${model.name}", "${model.level}", "${tiling.params.tile_size}"] + tags: ["features", "brazil", "${model.name}", "${model.level}", "${tiling.params.tile_size}"] # tags: ["features", "tcga-blca", "${model.name}", "${model.level}", "${tiling.params.tile_size}"] - # tags: ["features", "tcga-brca", "${model.name}", "${model.level}", "${tiling.params.tile_size}"] \ No newline at end of file + # tags: ["features", "tcga-brca", "${model.name}", "${model.level}", "${tiling.params.tile_size}"]