class_docstr: Extracts data in the format accepted by NmsFilteredVisualizer
class_docstr_tok: ["Extracts","data","in","the","format","accepted","by","NmsFilteredVisualizer"]
code: def __call__(self, instances: Instances, select=None):
      scores = extract_scores_from_instances(instances)
      boxes_xywh = extract_boxes_xywh_from_instances(instances)
      if boxes_xywh is None:
          return None
      select_local_idx = batched_nms(
          boxes_xywh,
          scores,
          torch.zeros(len(scores), dtype=torch.int32),
          iou_threshold=self.iou_threshold,
      ).squeeze()
      select_local = torch.zeros(
          len(boxes_xywh), dtype=torch.bool, device=boxes_xywh.device
      )
      select_local[select_local_idx] = True
      select = (
          select_local if select is None else (select & select_local)
      )
      return self.extractor(instances, select=select)
  
imports: import logging
  from typing import List, Optional, Sequence, Tuple
  import torch
  from detectron2.layers.nms import batched_nms
  from detectron2.structures.instances import Instances
  from densepose.converters import ToChartResultConverterWithConfidences
  from densepose.structures import DensePoseChartResultWithConfidences, DensePoseEmbeddingPredictorOutput
  from densepose.vis.bounding_box import BoundingBoxVisualizer, ScoredBoundingBoxVisualizer
  from densepose.vis.densepose_outputs_vertex import DensePoseOutputsVertexVisualizer
  from densepose.vis.densepose_results import DensePoseResultsVisualizer
  from .base import CompoundVisualizer
label_desc: Use image node_id 2 for calling the NmsFilteredExtractor obj's underlying member method code with example usage: obj.__call__(instances, select) and returns: self, None