class_docstr: Object Detection Confusion matrix plot.
code: def _confusion_matrix_plot(
      self,
      num_thresholds: int = DEFAULT_NUM_THRESHOLDS,
      name: str = CONFUSION_MATRIX_PLOT_NAME,
      eval_config: Optional[config_pb2.EvalConfig] = None,
      model_name: str = "",
      output_name: str = "",
      iou_threshold: Optional[float] = None,
      class_id: Optional[int] = None,
      class_weight: Optional[float] = None,
      area_range: Optional[Tuple[float, float]] = None,
      max_num_detections: Optional[int] = None,
      labels_to_stack: Optional[List[str]] = None,
      predictions_to_stack: Optional[List[str]] = None,
      num_detections_key: Optional[str] = None,
      allow_missing_key: bool = False,
      example_weighted: bool = False,
      **kwargs,
  ) -> metric_types.MetricComputations:
      metric_util.validate_object_detection_arguments(
          class_id=class_id,
          class_weight=class_weight,
          area_range=area_range,
          max_num_detections=max_num_detections,
          labels_to_stack=labels_to_stack,
          predictions_to_stack=predictions_to_stack,
          output_name=output_name,
      )
  
      key = metric_types.PlotKey(
          name=name,
          model_name=model_name,
          output_name=output_name,
          sub_key=metric_types.SubKey(class_id=class_id),
          example_weighted=example_weighted,
      )
  
      preprocessor = preprocessors.BoundingBoxMatchPreprocessor(
          class_id=class_id,
          iou_threshold=iou_threshold,
          area_range=area_range,
          max_num_detections=max_num_detections,
          class_weight=class_weight,
          labels_to_stack=labels_to_stack,
          predictions_to_stack=predictions_to_stack,
          num_detections_key=num_detections_key,
          allow_missing_key=allow_missing_key,
          model_name=model_name,
      )
  
      return super()._confusion_matrix_plot(
          num_thresholds=num_thresholds,
          name=name,
          eval_config=eval_config,
          model_name=model_name,
          output_name=output_name,
          preprocessors=[preprocessor],
          plot_key=key,
          example_weighted=example_weighted,
          **kwargs,
      )
  
file_path: model-analysis/tensorflow_model_analysis/metrics/object_detection_confusion_matrix_plot.py
imports: from typing import List, Optional, Tuple
  from tensorflow_model_analysis.metrics import confusion_matrix_plot
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.metrics import preprocessors
  from tensorflow_model_analysis.proto import config_pb2
label_desc: Use image node_id 2 for calling the ObjectDetectionConfusionMatrixPlot obj's underlying member method code with example usage: obj._confusion_matrix_plot(num_thresholds, name, eval_config, model_name, output_name, iou_threshold, class_id, class_weight, area_range, max_num_detections, labels_to_stack, predictions_to_stack, num_detections_key, allow_missing_key, example_weighted) and returns: super