def _nms_bb(self):
        """performs class agnostic nms over the bounding boxes
        """
        if self.nms:
            if len(self.boxes_xyxy) > 1:
                logger.debug(f"doing nms for {len(self.boxes_xyxy)} {self.n_postfilter} boxes...")
                self.scores_pt = torch.tensor(self.scores, dtype=torch.float32)
                
                self.inds = torchvision.ops.nms(torch.tensor(self.boxes_xyxy, dtype=torch.float32), 
                                                                    self.scores_pt.squeeze(), self.iou_thresh)
                
                self.boxes_xyxy =  [self.boxes_xyxy[ind] for ind in self.inds]
                self.scores =  [self.scores[ind] for ind in self.inds]
performs class agnostic nms over the bounding boxes
        
src/marqo/s2_inference/processing/image.py