def __init__(
        self,
        num_classes=1,
        metric_key="mAP",
        output_type="ssd",
        iou_threshold=0.5,
        confidence_threshold=0.5,
    ):
        """
        Args:
            num_classes (int): Number of classes.
                Default is ``1``.
            metric_key (str): name of a metric.
                Default is ``"mAP"``.
            output_type (str): model output type. Valid values are ``"ssd"`` or
                ``"centernet"`` or ``"yolo-x"``.
                Default is ``"ssd"``.
            iou_threshold (float): IoU threshold to use in NMS.
                Default is ``0.5``.
            confidence_threshold (float): confidence threshold,
                proposals with lover values than threshold will be ignored.
                Default is ``0.5``.
        """
        super().__init__(order=CallbackOrder.Metric)
        assert output_type in ("ssd", "centernet", "yolo-x")

        self.num_classes = num_classes
        self.metric_key = metric_key
        self.output_type = output_type
        self.iou_threshold = iou_threshold
        self.confidence_threshold = confidence_threshold

        self.metric_fn = MetricBuilder.build_evaluation_metric(
            "map_2d", async_mode=False, num_classes=num_classes
        )

        Args:
            num_classes (int): Number of classes.
                Default is ``1``.
            metric_key (str): name of a metric.
                Default is ``"mAP"``.
            output_type (str): model output type. Valid values are ``"ssd"`` or
                ``"centernet"`` or ``"yolo-x"``.
                Default is ``"ssd"``.
            iou_threshold (float): IoU threshold to use in NMS.
                Default is ``0.5``.
            confidence_threshold (float): confidence threshold,
                proposals with lover values than threshold will be ignored.
                Default is ``0.5``.
        
examples/detection/callbacks.py