-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathheatmap_cfgs.yaml
93 lines (89 loc) · 4.31 KB
/
heatmap_cfgs.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# CUDA_VISIBLE_DEVICES=0,1 python create_heatmaps.py --config config_template.yaml
exp_arguments:
# number of classes
n_classes: 2
# name tag for saving generated figures and assets
save_exp_code: HEATMAP_OUTPUT_scorer
# where to save raw asset files
raw_save_dir: /home/cyyan/Projects/HER2proj/results/Yale_4Heatmaps_PhiHER2_yhat/heatmap_raw
# where to save final heatmaps
production_save_dir: /home/cyyan/Projects/HER2proj/results/Yale_4Heatmaps_PhiHER2_yhat/heatmap_production_hd
batch_size: 384
data_arguments:
# where is data stored; can be a single str path or a dictionary of key, data_dir mapping
# data_dir: "/home/cyyan/Projects/HER2proj/data_ModPath_HER2_v3/pkg_v3/Yale_HER2_cohort/SVS"
data_dir: /home/cyyan/Projects/HER2proj/data_ModPath_HER2_v3/pkg_v3/Yale_HER2_cohort/SVS
spec_slide: /home/cyyan/Projects/HER2proj/results/Yale_3CaseSplits/her2status_KFoldsCV/splits_time0_fold1.csv #['Her2Neg_Case_09.svs', 'Her2Pos_Case_06.svs']
# spec_slide: /mnt/DATA/HEROHE_challenge/HEROHE_TestGTinfo.csv
# spec_slide: ['73.mrxs', '122.mrxs', '125.mrxs', '253.mrxs', '260.mrxs', '262.mrxs']
# column name for key in data_dir (if a dict mapping is used)
data_dir_key: source
# csv list containing slide_ids (can additionally have seg/patch paramters, class labels, etc.)
process_list:
# preset file for segmentation/patching
preset:
# file extention for slides
slide_ext: .svs
# label dictionary for str: interger mapping (optional)
label_dict: {"Negative": 0, "Positive": 1}
patching_arguments:
# arguments for patching
patch_size: [256, 256]
overlap: 0.5 # heatmap overlapping rate
patch_level: 0
custom_downsample: 1
model_arguments:
# arguments for initializing model from checkpoint
# ckpt_path: /home/cyyan/Projects/HER2proj/models/Yale/HER2status/ABMIL_insttop2000_0dropout_lossCE_1WSampling/time0/s_3_checkpoint.pt
# ckpt_path: "/home/cyyan/Projects/HER2proj/models/HEROHE/HER2status/new_ABMIL_tile5k_all/time0/s_0_checkpoint.pt"
ckpt_path: "/home/cyyan/Projects/HER2proj/models/Yale/HER2status/new_PhiHER2_tileAll_twice1000_0abmil_0sel/time0/s_1_checkpoint.pt"
cluster_path: "/home/cyyan/Projects/HER2proj/results/Yale_4APCluster_rmPos73/time_0_fold_1_prototypes.pt"
model_type: PhiHER2 #ABMIL see utils/eval_utils/
initiate_fn: initiate_model # see utils/eval_utils/
model_size: ccl2048
drop_out: false
retccl_filepath: "/home/cyyan/Projects/HER2proj/models/CCL_best_ckpt.pth"
heatmap_arguments:
# downsample at which to visualize heatmap (-1 refers to downsample closest to 32x downsample)
vis_level: 1
# transparency for overlaying heatmap on background (0: background only, 1: foreground only)
alpha: 0.4
# whether to use a blank canvas instead of original slide
blank_canvas: false
# whether to also save the original H&E image
save_orig: false
# file extension for saving heatmap/original image
save_ext: png
# whether to calculate percentile scores in reference to the set of non-overlapping patches
use_ref_scores: false
# whether to use gaussian blur for further smoothing
blur: false
# whether to shift the 4 default corner points for checking if a patch is inside a foreground contour
use_center_shift: true
# whether to only compute heatmap for ROI specified by x1, x2, y1, y2
use_roi: false
# whether to calculate heatmap with specified overlap (by default, coarse heatmap without overlap is always calculated)
calc_heatmap: true
# whether to binarize attention scores
binarize: false
# binarization threshold: (0, 1)
binary_thresh: -1
# factor for downscaling the heatmap before final dispaly
custom_downsample: 1
cmap: jet
sample_arguments:
samples:
- name: "topk_high_attention"
sample: true
seed: 1
k: 15 # save top-k patches
mode: topk
s7_clusterPatternVis arguments:
# path of the visualization outputs
interactive_vis_dir: /home/cyyan/Projects/HER2proj/results/Yale_4Heatmaps_PhiHER2_yhat/Interactive_vis_tiles
# See tiles corresponding to a particular value of the target variable. Coincide with the names of the folders in path/hightiles/'
vis_target_val:
# when tagged, use the decision embeddings (related to the target variable).
vis_decision_emb: true
# If tagged, tiles will be clustered. If not, color of the points corresponds to the decision score(tiles logits)
vis_cluster: true