AMP_VERBOSE: false
DATALOADER:
  ASPECT_RATIO_GROUPING: true
  NUM_WORKERS: 4
  SIZE_DIVISIBILITY: 32
DATASETS:
  LOAD_PRECOMPUTE_DETECTION_BOX: false
  TEST:
  - VG_stanford_filtered_with_attribute_test
  TRAIN:
  - VG_stanford_filtered_with_attribute_train
  VAL:
  - VG_stanford_filtered_with_attribute_val
DEBUG: false
DTYPE: float32
EXPERIMENT_NAME: BGNN-3-3-learnable_scaling
GLOBAL_BUFFER_ON: false
GLOVE_DIR: datasets/vg/stanford_spilt/glove
INPUT:
  BRIGHTNESS: 0.0
  CONTRAST: 0.0
  HUE: 0.0
  MAX_SIZE_TEST: 1000
  MAX_SIZE_TRAIN: 1000
  MIN_SIZE_TEST: 600
  MIN_SIZE_TRAIN:
  - 600
  PIXEL_MEAN:
  - 102.9801
  - 115.9465
  - 122.7717
  PIXEL_STD:
  - 1.0
  - 1.0
  - 1.0
  SATURATION: 0.0
  TO_BGR255: true
  VERTICAL_FLIP_PROB_TRAIN: 0.0
MODEL:
  TWO_STAGE_ON: true
  TWO_STAGE_HEAD:
    loss_distribution: true
    PURE_SENMENTIC: true
    USE_GLOVE: true #只有在PURE_SEMENTIC为TRUE才起效
    INDIVIDUAL_BOX: false
    UNION_BOX: false  #union和indi不能同时为true
    transformer_pos: false
    HIDDEN_DIM: 1024
    PREDICTOR: TwoStagePredictor
    NUM_REL_GROUP: 50
    BATCH_SIZE_PER_IMAGE: 1000
    POSITIVE_FRACTION: 1
    LOSS_TYPE: 'cos_loss' # 仅在loss_dist为true时成立
  ATTRIBUTE_ON: false
  BACKBONE:
    CONV_BODY: R-101-FPN
    FREEZE_CONV_BODY_AT: 2
  CLS_AGNOSTIC_BBOX_REG: false
  DEVICE: cuda
  FBNET:
    ARCH: default
    ARCH_DEF: ''
    BN_TYPE: bn
    DET_HEAD_BLOCKS: []
    DET_HEAD_LAST_SCALE: 1.0
    DET_HEAD_STRIDE: 0
    DW_CONV_SKIP_BN: true
    DW_CONV_SKIP_RELU: true
    KPTS_HEAD_BLOCKS: []
    KPTS_HEAD_LAST_SCALE: 0.0
    KPTS_HEAD_STRIDE: 0
    MASK_HEAD_BLOCKS: []
    MASK_HEAD_LAST_SCALE: 0.0
    MASK_HEAD_STRIDE: 0
    RPN_BN_TYPE: ''
    RPN_HEAD_BLOCKS: 0
    SCALE_FACTOR: 1.0
    WIDTH_DIVISOR: 1
  FLIP_AUG: false
  FPN:
    USE_GN: false
    USE_RELU: false
  GROUP_NORM:
    DIM_PER_GP: -1
    EPSILON: 1.0e-05
    NUM_GROUPS: 32
  KEYPOINT_ON: false
  MASK_ON: false
  META_ARCHITECTURE: GeneralizedRCNN
  PRETRAINED_DETECTOR_CKPT: checkpoints/detection/pretrained_faster_rcnn/vg_faster_det.pth
#  PRETRAINED_DETECTOR_CKPT: checkpoints/predcls-BGNNPredictor/2st_dist_cos/model_0018000.pth /0  checkpoints/predcls-BGNNPredictor/2st_dist_cos_unionobjfution_matrix/model_0000800.pth
  RELATION_ON: true
  RESNETS:
    BACKBONE_OUT_CHANNELS: 256
    DEFORMABLE_GROUPS: 1
    NUM_GROUPS: 32
    RES2_OUT_CHANNELS: 256
    RES5_DILATION: 1
    STAGE_WITH_DCN:
    - false
    - false
    - false
    - false
    STEM_FUNC: StemWithFixedBatchNorm
    STEM_OUT_CHANNELS: 64
    STRIDE_IN_1X1: false
    TRANS_FUNC: BottleneckWithFixedBatchNorm
    WIDTH_PER_GROUP: 8
    WITH_MODULATED_DCN: false
  RETINANET:
    ANCHOR_SIZES:
    - 32
    - 64
    - 128
    - 256
    - 512
    ANCHOR_STRIDES:
    - 8
    - 16
    - 32
    - 64
    - 128
    ASPECT_RATIOS:
    - 0.5
    - 1.0
    - 2.0
    BBOX_REG_BETA: 0.11
    BBOX_REG_WEIGHT: 4.0
    BG_IOU_THRESHOLD: 0.4
    FG_IOU_THRESHOLD: 0.5
    INFERENCE_TH: 0.05
    LOSS_ALPHA: 0.25
    LOSS_GAMMA: 2.0
    NMS_TH: 0.4
    NUM_CLASSES: 81
    NUM_CONVS: 4
    OCTAVE: 2.0
    PRE_NMS_TOP_N: 1000
    PRIOR_PROB: 0.01
    SCALES_PER_OCTAVE: 3
    STRADDLE_THRESH: 0
    USE_C5: true
  RETINANET_ON: false
  ROI_ATTRIBUTE_HEAD:
    ATTRIBUTE_BGFG_RATIO: 3
    ATTRIBUTE_BGFG_SAMPLE: true
    ATTRIBUTE_LOSS_WEIGHT: 1.0
    FEATURE_EXTRACTOR: FPN2MLPFeatureExtractor
    MAX_ATTRIBUTES: 10
    NUM_ATTRIBUTES: 201
    POS_WEIGHT: 50.0
    PREDICTOR: FPNPredictor
    SHARE_BOX_FEATURE_EXTRACTOR: true
    USE_BINARY_LOSS: true
  ROI_BOX_HEAD:
    CONV_HEAD_DIM: 256
    DILATION: 1
    FEATURE_EXTRACTOR: FPN2MLPFeatureExtractor
    MLP_HEAD_DIM: 4096
    NUM_CLASSES: 151
    NUM_STACKED_CONVS: 4
    POOLER_RESOLUTION: 7
    POOLER_SAMPLING_RATIO: 2
    POOLER_SCALES:
    - 0.25
    - 0.125
    - 0.0625
    - 0.03125
    PREDICTOR: FPNPredictor
    USE_GN: false
  ROI_HEADS:
    BATCH_SIZE_PER_IMAGE: 256
    BBOX_REG_WEIGHTS:
    - 10.0
    - 10.0
    - 5.0
    - 5.0
    BG_IOU_THRESHOLD: 0.3
    DETECTIONS_PER_IMG: 80
    FG_IOU_THRESHOLD: 0.5
    NMS: 0.3
    NMS_FILTER_DUPLICATES: true
    POSITIVE_FRACTION: 0.5
    POST_NMS_PER_CLS_TOPN: 300
    SCORE_THRESH: 0.01
    USE_FPN: true
  ROI_KEYPOINT_HEAD:
    CONV_LAYERS:
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    - 512
    FEATURE_EXTRACTOR: KeypointRCNNFeatureExtractor
    MLP_HEAD_DIM: 1024
    NUM_CLASSES: 17
    POOLER_RESOLUTION: 14
    POOLER_SAMPLING_RATIO: 0
    POOLER_SCALES: &id001
    - 0.0625
    PREDICTOR: KeypointRCNNPredictor
    RESOLUTION: 14
    SHARE_BOX_FEATURE_EXTRACTOR: true
  ROI_MASK_HEAD:
    CONV_LAYERS:
    - 256
    - 256
    - 256
    - 256
    DILATION: 1
    FEATURE_EXTRACTOR: ResNet50Conv5ROIFeatureExtractor
    MLP_HEAD_DIM: 1024
    POOLER_RESOLUTION: 14
    POOLER_SAMPLING_RATIO: 0
    POOLER_SCALES: *id001
    POSTPROCESS_MASKS: false
    POSTPROCESS_MASKS_THRESHOLD: 0.5
    PREDICTOR: MaskRCNNC4Predictor
    RESOLUTION: 14
    SHARE_BOX_FEATURE_EXTRACTOR: true
    USE_GN: false
  ROI_RELATION_HEAD:
    use_possibility_merger: false
    ADD_GTBOX_TO_PROPOSAL_IN_TRAIN: true
    BATCH_SIZE_PER_IMAGE: 1000
    BGNN_MODULE:
      APPLY_GT: false
      EDGE_FEATURES_REPRESENTATION: union
      GATING_WITH_RELNESS_LOGITS: false
      GRAPH_HIDDEN_DIM: 512
      GRAPH_ITERATION_NUM: 3
      ITERATE_MP_PAIR_REFINE: 3
      LEARNABLE_SCALING_WEIGHT:
      - 3.12
      - 0.06
      MP_ON_VALID_PAIRS: true
      MP_VALID_PAIRS_NUM: 128
      RELATION_CONFIDENCE_AWARE: true
      RELNESS_MP_WEIGHTING: true
      RELNESS_MP_WEIGHTING_SCORE_RECALIBRATION_METHOD: learnable_scaling
      SHARE_PARAMETERS_EACH_ITER: false
      SHARE_RELATED_MODEL_ACROSS_REFINE_ITER: false
      SKIP_CONNECTION_ON_OUTPUT: false
      SPLIT_GRAPH4OBJ_REL: false
    BODY_CATE_DROP_RATE: 1.0
    BODY_REPEAT_FACTOR: 0.018
    CAUSAL:
      AUXILIARY_LOSS: true
      CONTEXT_LAYER: bgnn
      EFFECT_ANALYSIS: true
      EFFECT_TYPE: TDE
      FUSION_TYPE: sum
      OBJ_PAIR_LABEL_FREQUENCY_BIAS_BRANCH: true
      SEPARATE_SPATIAL: false
      SPATIAL_FOR_VISION: true
    CLASSIFIER: linear
    CLASSIFIER_WEIGHT_SCALE: false #没用上
    CONTEXT_DROPOUT_RATE: 0.2
    CONTEXT_HIDDEN_DIM: 512
    CONTEXT_OBJ_LAYER: 2
    CONTEXT_POOLING_DIM: 2048
    CONTEXT_REL_LAYER: 4
    DATA_RESAMPLING: true
    DATA_RESAMPLING_METHOD: bilvl
    DATA_RESAMPLING_PARAM:
      INSTANCE_DROP_RATE: 1.2
      REPEAT_DICT_DIR: ''
      REPEAT_FACTOR: 0.13
    EDGE_FEATURES_REPRESENTATION: union
    EMBED_DIM: 200
    EVALUATE_REL_PROPOSAL: true
    FEATURE_EXTRACTOR: RelationFeatureExtractor
    FIX_CLASSIFIER_WEIGHT: false
    FIX_FEATURE: false
    FREQUENCY_BAIS: true
    GEOMETRIC_FEATURES: true
    GPSNET_MODULE:
      GRAPH_HIDDEN_DIM: 512
      GRAPH_ITERATION_NUM: 2
      ITERATE_MP_PAIR_REFINE: 2
      MP_ON_VALID_PAIRS: false
      MP_VALID_PAIRS_NUM: 200
      RELNESS_MP_WEIGHTING: false
    GRCNN_MODULE:
      FEATURE_UPDATE_STEP: 2
      GRAPH_HIDDEN_DIM: 1024
      MP_ON_VALID_PAIRS: false
      MP_VALID_PAIRS_NUM: 200
      RELNESS_MP_WEIGHTING: false
      SCORES_UPDATE_STEP: 2
    HEAD_CATE_DROP_RATE: 0.5
    IMP_MODULE:
      EDGE_FEATURES_REPRESENTATION: union
      GRAPH_HIDDEN_DIM: 512
      GRAPH_ITERATION_NUM: 2
    KERN_MODULE:
      AVERAGE_GRAPH_SUMMARY: false
      FUSE_PAIRWISE_OBJ_FEATURES: false
      GRAPH_HIDDEN_DIM: 512
      INST_PRIOR_MATRIX_DIR: datasets/vg/stanford_spilt/kern_prior/obj_matrix.npy
      MESSAGE_PASSING_STEP: 3
      REL_PRIOR_MATRIX_DIR: datasets/vg/stanford_spilt/kern_prior/rel_matrix.npy
      STATISTICS_PRIOR_KNOWLEDGE: true
    LABEL_SMOOTHING_LOSS: false
    LONGTAIL_PART_DICT:
    - null
    - b
    - t
    - t
    - t
    - b
    - b
    - b
    - h
    - b
    - t
    - b
    - t
    - t
    - t
    - t
    - b
    - t
    - t
    - b
    - h
    - b
    - h
    - b
    - t
    - b
    - t
    - t
    - t
    - h
    - h
    - h
    - t
    - b
    - t
    - b
    - t
    - t
    - b
    - t
    - b
    - b
    - t
    - b
    - t
    - t
    - b
    - b
    - h
    - b
    - b
    MAX_PROPOSAL_PAIR: 4096
    MSDN_MODULE:
      APPLY_GT: false
      EDGE_FEATURES_REPRESENTATION: union
      GRAPH_HIDDEN_DIM: 512
      GRAPH_ITERATION_NUM: 3
      SHARE_PARAMETERS_EACH_ITER: true
    NUM_CLASSES: 51
    NUM_SAMPLE_PER_GT_REL: 4
    OBJECT_CLASSIFICATION_MANNER: replace
    OBJECT_CLASSIFICATION_REFINE: false
    POOLING_ALL_LEVELS: true
    POSITIVE_FRACTION: 0.25
    PREDICTOR: BGNNPredictor
    PREDICT_USE_BIAS: true
    PREDICT_USE_VISION: true
    RELATION_PROPOSAL_MODEL:
      EVAL_MODEL_AUC: false
      FIX_MODEL_AT_ITER: 3000
      FOCAL_LOSS_ALPHA: 0.2
      FOCAL_LOSS_GAMMA: 2.0
      IGNORE_FOREGROUND_BOXES_PAIRS: false
      METHOD: RelAwareRelFeature
      PAIR_NUMS_AFTER_FILTERING: 128
      PRETRAIN_ITER_RELNESS_MODULE: 2000
      PRETRAIN_RELNESS_MODULE: true
      PRE_CLSER_LOSS: focal_fgbg_norm
      REL_AWARE_PREDICTOR_TYPE: hybrid
      SET_ON: true
      USE_RELATEDNESS_FOR_PREDICTION_RANKING: false
      USE_SAME_LABEL_WITH_CLSER: false
      VISUAL_FEATURES_ON: true
    REL_OBJ_MULTI_TASK_LOSS: false
    REL_PROP:
    - 0.01858
    - 0.00057
    - 0.00051
    - 0.00109
    - 0.0015
    - 0.00489
    - 0.00432
    - 0.02913
    - 0.00245
    - 0.00121
    - 0.00404
    - 0.0011
    - 0.00132
    - 0.00172
    - 5.0e-05
    - 0.00242
    - 0.0005
    - 0.00048
    - 0.00208
    - 0.15608
    - 0.0265
    - 0.06091
    - 0.009
    - 0.00183
    - 0.00225
    - 0.0009
    - 0.00028
    - 0.00077
    - 0.04844
    - 0.08645
    - 0.31621
    - 0.00088
    - 0.00301
    - 0.00042
    - 0.00186
    - 0.001
    - 0.00027
    - 0.01012
    - 0.0001
    - 0.01286
    - 0.00647
    - 0.00084
    - 0.01077
    - 0.00132
    - 0.00069
    - 0.00376
    - 0.00214
    - 0.11424
    - 0.01205
    - 0.02958
    REMOVE_TAIL_CLASSES: false
    REPEAT_DICT: ''
    REPEAT_FACTOR: 0.02
    REQUIRE_BOX_OVERLAP: false
    RE_INITIALIZE_CLASSIFIER: false
    TAIL_REPEAT_FACTOR: 0.07
    TRANSFORMER:
      DROPOUT_RATE: 0.1
      INNER_DIM: 2048
      KEY_DIM: 64
      NUM_HEAD: 8
      OBJ_LAYER: 4
      REL_LAYER: 1
      VAL_DIM: 64
    USE_BINARY_LOSS: false
    USE_GT_BOX: true
    USE_GT_OBJECT_LABEL: true
    USE_GT_OBJ_LABEL_FOR_EMBEDDING: false #没用
    WORD_EMBEDDING_FEATURES: true
    VISUAL_LANGUAGE_MERGER_EDGE: false
    VISUAL_LANGUAGE_MERGER_OBJ: false
  RPN:
    ANCHOR_SIZES:
    - 32
    - 64
    - 128
    - 256
    - 512
    ANCHOR_STRIDE:
    - 4
    - 8
    - 16
    - 32
    - 64
    ASPECT_RATIOS:
    - 0.23232838
    - 0.63365731
    - 1.28478321
    - 3.15089189
    BATCH_SIZE_PER_IMAGE: 256
    BG_IOU_THRESHOLD: 0.3
    FG_IOU_THRESHOLD: 0.7
    FPN_POST_NMS_PER_BATCH: false
    FPN_POST_NMS_TOP_N_TEST: 1000
    FPN_POST_NMS_TOP_N_TRAIN: 1000
    MIN_SIZE: 0
    NMS_THRESH: 0.7
    POSITIVE_FRACTION: 0.5
    POST_NMS_TOP_N_TEST: 1000
    POST_NMS_TOP_N_TRAIN: 1000
    PRE_NMS_TOP_N_TEST: 6000
    PRE_NMS_TOP_N_TRAIN: 6000
    RPN_HEAD: SingleConvRPNHead
    RPN_MID_CHANNEL: 256
    STRADDLE_THRESH: 0
    USE_FPN: true
  RPN_ONLY: false
  VGG:
    VGG16_OUT_CHANNELS: 512
  WEIGHT: catalog://ImageNetPretrained/FAIR/20171220/X-101-32x8d
OUTPUT_DIR: checkpoints
PATHS_CATALOG: pysgg/config/paths_catalog.py
PATHS_DATA: pysgg/config/../data/datasets
SOLVER:
  BASE_LR: 0.008
  BIAS_LR_FACTOR: 1
  CHECKPOINT_PERIOD: 4000
  CLIP_NORM: 5.0
  GAMMA: 0.5
  GRAD_NORM_CLIP: 5.0
  IMS_PER_BATCH: 9
  MAX_ITER: 70000
  MOMENTUM: 0.9
  PRE_VAL: false
  PRINT_GRAD_FREQ: 4000
  SCHEDULE:
    COOLDOWN: 0
    FACTOR: 0.8
    MAX_DECAY_STEP: 400
    PATIENCE: 4
    THRESHOLD: 0.001
    TYPE: WarmupReduceLROnPlateau
  STEPS:
  - 40000
  TO_VAL: true
  UPDATE_SCHEDULE_DURING_LOAD: false
  VAL_PERIOD: 2000
  WARMUP_FACTOR: 0.1
  WARMUP_ITERS: 500
  WARMUP_METHOD: linear
  WEIGHT_DECAY: 1.0e-05
  WEIGHT_DECAY_BIAS: 0.0
TEST:
  ALLOW_LOAD_FROM_CACHE: false
  BBOX_AUG:
    ENABLED: false
    H_FLIP: false
    MAX_SIZE: 4000
    SCALES: []
    SCALE_H_FLIP: false
  DETECTIONS_PER_IMG: 80
  EXPECTED_RESULTS: []
  EXPECTED_RESULTS_SIGMA_TOL: 4
  IMS_PER_BATCH: 3
  RELATION:
    IOU_THRESHOLD: 0.5
    LATER_NMS_PREDICTION_THRES: 0.5
    MULTIPLE_PREDS: false
    REQUIRE_OVERLAP: false
    SYNC_GATHER: true
  SAVE_PROPOSALS: false
