code: def default_detection_configs():
      """Returns a default detection configs."""
      h = Config()
  
      # model name.
      h.name = "efficientdet-d1"
  
      # activation type: see activation_fn in utils.py.
      h.act_type = "swish"
  
      # input preprocessing parameters
      h.image_size = 640  # An integer or a string WxH such as 640x320.
      h.target_size = None
      h.input_rand_hflip = True
      h.jitter_min = 0.1
      h.jitter_max = 2.0
      h.grid_mask = False
  
      # dataset specific parameters
      h.num_classes = (
          91  # 1+ actual classes, 0 is reserved for background.
      )
  
      h.skip_crowd_during_training = True
      h.label_map = (
          "coco"  # a dict or a string of 'coco', 'voc', 'waymo'.
      )
      h.max_instances_per_image = 100  # Default to 100 for COCO.
  
      # model architecture
      h.min_level = 3
      h.max_level = 7
      h.num_scales = 3
      # ratio w/h: 2.0 means w=1.4, h=0.7. Can be computed with k-mean per dataset.
      h.aspect_ratios = [
          1.0,
          2.0,
          0.5,
      ]  # [[0.7, 1.4], [1.0, 1.0], [1.4, 0.7]]
      h.anchor_scale = 4.0
      # optimization
      h.momentum = 0.9
      h.optimizer = "sgd"  # can be 'adam' or 'sgd'.
      h.learning_rate = 0.08  # 0.008 for adam.
      h.lr_warmup_init = 0.008  # 0.0008 for adam.
      h.lr_warmup_epoch = 1.0
      h.first_lr_drop_epoch = 200.0
      h.second_lr_drop_epoch = 250.0
      h.poly_lr_power = 0.9
      h.clip_gradients_norm = 10.0
      h.data_format = "channels_last"
  
      # classification loss
      h.label_smoothing = 0.0  # 0.1 is a good default
      # Behold the focal loss parameters
      h.alpha = 0.25
      h.gamma = 1.5
  
      # localization loss
      h.delta = 0.1  # regularization parameter of huber loss.
      # total loss = box_loss * box_loss_weight + iou_loss * iou_loss_weight
      h.box_loss_weight = 50.0
      h.iou_loss_type = None
      h.iou_loss_weight = 1.0
  
      # regularization l2 loss.
      h.weight_decay = 4e-5
  
      # For detection.
      h.box_class_repeats = 3
      h.fpn_cell_repeats = 3
      h.fpn_num_filters = 88
      h.separable_conv = True
      h.apply_bn_for_resampling = True
      h.conv_after_downsample = False
      h.conv_bn_act_pattern = False
      h.drop_remainder = (
          True  # drop remainder for the final batch eval.
      )
  
      # For post-processing nms, must be a dict.
      h.nms_configs = {
          "method": "gaussian",
          "iou_thresh": None,  # use the default value based on method.
          "score_thresh": 0.0,
          "sigma": None,
          "max_nms_inputs": 0,
          "max_output_size": 100,
      }
  
      # version.
      h.fpn_name = None
      h.fpn_weight_method = None
      h.fpn_config = None
  
      # No stochastic depth in default.
      h.survival_prob = None
  
      h.lr_decay_method = "cosine"
  
      h.backbone_name = "efficientnet-b1"
      h.backbone_config = None
      h.var_freeze_expr = None
  
      # A temporary flag to switch between legacy and keras models.
      h.positives_momentum = None
      h.grad_checkpoint = False
  
      return h
  
imports: import ast
  import collections
  import copy
  from typing import Any, Dict, Text
  import six
  import tensorflow
  import yaml
label_desc: Use image node_id 2 for calling a global function with example usage: default_detection_configs() and returns: h