class_docstr: Implementation of the ObjectSeeker certifiable robust defense applied to object detection models.
  The original implementation is https://github.com/inspire-group/ObjectSeeker
  
  | Paper link: https://arxiv.org/abs/2202.01811
class_docstr_tok: ["Implementation","of","the","ObjectSeeker","certifiable","robust","defense","applied","to","object","detection","models",".","The","original","implementation","is","https",":","\/\/github.com\/inspire-group\/ObjectSeeker","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/2202.01811"]
docstr: Remove bounding boxes from the masked predictions of a single image based on the IoA score with the boxes
  on the base unmasked predictions.
  
  :param masked_preds: The merged masked predictions of a single image.
  :param base_preds: The base unmasked predictions of a single image.
  :return: The filtered masked predictions with extraneous boxes removed.
docstr_tok: ["Remove","bounding","boxes","from","the","masked","predictions","of","a","single","image","based","on","the","IoA","score","with","the","boxes","on","the","base","unmasked","predictions",".",":","param","masked_preds",":","The","merged","masked","predictions","of","a","single","image",".",":","param","base_preds",":","The","base","unmasked","predictions","of","a","single","image",".",":","return",":","The","filtered","masked","predictions","with","extraneous","boxes","removed","."]
code: def _prune_boxes(
      self,
      masked_preds: Dict[str, np.ndarray],
      base_preds: Dict[str, np.ndarray],
  ) -> Dict[str, np.ndarray]:
      """
      Remove bounding boxes from the masked predictions of a single image based on the IoA score with the boxes
      on the base unmasked predictions.
  
      :param masked_preds: The merged masked predictions of a single image.
      :param base_preds: The base unmasked predictions of a single image.
      :return: The filtered masked predictions with extraneous boxes removed.
      """
      masked_boxes = masked_preds["boxes"]
      masked_labels = masked_preds["labels"]
      masked_scores = masked_preds["scores"]
  
      base_boxes = base_preds["boxes"]
      base_labels = base_preds["labels"]
  
      keep_indices = []
      for idx, (masked_box, masked_label) in enumerate(
          zip(masked_boxes, masked_labels)
      ):
          keep = True
          for base_box, base_label in zip(base_boxes, base_labels):
              if masked_label == base_label:
                  ioa = intersection_over_area(masked_box, base_box)
                  if ioa >= self.prune_threshold:
                      keep = False
                      break
  
          if keep:
              keep_indices.append(idx)
  
      pruned_preds = {
          "boxes": masked_boxes[keep_indices],
          "labels": masked_labels[keep_indices],
          "scores": masked_scores[keep_indices],
      }
      return pruned_preds
  
file_path: adversarial-robustness-toolbox/art/estimators/certification/object_seeker/object_seeker.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import abc
  import logging
  from typing import Dict, List, Tuple
  import numpy
  from sklearn.cluster import DBSCAN
  from tqdm.auto import tqdm
  from art.utils import intersection_over_area, non_maximum_suppression
label_desc: Use image node_id 7 for calling the ObjectSeekerMixin obj's underlying member method code with example usage: obj._prune_boxes(masked_preds, base_preds) and returns: pruned_preds