docstr: Detection model is initialized and set to self.model.
  
  Options for onnxruntime sessions can be passed as keyword arguments.
docstr_tok: ["Detection","model","is","initialized","and","set","to","self.model",".","Options","for","onnxruntime","sessions","can","be","passed","as","keyword","arguments","."]
code: def load_model(self, ort_session_kwargs: Optional[dict] = {}) -> None:
      """Detection model is initialized and set to self.model.
  
      Options for onnxruntime sessions can be passed as keyword arguments.
      """
  
      import onnxruntime
  
      try:
          if self.device == torch.device("cpu"):
              EP_list = ["CPUExecutionProvider"]
          else:
              EP_list = ["CUDAExecutionProvider"]
  
          options = onnxruntime.SessionOptions()
  
          for key, value in ort_session_kwargs.items():
              setattr(options, key, value)
  
          ort_session = onnxruntime.InferenceSession(
              self.model_path, sess_options=options, providers=EP_list
          )
  
          self.set_model(ort_session)
  
      except Exception as e:
          raise TypeError(
              "model_path is not a valid onnx model path: ", e
          )
  
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 3 for calling the Yolov8OnnxDetectionModel obj's underlying member method code with example usage: obj.load_model(ort_session_kwargs) without return types