|
|
|
import os |
|
|
|
from yacs.config import CfgNode as CN |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_C = CN() |
|
|
|
_C.MODEL = CN() |
|
_C.MODEL.RPN_ONLY = False |
|
_C.MODEL.BOX_ON = True |
|
_C.MODEL.MASK_ON = False |
|
_C.MODEL.KEYPOINT_ON = False |
|
_C.MODEL.DEVICE = "cuda" |
|
|
|
_C.MODEL.META_ARCHITECTURE = "GeneralizedRCNN" |
|
|
|
_C.MODEL.RPN_ARCHITECTURE = "RPN" |
|
_C.MODEL.DEBUG = False |
|
_C.MODEL.ONNX = False |
|
|
|
|
|
|
|
|
|
_C.MODEL.WEIGHT = "" |
|
_C.MODEL.PRETRAIN_NAME = "" |
|
|
|
|
|
_C.MODEL.LINEAR_PROB = False |
|
|
|
|
|
|
|
|
|
_C.MODEL.MULTITASK = CN(new_allowed=True) |
|
|
|
|
|
|
|
|
|
_C.INPUT = CN() |
|
|
|
_C.INPUT.MIN_SIZE_TRAIN = 800 |
|
|
|
_C.INPUT.MAX_SIZE_TRAIN = 1333 |
|
|
|
_C.INPUT.MIN_SIZE_TEST = 800 |
|
|
|
_C.INPUT.MAX_SIZE_TEST = 1333 |
|
|
|
_C.INPUT.PIXEL_MEAN = [102.9801, 115.9465, 122.7717] |
|
|
|
_C.INPUT.PIXEL_STD = [1., 1., 1.] |
|
|
|
_C.INPUT.TO_BGR255 = True |
|
_C.INPUT.FORMAT = '' |
|
_C.INPUT.FIX_RES = False |
|
|
|
|
|
|
|
|
|
_C.AUGMENT = CN() |
|
_C.AUGMENT.USE_RA = 0 |
|
_C.AUGMENT.FLIP_PROB_TRAIN = 0.5 |
|
_C.AUGMENT.VERTICAL_FLIP_PROB_TRAIN = 0.0 |
|
_C.AUGMENT.MULT_MIN_SIZE_TRAIN = () |
|
|
|
_C.AUGMENT.BRIGHTNESS = 0.0 |
|
_C.AUGMENT.CONTRAST = 0.0 |
|
_C.AUGMENT.SATURATION = 0.0 |
|
_C.AUGMENT.HUE = 0.0 |
|
|
|
_C.AUGMENT.CROP_PROB = 0.5 |
|
_C.AUGMENT.CROP_MIN_IOUS = (0.1, 0.3, 0.5, 0.7, 0.9) |
|
_C.AUGMENT.CROP_MIN_SIZE = 0.3 |
|
|
|
|
|
|
|
|
|
_C.DATASETS = CN() |
|
|
|
_C.DATASETS.TRAIN = () |
|
|
|
_C.DATASETS.TEST = () |
|
|
|
_C.DATASETS.USE_CROWD = False |
|
_C.DATASETS.CLASS_AGNOSTIC = False |
|
_C.DATASETS.CLASS_CONCAT = False |
|
_C.DATASETS.MAX_BOX = -1 |
|
_C.DATASETS.SAMPLE_RATIO = 0.0 |
|
_C.DATASETS.FEW_SHOT = 0 |
|
|
|
_C.DATASETS.SHUFFLE_SEED = 0 |
|
_C.DATASETS.PREDEFINED_TEXT = '' |
|
_C.DATASETS.ALTERNATIVE_TRAINING = False |
|
_C.DATASETS.MULTISTAGE_TRAINING = False |
|
_C.DATASETS.REGISTER = CN(new_allowed=True) |
|
_C.DATASETS.BOX_THRESHOLD = 0.1 |
|
|
|
_C.DATASETS.COCO_COPY = 1 |
|
_C.DATASETS.LVIS_COPY = 1 |
|
_C.DATASETS.FLICKR_COPY = 1 |
|
_C.DATASETS.MIXED_COPY = 1 |
|
_C.DATASETS.OBJECT365_COPY = 1 |
|
_C.DATASETS.VG_COPY = 1 |
|
_C.DATASETS.OI_COPY = 1 |
|
_C.DATASETS.IN_COPY = 1 |
|
|
|
|
|
_C.DATASETS.COCO_COPY = 1 |
|
_C.DATASETS.FLICKR_COPY = 1 |
|
_C.DATASETS.MIXED_COPY = 1 |
|
_C.DATASETS.OBJECT365_COPY = 1 |
|
_C.DATASETS.VG_COPY = 1 |
|
_C.DATASETS.OI_COPY = 1 |
|
_C.DATASETS.IN_COPY = 1 |
|
_C.DATASETS.GENERAL_COPY = -1 |
|
_C.DATASETS.GENERAL_COPY_TEST = -1 |
|
|
|
|
|
_C.DATASETS.RANDOM_SAMPLE_NEG = -1 |
|
_C.DATASETS.ADD_DET_PROMPT = False |
|
_C.DATASETS.ADD_DET_PROMPT_ADVANCED = False |
|
_C.DATASETS.USE_OD_AUG = False |
|
_C.DATASETS.USE_COCO_FORMAT = False |
|
_C.DATASETS.CONTROL_PROB = () |
|
_C.DATASETS.DISABLE_SHUFFLE = False |
|
_C.DATASETS.PROMPT_VERSION = "" |
|
_C.DATASETS.PROMPT_LIMIT_NEG = -1 |
|
_C.DATASETS.POS_QUESTION_PROB = 0.6 |
|
_C.DATASETS.NEG_QUESTION_PROB = 0.8 |
|
_C.DATASETS.FULL_QUESTION_PROB = 0.5 |
|
_C.DATASETS.ONE_HOT = False |
|
_C.DATASETS.NO_MINUS_ONE_FOR_ONE_HOT = False |
|
|
|
_C.DATASETS.DISABLE_CLIP_TO_IMAGE = False |
|
_C.DATASETS.SEPARATION_TOKENS = " " |
|
|
|
|
|
_C.DATASETS.LVIS_USE_NORMAL_AP = False |
|
_C.DATASETS.SPECIAL_SAFEGUARD_FOR_COCO_GROUNDING = False |
|
|
|
|
|
_C.DATASETS.BING_INDEX_LIST = [] |
|
_C.DATASETS.CAPTION_MIN_BOX = 1 |
|
_C.DATASETS.REPLACE_CLEAN_LABEL = False |
|
_C.DATASETS.FURTHER_SCREEN = False |
|
_C.DATASETS.CAPTION_CONF = 0.9 |
|
_C.DATASETS.CAPTION_NMS = 0.9 |
|
_C.DATASETS.PACK_RANDOM_CAPTION_NUMBER = 0 |
|
_C.DATASETS.INFERENCE_CAPTION = False |
|
_C.DATASETS.SAMPLE_NEGATIVE_FOR_GROUNDING_DATA = -1.0 |
|
_C.DATASETS.RANDOM_PACK_PROB = -1.0 |
|
_C.DATASETS.NO_RANDOM_PACK_PROBABILITY = 0.0 |
|
_C.DATASETS.SAFEGUARD_POSITIVE_CAPTION = True |
|
_C.DATASETS.CAPTION_FORMAT_VERSION = "v1" |
|
_C.DATASETS.LOCAL_DEBUG = False |
|
|
|
|
|
|
|
_C.DATASETS.PREDEFINED_TEXT = None |
|
_C.DATASETS.TRAIN_DATASETNAME_SUFFIX = "" |
|
_C.DATASETS.TEST_DATASETNAME_SUFFIX = "" |
|
_C.DATASETS.OVERRIDE_CATEGORY = None |
|
_C.DATASETS.USE_OVERRIDE_CATEGORY = False |
|
_C.DATASETS.SUPRESS_QUERY = None |
|
_C.DATASETS.USE_SUPRESS_QUERY = False |
|
_C.DATASETS.USE_CAPTION_PROMPT = False |
|
_C.DATASETS.CAPTION_PROMPT = None |
|
|
|
_C.DATASETS.FLICKR_GT_TYPE = "separate" |
|
|
|
|
|
_C.DATASETS.DIVER_BOX_FOR_VQA = False |
|
|
|
|
|
|
|
_C.DATALOADER = CN() |
|
|
|
_C.DATALOADER.NUM_WORKERS = 4 |
|
|
|
|
|
_C.DATALOADER.SIZE_DIVISIBILITY = 0 |
|
|
|
|
|
|
|
_C.DATALOADER.ASPECT_RATIO_GROUPING = True |
|
|
|
_C.DATALOADER.MIN_KPS_PER_IMS = 0 |
|
|
|
_C.DATALOADER.USE_RANDOM_SEED = False |
|
|
|
_C.DATALOADER.DISTRIBUTE_CHUNK_AMONG_NODE = False |
|
|
|
|
|
|
|
_C.MODEL.BACKBONE = CN() |
|
|
|
|
|
|
|
|
|
|
|
_C.MODEL.BACKBONE.CONV_BODY = "R-50-C4" |
|
|
|
|
|
_C.MODEL.BACKBONE.FREEZE_CONV_BODY_AT = 2 |
|
_C.MODEL.BACKBONE.FREEZE = False |
|
_C.MODEL.BACKBONE.GROUP = 1 |
|
_C.MODEL.BACKBONE.OUT_CHANNELS = 256 * 4 |
|
|
|
_C.MODEL.BACKBONE.RESET_BN = False |
|
|
|
_C.MODEL.BACKBONE.NORM_LEVEL = 3 |
|
|
|
_C.MODEL.BACKBONE.USE_BN = False |
|
|
|
_C.MODEL.BACKBONE.USE_SYNCBN = False |
|
_C.MODEL.BACKBONE.USE_NSYNCBN = False |
|
|
|
_C.MODEL.BACKBONE.USE_GN = False |
|
|
|
_C.MODEL.BACKBONE.USE_EN = False |
|
|
|
_C.MODEL.BACKBONE.USE_DFCONV = False |
|
_C.MODEL.BACKBONE.USE_DYRELU = False |
|
_C.MODEL.BACKBONE.USE_SE = False |
|
_C.MODEL.BACKBONE.LAYER_SETUP = (3, 4, 6, 3) |
|
_C.MODEL.BACKBONE.LAYER_SEARCH = CN(new_allowed=True) |
|
_C.MODEL.BACKBONE.OUT_FEATURES = ("stage2", "stage3", "stage4", "stage5") |
|
_C.MODEL.BACKBONE.FPN_LAYER = () |
|
_C.MODEL.BACKBONE.USE_CHECKPOINT = False |
|
|
|
_C.MODEL.BACKBONE.EFFICIENT_DET_START_FROM = 3 |
|
_C.MODEL.BACKBONE.EFFICIENT_DET_COMPOUND = 0 |
|
_C.MODEL.BACKBONE.EFFICIENT_DET_BIFPN_VERSION = 0 |
|
|
|
_C.MODEL.LANGUAGE_BACKBONE = CN() |
|
_C.MODEL.LANGUAGE_BACKBONE.WEIGHT = "" |
|
_C.MODEL.LANGUAGE_BACKBONE.FREEZE = False |
|
_C.MODEL.LANGUAGE_BACKBONE.USE_CHECKPOINT = False |
|
_C.MODEL.LANGUAGE_BACKBONE.TOKENIZER_TYPE = "bert-base-uncased" |
|
_C.MODEL.LANGUAGE_BACKBONE.MODEL_TYPE = "bert-base-uncased" |
|
_C.MODEL.LANGUAGE_BACKBONE.LANG_DIM = 768 |
|
_C.MODEL.LANGUAGE_BACKBONE.MAX_QUERY_LEN = 256 |
|
_C.MODEL.LANGUAGE_BACKBONE.N_LAYERS = 1 |
|
_C.MODEL.LANGUAGE_BACKBONE.UNUSED_TOKEN = 106 |
|
_C.MODEL.LANGUAGE_BACKBONE.MASK_SPECIAL = False |
|
|
|
_C.MODEL.LANGUAGE_BACKBONE.RNN_TYPE = "lstm" |
|
_C.MODEL.LANGUAGE_BACKBONE.VARIABLE_LENGTH = True |
|
_C.MODEL.LANGUAGE_BACKBONE.WORD_EMBEDDING_SIZE = 512 |
|
_C.MODEL.LANGUAGE_BACKBONE.WORD_VEC_SIZE = 512 |
|
_C.MODEL.LANGUAGE_BACKBONE.HIDDEN_SIZE = 512 |
|
_C.MODEL.LANGUAGE_BACKBONE.BIDIRECTIONAL = True |
|
_C.MODEL.LANGUAGE_BACKBONE.INPUT_DROPOUT_P = 0.5 |
|
_C.MODEL.LANGUAGE_BACKBONE.DROPOUT_P = 0.2 |
|
_C.MODEL.LANGUAGE_BACKBONE.CORPUS_PATH = "" |
|
_C.MODEL.LANGUAGE_BACKBONE.VOCAB_SIZE = 0 |
|
|
|
_C.MODEL.LANGUAGE_BACKBONE.PAD_MAX = True |
|
|
|
|
|
|
|
_C.MODEL.FPN = CN() |
|
_C.MODEL.FPN.FREEZE = False |
|
_C.MODEL.FPN.USE_GN = False |
|
_C.MODEL.FPN.USE_RELU = False |
|
_C.MODEL.FPN.USE_DYRELU = False |
|
_C.MODEL.FPN.DROP_BLOCK = True |
|
_C.MODEL.FPN.DROP_PROB = 0.3 |
|
_C.MODEL.FPN.DROP_SIZE = 3 |
|
_C.MODEL.FPN.USE_SPP = False |
|
_C.MODEL.FPN.USE_PAN = False |
|
_C.MODEL.FPN.USE_DYHEAD = False |
|
_C.MODEL.FPN.RETURN_SWINT_FEATURE_BEFORE_FUSION = False |
|
|
|
|
|
|
|
_C.MODEL.BIFPN = CN() |
|
_C.MODEL.BIFPN.NUM_REPEATS = 1 |
|
_C.MODEL.BIFPN.USE_ATTENTION = True |
|
|
|
|
|
|
|
|
|
_C.MODEL.GROUP_NORM = CN() |
|
|
|
_C.MODEL.GROUP_NORM.DIM_PER_GP = -1 |
|
|
|
_C.MODEL.GROUP_NORM.NUM_GROUPS = 16 |
|
|
|
_C.MODEL.GROUP_NORM.EPSILON = 1e-5 |
|
|
|
|
|
|
|
|
|
_C.MODEL.EVO_NORM = CN() |
|
|
|
_C.MODEL.EVO_NORM.NUM_GROUPS = 8 |
|
|
|
_C.MODEL.EVO_NORM.EPSILON = 1e-5 |
|
|
|
|
|
|
|
|
|
_C.MODEL.RETINANET = CN() |
|
|
|
_C.MODEL.RETINANET.NUM_CLASSES = 81 |
|
|
|
|
|
_C.MODEL.RETINANET.NUM_CONVS = 4 |
|
|
|
|
|
_C.MODEL.RETINANET.PRE_NMS_TOP_N = 1000 |
|
|
|
|
|
_C.MODEL.RETINANET.PRIOR_PROB = 0.01 |
|
|
|
|
|
_C.MODEL.RETINANET.INFERENCE_TH = 0.05 |
|
|
|
_C.MODEL.RETINANET.NMS_TH = 0.4 |
|
_C.MODEL.RETINANET.DETECTIONS_PER_IMG = 100 |
|
|
|
|
|
|
|
|
|
_C.MODEL.FOCAL = CN() |
|
|
|
_C.MODEL.FOCAL.BBOX_REG_WEIGHT = 4.0 |
|
|
|
_C.MODEL.FOCAL.BBOX_REG_BETA = 0.11 |
|
|
|
|
|
_C.MODEL.FOCAL.FG_IOU_THRESHOLD = 0.5 |
|
|
|
|
|
_C.MODEL.FOCAL.BG_IOU_THRESHOLD = 0.4 |
|
|
|
_C.MODEL.FOCAL.LOSS_ALPHA = 0.25 |
|
|
|
_C.MODEL.FOCAL.LOSS_GAMMA = 2.0 |
|
|
|
|
|
|
|
|
|
_C.MODEL.FCOS = CN() |
|
_C.MODEL.FCOS.NUM_CLASSES = 81 |
|
_C.MODEL.FCOS.FPN_STRIDES = [8, 16, 32, 64, 128] |
|
_C.MODEL.FCOS.PRIOR_PROB = 0.01 |
|
_C.MODEL.FCOS.INFERENCE_TH = 0.05 |
|
_C.MODEL.FCOS.NMS_TH = 0.6 |
|
_C.MODEL.FCOS.PRE_NMS_TOP_N = 1000 |
|
|
|
|
|
_C.MODEL.FCOS.NUM_CONVS = 4 |
|
|
|
_C.MODEL.FCOS.USE_DFCONV = False |
|
|
|
|
|
_C.MODEL.FCOS.CENTER_SAMPLING_RADIUS = 0.0 |
|
|
|
_C.MODEL.FCOS.IOU_LOSS_TYPE = "iou" |
|
|
|
_C.MODEL.FCOS.NORM_REG_TARGETS = False |
|
_C.MODEL.FCOS.CENTERNESS_ON_REG = False |
|
_C.MODEL.FCOS.USE_GT_CENTER = False |
|
|
|
_C.MODEL.FCOS.DETECTIONS_PER_IMG = 100 |
|
_C.MODEL.FCOS.USE_GN = False |
|
_C.MODEL.FCOS.USE_BN = False |
|
|
|
_C.MODEL.FCOS.INFERENCE_TH_TRAIN = 0.0 |
|
_C.MODEL.FCOS.PRE_NMS_TOP_N_TRAIN = 3000 |
|
_C.MODEL.FCOS.POST_NMS_TOP_N_TRAIN = 1000 |
|
|
|
|
|
|
|
|
|
_C.MODEL.ATSS = CN() |
|
_C.MODEL.ATSS.NUM_CLASSES = 81 |
|
_C.MODEL.ATSS.PRIOR_PROB = 0.01 |
|
_C.MODEL.ATSS.INFERENCE_TH = 0.05 |
|
_C.MODEL.ATSS.NMS_TH = 0.6 |
|
_C.MODEL.ATSS.PRE_NMS_TOP_N = 1000 |
|
|
|
|
|
_C.MODEL.ATSS.NUM_CONVS = 4 |
|
|
|
_C.MODEL.ATSS.CHANNELS = 128 |
|
|
|
_C.MODEL.ATSS.USE_DFCONV = False |
|
|
|
|
|
_C.MODEL.ATSS.TOPK = 9 |
|
|
|
|
|
_C.MODEL.ATSS.REG_LOSS_WEIGHT = 2.0 |
|
|
|
_C.MODEL.ATSS.DETECTIONS_PER_IMG = 100 |
|
_C.MODEL.ATSS.USE_GN = False |
|
_C.MODEL.ATSS.USE_BN = False |
|
|
|
_C.MODEL.ATSS.USE_DYRELU = False |
|
_C.MODEL.ATSS.USE_SE = False |
|
|
|
_C.MODEL.ATSS.INFERENCE_TH_TRAIN = 0.0 |
|
_C.MODEL.ATSS.PRE_NMS_TOP_N_TRAIN = 3000 |
|
_C.MODEL.ATSS.POST_NMS_TOP_N_TRAIN = 1000 |
|
|
|
|
|
|
|
_C.MODEL.DYHEAD = CN() |
|
_C.MODEL.DYHEAD.NUM_CLASSES = 81 |
|
_C.MODEL.DYHEAD.PRIOR_PROB = 0.01 |
|
|
|
|
|
_C.MODEL.DYHEAD.NUM_CONVS = 4 |
|
|
|
_C.MODEL.DYHEAD.CHANNELS = 128 |
|
_C.MODEL.DYHEAD.GROUPS = 1 |
|
|
|
_C.MODEL.DYHEAD.USE_DFCONV = False |
|
|
|
|
|
_C.MODEL.DYHEAD.TOPK = 9 |
|
|
|
_C.MODEL.DYHEAD.SCORE_AGG = "MEAN" |
|
|
|
_C.MODEL.DYHEAD.LOG_SCALE = 0.0 |
|
_C.MODEL.DYHEAD.SHALLOW_LOG_SCALE = 0.0 |
|
|
|
_C.MODEL.DYHEAD.USE_GN = False |
|
_C.MODEL.DYHEAD.USE_NSYNCBN = False |
|
_C.MODEL.DYHEAD.USE_SYNCBN = False |
|
|
|
_C.MODEL.DYHEAD.USE_DYFUSE = False |
|
_C.MODEL.DYHEAD.USE_DYRELU = False |
|
|
|
_C.MODEL.DYHEAD.CONV_FUNC = '' |
|
|
|
|
|
_C.MODEL.DYHEAD.COSINE_SCALE = -1.0 |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG = CN() |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.EARLY_FUSE_ON = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.TYPE = "" |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.JOINT_EMB_SIZE = 256 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.JOINT_OUT_SIZE = 256 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.JOINT_EMB_DROPOUT = 0.1 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.JOINT_MLP_LAYERS = 2 |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_CLASSIFICATION_LOSS = False |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_TOKEN_LOSS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.TOKEN_LOSS_WEIGHT = 1.0 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.TOKEN_GAMMA = 2.0 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.TOKEN_ALPHA = 0.25 |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_DOT_PRODUCT_TOKEN_LOSS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_CONTRASTIVE_ALIGN_LOSS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CONTRASTIVE_HIDDEN_DIM = 64 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CONTRASTIVE_ALIGN_LOSS_WEIGHT = 1.0 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.DOT_PRODUCT_TOKEN_LOSS_WEIGHT = 1.0 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_LAYER_SCALE = True |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.SEPARATE_BIDIRECTIONAL = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.STABLE_SOFTMAX_2D = False |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.DO_LANG_PROJ_OUTSIDE_CHECKPOINT = False |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_FUSED_FEATURES_DOT_PRODUCT = False |
|
|
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CLAMP_MIN_FOR_UNDERFLOW = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CLAMP_MAX_FOR_OVERFLOW = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CLAMP_BERTATTN_MIN_FOR_UNDERFLOW = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CLAMP_BERTATTN_MAX_FOR_OVERFLOW = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.CLAMP_DOT_PRODUCT = False |
|
|
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.MLM_LOSS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.MLM_LOSS_FOR_ONLY_POSITIVES = True |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.NO_MASK_FOR_OD = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.NO_MASK_FOR_GOLD = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.MLM_LOSS_COEF = 1.0 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.MLM_OBJ_FOR_ONLY_POSITIVE = False |
|
|
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_SHALLOW_CONTRASTIVE_LOSS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.SHALLOW_MAX_POSITIVE_ANCHORS = 100 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_SHALLOW_ZERO_PADS = False |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.SHALLOW_CONTRASTIVE_HIDDEN_DIM = 64 |
|
_C.MODEL.DYHEAD.FUSE_CONFIG.SHALLOW_CONTRASTIVE_LOSS_WEIGHT = 1.0 |
|
|
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.USE_BACKBONE_SHALLOW_CONTRASTIVE_LOSS = False |
|
|
|
_C.MODEL.DYHEAD.FUSE_CONFIG.ADD_LINEAR_LAYER = False |
|
|
|
|
|
_C.MODEL.DYHEAD.USE_CHECKPOINT = False |
|
|
|
|
|
|
|
|
|
_C.MODEL.RPN = CN() |
|
_C.MODEL.RPN.USE_FPN = False |
|
|
|
_C.MODEL.RPN.ANCHOR_SIZES = (32, 64, 128, 256, 512) |
|
|
|
|
|
_C.MODEL.RPN.ANCHOR_STRIDE = (16,) |
|
|
|
_C.MODEL.RPN.ASPECT_RATIOS = (0.5, 1.0, 2.0) |
|
|
|
_C.MODEL.RPN.ANCHOR_SHIFT = (0.0, 0.0, 0.0, 0.0) |
|
|
|
_C.MODEL.RPN.USE_RELATIVE_SIZE = False |
|
|
|
|
|
_C.MODEL.RPN.STRADDLE_THRESH = 0 |
|
|
|
_C.MODEL.RPN.OCTAVE = 2.0 |
|
_C.MODEL.RPN.SCALES_PER_OCTAVE = 3 |
|
|
|
|
|
|
|
_C.MODEL.RPN.FG_IOU_THRESHOLD = 0.7 |
|
|
|
|
|
|
|
_C.MODEL.RPN.BG_IOU_THRESHOLD = 0.3 |
|
|
|
_C.MODEL.RPN.BATCH_SIZE_PER_IMAGE = 256 |
|
|
|
_C.MODEL.RPN.POSITIVE_FRACTION = 0.5 |
|
|
|
|
|
_C.MODEL.RPN.PRE_NMS_TOP_N_TRAIN = 12000 |
|
_C.MODEL.RPN.PRE_NMS_TOP_N_TEST = 6000 |
|
|
|
_C.MODEL.RPN.POST_NMS_TOP_N_TRAIN = 2000 |
|
_C.MODEL.RPN.POST_NMS_TOP_N_TEST = 1000 |
|
|
|
_C.MODEL.RPN.NMS_THRESH = 0.7 |
|
|
|
|
|
_C.MODEL.RPN.MIN_SIZE = 0 |
|
|
|
|
|
_C.MODEL.RPN.FPN_POST_NMS_TOP_N_TRAIN = 2000 |
|
_C.MODEL.RPN.FPN_POST_NMS_TOP_N_TEST = 2000 |
|
|
|
_C.MODEL.RPN.RPN_HEAD = "SingleConvRPNHead" |
|
_C.MODEL.RPN.FREEZE = False |
|
_C.MODEL.RPN.FORCE_BOXES = False |
|
_C.MODEL.RPN.RETURN_FUSED_FEATURES = False |
|
|
|
|
|
|
|
|
|
_C.MODEL.ROI_HEADS = CN() |
|
_C.MODEL.ROI_HEADS.USE_FPN = False |
|
|
|
_C.MODEL.ROI_HEADS.FG_IOU_THRESHOLD = 0.5 |
|
|
|
|
|
_C.MODEL.ROI_HEADS.BG_IOU_THRESHOLD = 0.5 |
|
|
|
|
|
_C.MODEL.ROI_HEADS.BBOX_REG_WEIGHTS = (10., 10., 5., 5.) |
|
|
|
|
|
|
|
|
|
_C.MODEL.ROI_HEADS.BATCH_SIZE_PER_IMAGE = 512 |
|
|
|
_C.MODEL.ROI_HEADS.POSITIVE_FRACTION = 0.25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
_C.MODEL.ROI_HEADS.SCORE_THRESH = 0.05 |
|
|
|
|
|
_C.MODEL.ROI_HEADS.NMS = 0.5 |
|
|
|
|
|
_C.MODEL.ROI_HEADS.DETECTIONS_PER_IMG = 100 |
|
|
|
_C.MODEL.ROI_BOX_HEAD = CN() |
|
_C.MODEL.ROI_BOX_HEAD.FEATURE_EXTRACTOR = "ResNet50Conv5ROIFeatureExtractor" |
|
_C.MODEL.ROI_BOX_HEAD.PREDICTOR = "FastRCNNPredictor" |
|
_C.MODEL.ROI_BOX_HEAD.POOLER_RESOLUTION = 14 |
|
_C.MODEL.ROI_BOX_HEAD.POOLER_SAMPLING_RATIO = 0 |
|
_C.MODEL.ROI_BOX_HEAD.POOLER_SCALES = (1.0 / 16,) |
|
_C.MODEL.ROI_BOX_HEAD.NUM_CLASSES = 81 |
|
|
|
_C.MODEL.ROI_BOX_HEAD.MLP_HEAD_DIM = 1024 |
|
|
|
_C.MODEL.ROI_BOX_HEAD.USE_GN = False |
|
|
|
_C.MODEL.ROI_BOX_HEAD.DILATION = 1 |
|
_C.MODEL.ROI_BOX_HEAD.CONV_HEAD_DIM = 256 |
|
_C.MODEL.ROI_BOX_HEAD.NUM_STACKED_CONVS = 4 |
|
|
|
_C.MODEL.ROI_BOX_HEAD.POOLER_ALIGNED = False |
|
|
|
_C.MODEL.ROI_MASK_HEAD = CN() |
|
_C.MODEL.ROI_MASK_HEAD.FEATURE_EXTRACTOR = "ResNet50Conv5ROIFeatureExtractor" |
|
_C.MODEL.ROI_MASK_HEAD.PREDICTOR = "MaskRCNNC4Predictor" |
|
_C.MODEL.ROI_MASK_HEAD.POOLER_RESOLUTION = 14 |
|
_C.MODEL.ROI_MASK_HEAD.POOLER_SAMPLING_RATIO = 0 |
|
_C.MODEL.ROI_MASK_HEAD.POOLER_SCALES = (1.0 / 16,) |
|
_C.MODEL.ROI_MASK_HEAD.MLP_HEAD_DIM = 1024 |
|
_C.MODEL.ROI_MASK_HEAD.CONV_LAYERS = (256, 256, 256, 256) |
|
_C.MODEL.ROI_MASK_HEAD.RESOLUTION = 14 |
|
_C.MODEL.ROI_MASK_HEAD.SHARE_BOX_FEATURE_EXTRACTOR = True |
|
|
|
_C.MODEL.ROI_MASK_HEAD.POSTPROCESS_MASKS = False |
|
_C.MODEL.ROI_MASK_HEAD.POSTPROCESS_MASKS_THRESHOLD = 0.5 |
|
|
|
_C.MODEL.ROI_MASK_HEAD.DILATION = 1 |
|
|
|
_C.MODEL.ROI_MASK_HEAD.USE_GN = False |
|
|
|
_C.MODEL.ROI_MASK_HEAD.HG_SCALE = 1 |
|
|
|
_C.MODEL.ROI_KEYPOINT_HEAD = CN() |
|
_C.MODEL.ROI_KEYPOINT_HEAD.FEATURE_EXTRACTOR = "KeypointRCNNFeatureExtractor" |
|
_C.MODEL.ROI_KEYPOINT_HEAD.PREDICTOR = "KeypointRCNNPredictor" |
|
_C.MODEL.ROI_KEYPOINT_HEAD.POOLER_RESOLUTION = 14 |
|
_C.MODEL.ROI_KEYPOINT_HEAD.POOLER_SAMPLING_RATIO = 0 |
|
_C.MODEL.ROI_KEYPOINT_HEAD.POOLER_SCALES = (1.0 / 16,) |
|
_C.MODEL.ROI_KEYPOINT_HEAD.MLP_HEAD_DIM = 1024 |
|
_C.MODEL.ROI_KEYPOINT_HEAD.CONV_LAYERS = tuple(512 for _ in range(8)) |
|
_C.MODEL.ROI_KEYPOINT_HEAD.RESOLUTION = 14 |
|
_C.MODEL.ROI_KEYPOINT_HEAD.NUM_CLASSES = 17 |
|
_C.MODEL.ROI_KEYPOINT_HEAD.KEYPOINT_NAME = () |
|
_C.MODEL.ROI_KEYPOINT_HEAD.SHARE_BOX_FEATURE_EXTRACTOR = True |
|
|
|
|
|
|
|
|
|
|
|
|
|
_C.MODEL.RESNETS = CN() |
|
|
|
_C.MODEL.RESNETS.USE_STEM3X3 = False |
|
_C.MODEL.RESNETS.WITH_SE = False |
|
_C.MODEL.RESNETS.USE_AVG_DOWN = False |
|
|
|
|
|
_C.MODEL.RESNETS.NUM_GROUPS = 1 |
|
|
|
|
|
_C.MODEL.RESNETS.WIDTH_PER_GROUP = 64 |
|
|
|
|
|
|
|
_C.MODEL.RESNETS.STRIDE_IN_1X1 = True |
|
|
|
|
|
_C.MODEL.RESNETS.TRANS_FUNC = "BottleneckWithFixedBatchNorm" |
|
|
|
_C.MODEL.RESNETS.STEM_FUNC = "StemWithFixedBatchNorm" |
|
|
|
|
|
_C.MODEL.RESNETS.RES5_DILATION = 1 |
|
|
|
_C.MODEL.RESNETS.BACKBONE_OUT_CHANNELS = 256 * 4 |
|
_C.MODEL.RESNETS.RES2_OUT_CHANNELS = 256 |
|
_C.MODEL.RESNETS.STEM_OUT_CHANNELS = 64 |
|
|
|
_C.MODEL.RESNETS.REVISION = "resnet_light" |
|
|
|
_C.MODEL.RESNETS.STAGE_WITH_DCN = (False, False, False, False) |
|
_C.MODEL.RESNETS.WITH_MODULATED_DCN = False |
|
_C.MODEL.RESNETS.DEFORMABLE_GROUPS = 1 |
|
|
|
|
|
|
|
|
|
_C.MODEL.SWINT = CN() |
|
_C.MODEL.SWINT.EMBED_DIM = 96 |
|
_C.MODEL.SWINT.OUT_CHANNELS = (96, 192, 384, 768) |
|
_C.MODEL.SWINT.DEPTHS = (2, 2, 6, 2) |
|
_C.MODEL.SWINT.NUM_HEADS = (3, 6, 12, 24) |
|
_C.MODEL.SWINT.WINDOW_SIZE = 7 |
|
_C.MODEL.SWINT.MLP_RATIO = 4 |
|
_C.MODEL.SWINT.DROP_PATH_RATE = 0.2 |
|
_C.MODEL.SWINT.APE = False |
|
_C.MODEL.SWINT.VERSION = "v1" |
|
_C.MODEL.SWINT.OUT_NORM = True |
|
_C.MODEL.SWINT.LAYER_SCALE = 0 |
|
|
|
|
|
|
|
|
|
_C.MODEL.SPEC = CN(new_allowed=True) |
|
|
|
|
|
|
|
|
|
_C.MODEL.CLIP = CN() |
|
_C.MODEL.CLIP.CONTEXT_LENGTH = 256 |
|
_C.MODEL.CLIP.WIDTH = 512 |
|
_C.MODEL.CLIP.LAYERS = 12 |
|
_C.MODEL.CLIP.HEADS = 8 |
|
_C.MODEL.CLIP.DROP_PATH = 0.0 |
|
_C.MODEL.CLIP.TOKENIZER = "clip" |
|
_C.MODEL.CLIP.VOCAB_SIZE = 49408 |
|
|
|
|
|
|
|
|
|
|
|
_C.SEARCH = CN() |
|
_C.SEARCH.MAX_EPOCH = 20 |
|
_C.SEARCH.SELECT_NUM = 20 |
|
_C.SEARCH.POPULATION_NUM = 64 |
|
_C.SEARCH.MUTATION_NUM = 24 |
|
_C.SEARCH.CROSSOVER_NUM = 24 |
|
_C.SEARCH.MUTATION_PROB = 0.1 |
|
|
|
|
|
|
|
|
|
_C.SOLVER = CN() |
|
_C.SOLVER.USE_AMP = False |
|
|
|
_C.SOLVER.MAX_ITER = 40000 |
|
_C.SOLVER.MULTI_MAX_ITER = () |
|
_C.SOLVER.MAX_EPOCH = 0 |
|
_C.SOLVER.MULTI_MAX_EPOCH = () |
|
|
|
_C.SOLVER.OPTIMIZER = "SGD" |
|
|
|
_C.SOLVER.BASE_LR = 0.001 |
|
|
|
_C.SOLVER.LANG_LR = 0.00001 |
|
_C.SOLVER.BACKBONE_BODY_LR_FACTOR = 1.0 |
|
|
|
_C.SOLVER.BIAS_LR_FACTOR = 2 |
|
_C.SOLVER.GRAD_CLIP = 0.0 |
|
|
|
_C.SOLVER.CLIP_GRADIENTS = CN() |
|
_C.SOLVER.CLIP_GRADIENTS.ENABLED = False |
|
_C.SOLVER.CLIP_GRADIENTS.CLIP_VALUE = 0.0 |
|
_C.SOLVER.CLIP_GRADIENTS.CLIP_TYPE = "full_model" |
|
_C.SOLVER.CLIP_GRADIENTS.NORM_TYPE = 2.0 |
|
_C.SOLVER.MODEL_EMA = 0.0 |
|
|
|
_C.SOLVER.MOMENTUM = 0.9 |
|
|
|
_C.SOLVER.WEIGHT_DECAY = 0.0005 |
|
_C.SOLVER.WEIGHT_DECAY_BIAS = 0.0 |
|
_C.SOLVER.WEIGHT_DECAY_NORM_FACTOR = 1.0 |
|
|
|
|
|
_C.SOLVER.USE_COSINE = False |
|
_C.SOLVER.MIN_LR = 0.000001 |
|
|
|
_C.SOLVER.GAMMA = 0.1 |
|
_C.SOLVER.STEPS = (30000,) |
|
|
|
_C.SOLVER.USE_AUTOSTEP = False |
|
_C.SOLVER.STEP_PATIENCE = 5 |
|
|
|
_C.SOLVER.WARMUP_FACTOR = 1.0 / 3 |
|
_C.SOLVER.WARMUP_ITERS = 500 |
|
_C.SOLVER.WARMUP_METHOD = "linear" |
|
|
|
_C.SOLVER.CHECKPOINT_PERIOD = 2500 |
|
_C.SOLVER.CHECKPOINT_PER_EPOCH = -1.0 |
|
_C.SOLVER.TEST_WITH_INFERENCE = False |
|
_C.SOLVER.AUTO_TERMINATE_PATIENCE = -1 |
|
|
|
|
|
|
|
_C.SOLVER.IMS_PER_BATCH = 16 |
|
|
|
_C.SOLVER.MAX_NEG_PER_BATCH = 0.1 |
|
|
|
_C.SOLVER.SEED = 0 |
|
_C.SOLVER.DISABLE_OUTPUT_DISTRIBUTED = False |
|
|
|
|
|
_C.SOLVER.PROMPT_PROBING_LEVEL = -1.0 |
|
|
|
|
|
|
|
_C.SOLVER.FIND_UNUSED_PARAMETERS = True |
|
_C.SOLVER.DATASET_LENGTH = -1 |
|
_C.SOLVER.TUNING_HIGHLEVEL_OVERRIDE = None |
|
_C.SOLVER.USE_EMA_FOR_MONITOR = False |
|
|
|
_C.SOLVER.WEIGHT_DECAY_SCHEDULE = False |
|
_C.SOLVER.WEIGHT_DECAY_SCHEDULE_RATIO = 0.667 |
|
|
|
|
|
|
|
|
|
_C.TEST = CN() |
|
_C.TEST.EXPECTED_RESULTS = [] |
|
_C.TEST.EXPECTED_RESULTS_SIGMA_TOL = 4 |
|
_C.TEST.DURING_TRAINING = False |
|
|
|
|
|
|
|
_C.TEST.IMS_PER_BATCH = 16 |
|
|
|
_C.TEST.USE_MULTISCALE = False |
|
|
|
|
|
_C.TEST.SCALES = (400, 500, 600, 640, 700, 900, 1000, 1100, 1200, 1300, 1400, 1800) |
|
_C.TEST.RANGES = ((96, 10000), (96, 10000), (64, 10000), (64, 10000), (64, 10000), (0, 10000), (0, 10000), (0, 256), (0, 256), (0, 192), (0, 192), (0, 96)) |
|
_C.TEST.MAX_SIZE = 2500 |
|
_C.TEST.FLIP = True |
|
_C.TEST.SPECIAL_NMS = 'none' |
|
_C.TEST.TH = 0.6 |
|
_C.TEST.PRE_NMS_TOP_N = 1000 |
|
_C.TEST.NUM_CLASSES = 81 |
|
_C.TEST.SELECT_CLASSES = () |
|
|
|
_C.TEST.EVAL_TASK = "" |
|
_C.TEST.SUBSET = -1 |
|
_C.TEST.CHUNKED_EVALUATION = -1 |
|
_C.TEST.MDETR_STYLE_AGGREGATE_CLASS_NUM = -1 |
|
|
|
|
|
|
|
_C.OUTPUT_DIR = "OUTPUT" |
|
|
|
_C.PATHS_CATALOG = os.path.join(os.path.dirname(__file__), "paths_catalog.py") |
|
|
|
|
|
_C.TENSORBOARD_EXP = "OUTPUT" |
|
|
|
|
|
_C.GLIPKNOW = CN() |
|
_C.GLIPKNOW.KNOWLEDGE_FILE = "" |
|
_C.GLIPKNOW.KNOWLEDGE_TYPE = "" |
|
_C.GLIPKNOW.MAX_NUM_CLASSES_PER_BATCH_TRAIN = -1 |
|
_C.GLIPKNOW.PARALLEL_LANGUAGE_INPUT = False |
|
_C.GLIPKNOW.LAN_FEATURE_AGG_TYPE = "first" |
|
_C.GLIPKNOW.GPT3_NUM = 5 |
|
_C.GLIPKNOW.WIKI_AND_GPT3 = False |