class_docstr: Area under per region overlap (AUPRO) Metric.
class_docstr_tok: ["Area","under","per","region","overlap","(","AUPRO",")","Metric","."]
code: def __init__(
      self,
      compute_on_step: bool = True,
      dist_sync_on_step: bool = False,
      process_group: Any | None = None,
      dist_sync_fn: Callable | None = None,
      fpr_limit: float = 0.3,
      num_thresholds: int | None = None,
  ) -> None:
      super().__init__(
          compute_on_step=compute_on_step,
          dist_sync_on_step=dist_sync_on_step,
          process_group=process_group,
          dist_sync_fn=dist_sync_fn,
      )
  
      self.add_state(
          "preds", default=[], dist_reduce_fx="cat"
      )  # pylint: disable=not-callable
      self.add_state(
          "target", default=[], dist_reduce_fx="cat"
      )  # pylint: disable=not-callable
      self.register_buffer("fpr_limit", torch.tensor(fpr_limit))
      self.num_thresholds = num_thresholds
  
imports: from __future__ import annotations
  from typing import Any, Callable
  import torch
  from matplotlib.figure import Figure
  from torch import Tensor
  from torchmetrics import Metric
  from torchmetrics.functional import auc
  from torchmetrics.functional.classification import binary_roc
  from torchmetrics.utilities.data import dim_zero_cat
  from anomalib.utils.metrics.pro import connected_components_cpu, connected_components_gpu
  from .binning import thresholds_between_0_and_1, thresholds_between_min_and_max
  from .plotting_utils import plot_figure
label_desc: Use image node_id 1 to create a new AUPRO object from inherited base classes: Metric with example: obj = AUPRO(compute_on_step, dist_sync_on_step, process_group, dist_sync_fn, fpr_limit, num_thresholds)