a b/utils/config.py
1
import os
2
3
INFERENCE_GPUS = [8]
4
CENTER_SIZE = 2000  # The effective patch size.
5
BORDER_SIZE = 100  # The boarder size containing surrounding information.
6
PATCH_SIZE = CENTER_SIZE + 2 * BORDER_SIZE
7
format_mapping = {
8
    'tif': 'OpenSlide',
9
    'svs': 'OpenSlide',
10
    'ndpi': 'OpenSlide',
11
    'scn': 'OpenSlide',
12
    'mrxs': 'OpenSlide',
13
    'bif': 'OpenSlide',
14
    'vms': 'OpenSlide',
15
}
16
MODEL_NAME = 'stomach'
17
INPUT_KEY = 'output'
18
PREDICT_KEY = 'output'
19
TF_SERVING_HOST = os.environ.get('TF_SERVING_HOST', '127.0.0.1')
20
TF_SERVING_PORT = int(os.environ.get('TF_SERVING_PORT', 9000))
21
TEMP_DIR = './temp/'  # Where to save the predicted patches.
22
THUMBNAIL_RATIO = 10  # Down-sample ratio from the predictions to the thumbnail.
23
KEEP_TEMP = False  # Whether to keep the predicted patches after generated the thumbnail.
24
DO_POST_PROCESSING = False  # Whether to post-process the predicted patches.
25
FILTER_KERNEL = 9  # The kernel size for post-processing.