def METHOD_NAME(self, boxes=None, scores=None, threshold=0.2, img=None):
    if isinstance(boxes, np.ndarray):
        boxes = torch.tensor(boxes, device=self.device)
    elif torch.is_tensor(boxes):
        if self.device == 'cpu':
            boxes = boxes.cpu()
        elif self.device == 'cuda':
            boxes = boxes.cuda()
    if isinstance(scores, np.ndarray):
        scores = torch.tensor(scores, device=self.device)
    elif torch.is_tensor(scores):
        if self.device == 'cpu':
            scores = scores.cpu()
        elif self.device == 'cuda':
            scores = scores.cuda()
    scores = torch.transpose(scores, dim0=1, dim1=0)
    if self.cross_class:
        [boxes, classes, scores] = cc_fast_nms(boxes=boxes, scores=scores, iou_thres=self.iou_thres,
                                               top_k=self.top_k, post_k=self.post_k)
    else:
        [boxes, classes, scores] = fast_nms(boxes=boxes, scores=scores, iou_thres=self.iou_thres,
                                            top_k=self.top_k, post_k=self.post_k)
    keep_ids = torch.where(scores > threshold)
    scores = scores[keep_ids].cpu().numpy()
    classes = classes[keep_ids].cpu().numpy()
    boxes = boxes[keep_ids].cpu().numpy()
    bounding_boxes = BoundingBoxList([])
    for idx, box in enumerate(boxes):
        bbox = BoundingBox(left=box[0], top=box[1],
                           width=box[2] - box[0],
                           height=box[3] - box[1],
                           name=classes[idx],
                           score=scores[idx])
        bounding_boxes.data.append(bbox)
    return bounding_boxes, [boxes, classes, scores]