class_docstr: Changes DETR Evaluator bay assuming labels vary in label_id space.
class_docstr_tok: ["Changes","DETR","Evaluator","bay","assuming","labels","vary","in","label_id","space","."]
docstr: Initializes a DetectionEvaluator object.
docstr_tok: ["Initializes","a","DetectionEvaluator","object","."]
code: def __init__(
      self,
      annotations_loc: Optional[str] = None,
      threshold: float = 0.0,
      disable_output: bool = True,
  ):
      """Initializes a DetectionEvaluator object."""
      super().__init__(
          annotations_loc=annotations_loc,
          threshold=threshold,
          disable_output=disable_output,
      )
  
      # Just override the label map.
      max_id = max([c["id"] for c in self.coco.dataset["categories"]])
      # Just a mapping from 0-index to 1-index, to remove no-object label.
      self.label_to_coco_id = {i: i + 1 for i in range(max_id)}
  
file_path: scenic/scenic/projects/baselines/deformable_detr/coco_eval.py
imports: import copy
  from typing import Any, Callable, Dict, Optional, Tuple
  import jax
  import jax.numpy
  import numpy
  from scenic.dataset_lib.coco_dataset import coco_eval
  from scenic.model_lib.base_models import box_utils
  from scenic.projects.baselines.detr.train_utils import DetrGlobalEvaluator
  import scipy
label_desc: Use image node_id 1 to create a new DetectionEvaluator object from inherited base classes: coco_eval with example: obj = DetectionEvaluator(annotations_loc, threshold, disable_output)