import numpy as np from packaging import version import torch import torch.nn as nn from torch.nn import init import yaml import nn as mynn from utils.collections import AttrDict __C = AttrDict() # Consumers can get config by: # from fast_rcnn_config import cfg cfg = __C __C.DATA_SOURCE = 'coco' __C.TRAIN_SYNC_BN = True # Set to True to include labels other than mass to train the mass detection model # Set to False to include only mass. __C.MULTIPLE_CLASS_FG = True # Whether merge annotations from two or more doctors __C.USE_MERGED_ANN = False # Whether use new dcm_bbox __C.USE_DCM_BBOX = False # Whether implemente histogram equalization __C.HIST_EQ = False # set to true to make im and other_im do hist-eq at the same position, i.e. symmentry
# __C.METRICS.EVALUATE_ALL_CLASSES = True __C.METRICS.EVALUATE_ALL_CLASSES = False __C.METRICS.EVALUATE_FIRST_N_WAYS = False __C.METRICS.FIRST_N_WAYS = 1000 __C.METRICS.NUM_MEDIAN_EPOCHS = 5 # GPU or CPU __C.DEVICE = b'GPU' # for example 8 gpus __C.NUM_DEVICES = 8 __C.DATADIR = b'' __C.DATASET = b'' __C.DATA_SHUFFLE_K = 1 # The sources for imagenet dataset are: gfsai | laser __C.DATA_SOURCE = b'gfsai' __C.ROOT_DEVICE_ID = 0 __C.CUDNN_WORKSPACE_LIMIT = 256 __C.RNG_SEED = 2 __C.COMPUTE_LAYER_STATS = False __C.LAYER_STATS_FREQ = 10 __C.STATS_LAYERS = [b'conv1', b'pred', b'res5_2_branch2', b'res2_0_branch2'] # use the following option to save the model proto for mobile predictions __C.SAVE_MOBILE_PROTO = False # Turn on the minibatch stats to debug whether data loader is slow # NOTE that other CPU processes might interfere with the data loader __C.PRINT_MB_STATS = False __C.LOGGER_FREQUENCY = 10 __C.DATA = AttrDict()