class_docstr: Base model for object detection with matching.
class_docstr_tok: ["Base","model","for","object","detection","with","matching","."]
docstr: Initializes detection model.
  
  Args:
    config: Hyper-parameter dictionary.
    dataset_meta_data: Dataset meta data specifies `target_is_onehot`, which
      must be True. The padding-objects have label 0. The first legitimate
      object has label 1, and so on.
docstr_tok: ["Initializes","detection","model",".","Args",":","config",":","Hyper-parameter","dictionary",".","dataset_meta_data",":","Dataset","meta","data","specifies","`","target_is_onehot","`",",","which","must","be","True",".","The","padding-objects","have","label","0",".","The","first","legitimate","object","has","label","1",",","and","so","on","."]
code: def __init__(
      self,
      config: Optional[ml_collections.ConfigDict],
      dataset_meta_data: Dict[str, Any],
  ):
      """Initializes detection model.
  
      Args:
        config: Hyper-parameter dictionary.
        dataset_meta_data: Dataset meta data specifies `target_is_onehot`, which
          must be True. The padding-objects have label 0. The first legitimate
          object has label 1, and so on.
      """
      super().__init__(config, dataset_meta_data)
      self.losses_and_metrics.append("boxes")
      if config is not None:
          self.loss_terms_weights["loss_bbox"] = config.bbox_loss_coef
          self.loss_terms_weights["loss_giou"] = config.giou_loss_coef
  
imports: import abc
  import functools
  from typing import Any, Callable, Dict, Optional, Tuple
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib import matchers
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import box_utils
  from scenic.model_lib.base_models import model_utils
  from scenic.projects.owl_vit import losses
label_desc: Use image node_id 1 to create a new ObjectDetectionModel object from inherited base classes: BaseModelWithMatching with example: obj = ObjectDetectionModel(config, dataset_meta_data)