code: def _post_process(
      self,
      outputs: np.ndarray,
      input_shape: Tuple[int, int],
      image_shape: Tuple[int, int],
  ) -> List[torch.Tensor]:
      image_h, image_w = image_shape
      input_w, input_h = input_shape
  
      predictions = np.squeeze(outputs[0]).T
  
      # Filter out object confidence scores below threshold
      scores = np.max(predictions[:, 4:], axis=1)
      predictions = predictions[scores > self.confidence_threshold, :]
      scores = scores[scores > self.confidence_threshold]
      class_ids = np.argmax(predictions[:, 4:], axis=1)
  
      boxes = predictions[:, :4]
  
      # Scale boxes to original dimensions
      input_shape = np.array([input_w, input_h, input_w, input_h])
      boxes = np.divide(boxes, input_shape, dtype=np.float32)
      boxes *= np.array([image_w, image_h, image_w, image_h])
      boxes = boxes.astype(np.int32)
  
      # Convert from xywh two xyxy
      boxes = xywh2xyxy(boxes).round().astype(np.int32)
  
      # Perform non-max supressions
      indices = non_max_supression(boxes, scores, self.iou_threshold)
  
      # Format the results
      prediction_result = []
      for bbox, score, label in zip(
          boxes[indices], scores[indices], class_ids[indices]
      ):
          bbox = bbox.tolist()
          cls_id = int(label)
          prediction_result.append(
              [bbox[0], bbox[1], bbox[2], bbox[3], score, cls_id]
          )
  
      prediction_result = [torch.tensor(prediction_result)]
      # prediction_result = [prediction_result]
  
      return prediction_result
  
imports: import logging
  from typing import Any, Dict, List, Optional, Tuple
  import cv2
  import numpy
  import torch
  from sahi.models.base import DetectionModel
  from sahi.prediction import ObjectPrediction
  from sahi.utils.compatibility import fix_full_shape_list, fix_shift_amount_list
  from sahi.utils.import_utils import check_requirements
  from sahi.utils.yolov8onnx import non_max_supression, xywh2xyxy
label_desc: Use image node_id 6 for calling the Yolov8OnnxDetectionModel obj's underlying member method code with example usage: obj._post_process(outputs, input_shape, image_shape) and returns: prediction_result