-
Notifications
You must be signed in to change notification settings - Fork 23
/
config.yaml
49 lines (44 loc) · 2.98 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Main configuration file for STAMP.
#
# NOTE: you may use environment variables in this file, e.g. ${oc.env:STAMP_RESOURCES_DIR}.
# The STAMP_RESOURCES_DIR environment variable is a special environment variable that, if not set, will be set to the resources/ directory relative to where STAMP is installed.
# Only use absolute paths!
preprocessing:
output_dir: # Path to save features to
wsi_dir: # Path of where the whole-slide images are.
cache_dir: # Directory to store intermediate slide JPGs
microns: 256 # Edge length in microns for each patch (default is 256, with pixel size 224, 256/224 = ~1.14MPP = ~9x magnification)
norm: false # Perform Macenko normalisation
feat_extractor: ctp # Use ctp for CTransPath (default) or uni for UNI (requires prior authentication)
del_slide: false # Remove the original slide after processing
cache: true # Save intermediate images (slide, background rejected, normalized)
only_feature_extraction: false # Only perform feature extraction (intermediate images (background rejected, [normalized]) have to exist)
cores: 8 # CPU cores to use
device: cuda:0 # device to run feature extraction on (cpu, cuda, cuda:0, etc.)
modeling:
clini_table: # Path to clini_table file (.xlsx or .csv)
slide_table: # Path to slide_table file (.xlsx or .csv)
feature_dir: ${preprocessing.output_dir}/STAMP_macenko_xiyuewang-ctranspath-7c998680 # Path to feature directory
output_dir: # Path to output directory
target_label: # Target label. No spaces allowed! Format clinical table accordingly
categories: [] # Categories (list), leave empty to automatically infer based on unique values in the target_label column
cat_labels: [] # Extra input category labels (list, can be empty)
cont_labels: [] # Extra input continuous labels (list, can be empty)
n_splits: 5 # Number of splits for cross-validation (only applicable to cross-validation)
model_path: /path/to/export.pkl # Path to saved model (only applicable to deployment)
deploy_feature_dir: # Path to directory containing the external cohort features (only applicable to deployment)
statistics:
pred_csvs: # Paths to prediction CSVs to plot ROC curves for
- path/to/patient-preds.csv # only need 1 path when fully training (remove second one)
- another/path/to/patient-preds.csv # for cross-validation, you will have fold-0, fold-1, fold-k, add below
target_label: ${modeling.target_label} # Target label
true_class: # Class to consider as positive
output_dir: /path/to/store/model_statistics # Path to save ROC curve and statistics to
heatmaps:
slide_name: # Name of the slide to create heatmaps for, wildcards allowed, no file extensions
feature_dir: ${preprocessing.output_dir} # Path to feature directory
wsi_dir: # Path to whole-slide image directory.
model_path: /path/to/export.pkl # Path to saved model (only applicable to deployment)
output_dir: # Path to output directory
n_toptiles: 8 # Number of toptiles, default is 8
overview: true # Create final overview image