[4df946]: / utils / config.py

Download this file

26 lines (24 with data), 950 Bytes

 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
import os
INFERENCE_GPUS = [8]
CENTER_SIZE = 2000 # The effective patch size.
BORDER_SIZE = 100 # The boarder size containing surrounding information.
PATCH_SIZE = CENTER_SIZE + 2 * BORDER_SIZE
format_mapping = {
'tif': 'OpenSlide',
'svs': 'OpenSlide',
'ndpi': 'OpenSlide',
'scn': 'OpenSlide',
'mrxs': 'OpenSlide',
'bif': 'OpenSlide',
'vms': 'OpenSlide',
}
MODEL_NAME = 'stomach'
INPUT_KEY = 'output'
PREDICT_KEY = 'output'
TF_SERVING_HOST = os.environ.get('TF_SERVING_HOST', '127.0.0.1')
TF_SERVING_PORT = int(os.environ.get('TF_SERVING_PORT', 9000))
TEMP_DIR = './temp/' # Where to save the predicted patches.
THUMBNAIL_RATIO = 10 # Down-sample ratio from the predictions to the thumbnail.
KEEP_TEMP = False # Whether to keep the predicted patches after generated the thumbnail.
DO_POST_PROCESSING = False # Whether to post-process the predicted patches.
FILTER_KERNEL = 9 # The kernel size for post-processing.