class_docstr: An object detector model which can be trained using Model Maker's training API.
  
  Attributes:
    loss_trackers: List of tf.keras.metrics.Mean objects used to track the loss
      during training.
docstr: Initializes an ObjectDetectorModel.
  
  Args:
    model_spec: Specification for the model.
    model_options: Model options for creating the model.
    num_classes: Number of classes for object detection.
docstr_tok: ["Initializes","an","ObjectDetectorModel",".","Args",":","model_spec",":","Specification","for","the","model",".","model_options",":","Model","options","for","creating","the","model",".","num_classes",":","Number","of","classes","for","object","detection","."]
code: def __init__(
      self,
      model_spec: ms.ModelSpec,
      model_options: model_opt.ObjectDetectorModelOptions,
      num_classes: int,
  ) -> None:
      """Initializes an ObjectDetectorModel.
  
      Args:
        model_spec: Specification for the model.
        model_options: Model options for creating the model.
        num_classes: Number of classes for object detection.
      """
      super().__init__()
      self._model_spec = model_spec
      self._model_options = model_options
      self._num_classes = num_classes
      self._model = self._build_model()
      checkpoint_folder = self._model_spec.downloaded_files.get_path()
      checkpoint_file = os.path.join(
          checkpoint_folder, self._model_spec.checkpoint_name
      )
      self.load_checkpoint(checkpoint_file)
      self._model.summary()
      self.loss_trackers = [
          tf.keras.metrics.Mean(name=n)
          for n in ["total_loss", "cls_loss", "box_loss", "model_loss"]
      ]
  
imports: import os
  from typing import Mapping, Optional, Sequence, Union
  import tensorflow
  from mediapipe.model_maker.python.vision.object_detector import detection
  from mediapipe.model_maker.python.vision.object_detector import model_options
  from mediapipe.model_maker.python.vision.object_detector import model_spec
  from official.core import config_definitions
  from official.projects.qat.vision.configs import common
  from official.projects.qat.vision.modeling import factory
  from official.vision import configs
  from official.vision.losses import focal_loss
  from official.vision.losses import loss_utils
  from official.vision.modeling import factory
  from official.vision.modeling import retinanet_model
  from official.vision.modeling.layers import detection_generator
label_desc: Use image node_id 1 to create a new ObjectDetectorModel object from inherited base classes: tf.keras with example: obj = ObjectDetectorModel(model_spec, model_options, num_classes)