samerkharboush@Samers-MBP SAR-MPS-OptunaNasFbnYoloTransformers % python submit_multilabel_ensemble.py configs/inference/1128_b5_b4_vs2_fliplr4.yaml
Traceback (most recent call last):
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/submit_multilabel_ensemble.py", line 187, in <module>
    Fire(main)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/fire/core.py", line 143, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/fire/core.py", line 477, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/opt/anaconda3/envs/sam3/lib/python3.9/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/submit_multilabel_ensemble.py", line 176, in main
    run_multilabel_predict(OmegaConf.load(config), data_dir=data_dir)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/submit_multilabel_ensemble.py", line 28, in run_multilabel_predict
    model, checkpoints, box_coder = ensemble_from_config(config, map_location=device)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/xview3/inference.py", line 266, in ensemble_from_config
    model, checkpoints = ensemble_from_checkpoints(
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/xview3/inference.py", line 223, in ensemble_from_checkpoints
    model, checkpoint = model_from_checkpoint(ck, strict=strict, map_location=map_location)
  File "/Users/samerkharboush/Downloads/SAR-MPS-OptunaNasFbnYoloTransformers/xview3/inference.py", line 155, in model_from_checkpoint
    raise KeyError("Missing key in model config:", k)
KeyError: ('Missing key in model config:', '_target_')
(sam3) samerkharboush@Samers-MBP SAR-MPS-OptunaNasFbnYoloTransformers % 


# 1128_b5_b4_vs2_fliplr4.yaml

num_classes: 8

ensemble:
  tta: fliplr
  activation_after: after_model
  softmax_outputs:
  sigmoid_outputs:
    - CENTERNET_OUTPUT_OBJECTNESS_MAP
    - CENTERNET_OUTPUT_VESSEL_MAP
    - CENTERNET_OUTPUT_FISHING_MAP
  with_offset: True
  models:
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211117_00_11_b4_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold1.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211117_10_52_b4_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold0.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211117_17_08_b4_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold2.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211118_00_30_b4_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold3.pth

    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211119_08_05_v2s_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold0.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211119_11_35_v2s_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold1.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211119_21_11_v2s_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold2.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211120_01_38_v2s_unet_s2_leaky_valid_4fold_rfl_soft_bce_mse_regularized_flips_light_medium_fold3.pth

    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211125_23_57_b5_unet_s2_full_4fold_circlenet_loss_flips_light_medium_fold0.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211126_16_53_b5_unet_s2_full_4fold_circlenet_loss_flips_light_medium_fold1.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211127_02_14_b5_unet_s2_full_4fold_circlenet_loss_flips_light_medium_fold2.pth
    - https://github.com/BloodAxe/xView3-The-First-Place-Solution/releases/download/1.0/211127_09_29_b5_unet_s2_full_4fold_circlenet_loss_flips_light_medium_fold3.pth

inference:
  channels_last: False
  use_traced_model: True
  tile_size: 2048
  tile_step: 1536
  accumulate_on_gpu: False
  batch_size: 1
  fp16: True

thresholds:
  - objectness: 0.300
    is_vessel: 0.338
    is_fishing: 0.350

evaluation:
  objectness_thresholds:
    - 0.35
    - 0.36
    - 0.37
    - 0.38
    - 0.39
    - 0.40
    - 0.41
    - 0.42
    - 0.43
    - 0.44
    - 0.45
    - 0.46
    - 0.47
    - 0.48
    - 0.49
    - 0.50
    - 0.51
    - 0.52
    - 0.53
    - 0.54
    - 0.55
    - 0.56
    - 0.57
    - 0.58
    - 0.59
    - 0.60

submission_dir: submissions/1128_b5_b4_vs2_fliplr

anchors:
  - [10, 13, 16, 30, 33, 23]
  - [30, 61, 62, 45, 59, 119]
  - [116, 90, 156, 198, 373, 326]

channels:
  - vv
  - vh
  - diff(vv,vh)
  - mean(vv,vh)
  - bathymetry
  - wind_direction
  - wind_speed
  - mask

normalization:
  vv:
    _target_: xview3.SigmoidNormalization
    midpoint: -20.0
    temperature: 0.18
  vh:
    _target_: xview3.SigmoidNormalization
    midpoint: -20.0
    temperature: 0.18
  diff(vv,vh):
    _target_: xview3.SigmoidNormalization
    midpoint: -5.0
    temperature: 0.18
  mean(vv,vh):
    _target_: xview3.SigmoidNormalization
    midpoint: -20
    temperature: 0.18
  bathymetry:
    _target_: xview3.CubicRootNormalization
  wind_direction: null
  wind_speed: null
  mask: null

model:
  encoder:
    _target_: pytorch_toolbelt.modules.encoders.TimmB4Encoder
    pretrained: true
    activation: silu
    layers:
      - 2
      - 4
      - 6
      - 8
    conv_stem:
      in_channels: 8
  decoder:
    upsample_type: shuffle
    block_type: IRBlock
    channels:
      - 256
      - 384
      - 512
  head:
    - type: DecoupledHeadGroupNormLateShuffle
      _target_: xview3.centernet.models.heads.DecoupledHeadGroupNormLateShuffle
      channels: 256 
      classifier_dim: 128
      objectness_dim: 128
      size_dim: 64
      offset_dim: 16
      dropout_rate: 0.1
      activation: silu
      num_blocks: 3
    - type: YOLOHead
      _target_: xview3.centernet.models.heads.yolo_head.YOLOHead
      num_classes: 32
      channels: 256 
      anchors: [[10, 13], [16, 30], [33, 23]]

  box_coder:
    _target_: xview3.centernet.MultilabelCircleNetCoder
    image_size:
      - 1024
      - 1024
    max_objects: 512
    heatmap_encoding: umich
    labels_encoding: circle
    ignore_value:
      _target_: xview3.ignore_value
    fixed_radius: 3
    labels_radius: 1
    ignore_low_confidence_detections: true