_target_: xview3.centernet.models.CenterNetUNetModel.from_config
config:
  slug: b5_unet_s2
  activation: silu
  num_channels: ${dataset.num_channels}
  num_extra_blocks: 0
  model:
    _target_: xview3.centernet.models.centernet_unet.model_factory.create_centernet_unet_model
    model_name: resnet50
    weights: IMAGENET1K_V1
    pretrained: True
    output_stride: 32
    decoder:
      _target_: xview3.centernet.models.custom_encoder.DebugUNetDecoder
      encoder_channels: [32, 24, 40, 112, 320]  
      decoder_channels: [512, 384, 256, 128, 64]
      unet_block:
        _target_: xview3.centernet.models.unet_blocks.UnetBlock
        _partial_: true
      upsample_block:
        _target_: torch.nn.Upsample
        scale_factor: 2
        mode: bilinear
    nas:
      enabled: true
      search_space:
        num_layers: [2, 5]         
        num_filters: [64, 128, 256] 
        kernel_size: [3, 5]       
        activation: [relu, leaky_relu]  
        dropout_rate_max: 0.5      
      num_trials: 50              
    num_channels: 2
    num_classes: 2
    anchors: [[10, 13], [16, 30], [33, 23]]
    input_upsample_factor: 1
    neck_out_channels: 256
  encoder:
    model_name: swin_large_patch4_window7_224
    in_chans: 2
    features_only: true
    weights: None 
    pretrained: True
    activation: silu
    layers:
      - 1 # 4
      - 2 # 8
      - 3 # 16
      - 4 # 32
  heads:
    - _target_: xview3.centernet.models.heads.DecoupledHeadGroupNormLateShuffle
      channels: 256
      classifier_dim: 128
      objectness_dim: 128
      size_dim: 128
      offset_dim: 16
      dropout_rate: 0.1
      activation: silu
      num_blocks: 3
    - _target_: xview3.centernet.models.heads.yolo_head.YOLOHead
      num_classes: 2
      anchors: [[10, 13], [16, 30], [33, 23]]
      input_image_size: [640, 640]
      stride: 32
    activation: silu
    num_extra_blocks: 0

  yolo:
    enabled: true
    loss_weight: 1.0

  transformer:
    enabled: true
    loss_weight: 1.0

  train:
    slug: default_training 
    epochs: 4
    output_stride: 32
    early_stopping: 2

  torch:
    amp:
      enabled: false  
    cudnn:
      allow_tf32: True
    cuda_allow_tf32: True
    detect_anomaly: False
    deterministic: False
    benchmark: True

    activation_after: "after_model"
    tta: "d4"
    with_offset: True
    yolo_decoders: [] 

  hydra:
    output_subdir: null
    run:
      dir: .
    sweep:
      dir: .
      subdir: .

  augs:
    spatial:
      - albumentations.HorizontalFlip
      - albumentations.VerticalFlip
    individual:
      vv0:
        _target_: xview3.augmentations.unclipped_random_brightness.UnclippedRandomBrightnessContrast
        always_apply: false
        p: 0.5
    slug: flips_light 

  normalization:
    channels:
      vv:
        _target_: xview3.SigmoidNormalization
        midpoint: -20.0
        temperature: 0.18
      vh:
        _target_: xview3.SigmoidNormalization
        midpoint: -20.0
        temperature: 0.18
      bathymetry:
        _target_: xview3.CubicRootNormalization
      wind_direction:
        _target_: albumentations.NoOp
      wind_speed:
        _target_: albumentations.NoOp
      mask:
        _target_: albumentations.NoOp

  dataset:
    _target_: xview3.centernet.multilabel_dataset.MultilabelCircleNetDataModule
    data_dir: full_4fold
    normalization:
      mean: [0.485, 0.456, 0.406]
      std: [0.229, 0.224, 0.225]
    slug: full_4fold 
    splitter: full_4fold
    fold: 0
    num_folds: 4

  input_channels:
  - vh
  - vv

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: ${dataset.ignore_low_confidence_detections}