|
from yacs.config import CfgNode as CN |
|
|
|
_CN = CN() |
|
|
|
|
|
_CN.MODEL = CN() |
|
_CN.MODEL.BACKBONE_TYPE = "FPN" |
|
_CN.MODEL.RESOLUTION = (8, 2) |
|
_CN.MODEL.FINE_WINDOW_SIZE = 5 |
|
_CN.MODEL.FINE_CONCAT_COARSE_FEAT = False |
|
|
|
|
|
_CN.MODEL.FPN = CN() |
|
_CN.MODEL.FPN.INITIAL_DIM = 128 |
|
_CN.MODEL.FPN.BLOCK_DIMS = [128, 192, 256, 384] |
|
|
|
|
|
_CN.MODEL.COARSE = CN() |
|
_CN.MODEL.COARSE.D_MODEL = 256 |
|
_CN.MODEL.COARSE.D_FFN = 256 |
|
_CN.MODEL.COARSE.NHEAD = 8 |
|
_CN.MODEL.COARSE.LAYER_NAMES = ["seed", "seed", "seed", "seed", "seed"] |
|
_CN.MODEL.COARSE.ATTENTION = "linear" |
|
_CN.MODEL.COARSE.TEMP_BUG_FIX = True |
|
_CN.MODEL.COARSE.N_TOPICS = 100 |
|
_CN.MODEL.COARSE.N_SAMPLES = 6 |
|
_CN.MODEL.COARSE.N_TOPIC_TRANSFORMERS = 1 |
|
|
|
|
|
_CN.MODEL.MATCH_COARSE = CN() |
|
_CN.MODEL.MATCH_COARSE.THR = 0.2 |
|
_CN.MODEL.MATCH_COARSE.BORDER_RM = 2 |
|
_CN.MODEL.MATCH_COARSE.MATCH_TYPE = "dual_softmax" |
|
_CN.MODEL.MATCH_COARSE.DSMAX_TEMPERATURE = 0.1 |
|
_CN.MODEL.MATCH_COARSE.TRAIN_COARSE_PERCENT = 0.2 |
|
_CN.MODEL.MATCH_COARSE.TRAIN_PAD_NUM_GT_MIN = 200 |
|
_CN.MODEL.MATCH_COARSE.SPARSE_SPVS = True |
|
|
|
|
|
_CN.MODEL.FINE = CN() |
|
_CN.MODEL.FINE.D_MODEL = 128 |
|
_CN.MODEL.FINE.D_FFN = 128 |
|
_CN.MODEL.FINE.NHEAD = 4 |
|
_CN.MODEL.FINE.LAYER_NAMES = ["cross"] * 1 |
|
_CN.MODEL.FINE.ATTENTION = "linear" |
|
_CN.MODEL.FINE.N_TOPICS = 1 |
|
|
|
|
|
|
|
_CN.MODEL.LOSS = CN() |
|
_CN.MODEL.LOSS.COARSE_WEIGHT = 1.0 |
|
|
|
|
|
_CN.MODEL.LOSS.FOCAL_ALPHA = 0.25 |
|
_CN.MODEL.LOSS.POS_WEIGHT = 1.0 |
|
_CN.MODEL.LOSS.NEG_WEIGHT = 1.0 |
|
|
|
|
|
|
|
|
|
_CN.MODEL.LOSS.FINE_TYPE = "l2_with_std" |
|
_CN.MODEL.LOSS.FINE_WEIGHT = 1.0 |
|
_CN.MODEL.LOSS.FINE_CORRECT_THR = 1.0 |
|
|
|
|
|
|
|
_CN.DATASET = CN() |
|
|
|
|
|
_CN.DATASET.TRAINVAL_DATA_SOURCE = None |
|
_CN.DATASET.TRAIN_DATA_ROOT = None |
|
_CN.DATASET.TRAIN_POSE_ROOT = None |
|
_CN.DATASET.TRAIN_NPZ_ROOT = None |
|
_CN.DATASET.TRAIN_LIST_PATH = None |
|
_CN.DATASET.TRAIN_INTRINSIC_PATH = None |
|
_CN.DATASET.VAL_DATA_ROOT = None |
|
_CN.DATASET.VAL_POSE_ROOT = None |
|
_CN.DATASET.VAL_NPZ_ROOT = None |
|
_CN.DATASET.VAL_LIST_PATH = ( |
|
None |
|
) |
|
_CN.DATASET.VAL_INTRINSIC_PATH = None |
|
|
|
_CN.DATASET.TEST_DATA_SOURCE = None |
|
_CN.DATASET.TEST_DATA_ROOT = None |
|
_CN.DATASET.TEST_POSE_ROOT = None |
|
_CN.DATASET.TEST_NPZ_ROOT = None |
|
_CN.DATASET.TEST_LIST_PATH = ( |
|
None |
|
) |
|
_CN.DATASET.TEST_INTRINSIC_PATH = None |
|
_CN.DATASET.TEST_IMGSIZE = None |
|
|
|
|
|
|
|
_CN.DATASET.MIN_OVERLAP_SCORE_TRAIN = ( |
|
0.4 |
|
) |
|
_CN.DATASET.MIN_OVERLAP_SCORE_TEST = 0.0 |
|
_CN.DATASET.AUGMENTATION_TYPE = None |
|
|
|
|
|
_CN.DATASET.MGDPT_IMG_RESIZE = ( |
|
640 |
|
) |
|
_CN.DATASET.MGDPT_IMG_PAD = True |
|
_CN.DATASET.MGDPT_DEPTH_PAD = True |
|
_CN.DATASET.MGDPT_DF = 8 |
|
|
|
|
|
_CN.TRAINER = CN() |
|
_CN.TRAINER.WORLD_SIZE = 1 |
|
_CN.TRAINER.CANONICAL_BS = 64 |
|
_CN.TRAINER.CANONICAL_LR = 6e-3 |
|
_CN.TRAINER.SCALING = None |
|
_CN.TRAINER.FIND_LR = False |
|
|
|
|
|
_CN.TRAINER.OPTIMIZER = "adamw" |
|
_CN.TRAINER.TRUE_LR = None |
|
_CN.TRAINER.ADAM_DECAY = 0.0 |
|
_CN.TRAINER.ADAMW_DECAY = 0.01 |
|
|
|
|
|
_CN.TRAINER.WARMUP_TYPE = "linear" |
|
_CN.TRAINER.WARMUP_RATIO = 0.0 |
|
_CN.TRAINER.WARMUP_STEP = 4800 |
|
|
|
|
|
_CN.TRAINER.SCHEDULER = "MultiStepLR" |
|
_CN.TRAINER.SCHEDULER_INTERVAL = "epoch" |
|
_CN.TRAINER.MSLR_MILESTONES = [3, 6, 9, 12] |
|
_CN.TRAINER.MSLR_GAMMA = 0.5 |
|
_CN.TRAINER.COSA_TMAX = 30 |
|
_CN.TRAINER.ELR_GAMMA = 0.999992 |
|
|
|
|
|
_CN.TRAINER.ENABLE_PLOTTING = True |
|
_CN.TRAINER.N_VAL_PAIRS_TO_PLOT = 32 |
|
_CN.TRAINER.PLOT_MODE = "evaluation" |
|
_CN.TRAINER.PLOT_MATCHES_ALPHA = "dynamic" |
|
|
|
|
|
_CN.TRAINER.EPI_ERR_THR = ( |
|
5e-4 |
|
) |
|
_CN.TRAINER.POSE_GEO_MODEL = "E" |
|
_CN.TRAINER.POSE_ESTIMATION_METHOD = "RANSAC" |
|
_CN.TRAINER.RANSAC_PIXEL_THR = 0.5 |
|
_CN.TRAINER.RANSAC_CONF = 0.99999 |
|
_CN.TRAINER.RANSAC_MAX_ITERS = 10000 |
|
_CN.TRAINER.USE_MAGSACPP = False |
|
|
|
|
|
_CN.TRAINER.DATA_SAMPLER = ( |
|
"scene_balance" |
|
) |
|
|
|
_CN.TRAINER.N_SAMPLES_PER_SUBSET = 200 |
|
_CN.TRAINER.SB_SUBSET_SAMPLE_REPLACEMENT = ( |
|
True |
|
) |
|
_CN.TRAINER.SB_SUBSET_SHUFFLE = ( |
|
True |
|
) |
|
_CN.TRAINER.SB_REPEAT = 1 |
|
|
|
_CN.TRAINER.RDM_REPLACEMENT = True |
|
_CN.TRAINER.RDM_NUM_SAMPLES = None |
|
|
|
|
|
_CN.TRAINER.GRADIENT_CLIPPING = 0.5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_CN.TRAINER.SEED = 66 |
|
|
|
|
|
def get_cfg_defaults(): |
|
"""Get a yacs CfgNode object with default values for my_project.""" |
|
|
|
|
|
return _CN.clone() |
|
|