docstr: Wrapper to load and convert an image to an image tensor
  
  Parameters
  ----------
  image : path-to-file, PIL.Image, or np.ndarray
      Image to load or convert.
  detection_size : int, optional
      Target detection size. The default is None.
  
  Returns
  -------
  img : torch.tensor
      Tensor image with 4 dimension [batch, channel, width, height]..
  original_shape : tuple
      A tuple (height, width) of the original input image before resizing.
docstr_tok: ["Wrapper","to","load","and","convert","an","image","to","an","image","tensor","Parameters","--","--","--","--","--","image",":","path-to-file",",","PIL.Image",",","or","np.ndarray","Image","to","load","or","convert",".","detection_size",":","int",",","optional","Target","detection","size",".","The","default","is","None",".","Returns","--","--","--","-","img",":","torch.tensor","Tensor","image","with","4","dimension","[","batch",",","channel",",","width",",","height","]","..","original_shape",":","tuple","A","tuple","(","height",",","width",")","of","the","original","input","image","before","resizing","."]
code: def load_image(self, image_path, detection_size=0):
      """
      Wrapper to load and convert an image to an image tensor
  
      Parameters
      ----------
      image : path-to-file, PIL.Image, or np.ndarray
          Image to load or convert.
      detection_size : int, optional
          Target detection size. The default is None.
  
      Returns
      -------
      img : torch.tensor
          Tensor image with 4 dimension [batch, channel, width, height]..
      original_shape : tuple
          A tuple (height, width) of the original input image before resizing.
      """
      img = self.get_cv2_image(image_path)
      img, original_shape = self.resize_image(
          img, detection_size=detection_size
      )
      img = self.normalize_image(img)
      img = self.image_array2tensor(img)
  
      return img, original_shape
  
imports: import os
  import math
  import yaml
  from shapely.geometry import Polygon
  import PIL.Image
  import numpy
  import cv2
  import pyclipper
  import torch
  from .model.constructor import Configurable
label_desc: Use image node_id 10 for calling the DBNet obj's underlying member method code with example usage: obj.load_image(image_path, detection_size) and returns: img,  original_shape