docstr: Resize image such that the shorter side of the image is equal to the 
  closest multiple of 32 to the provided detection_size. If detection_size
  is not provided, it will be resized to the closest multiple of 32 each
  side. If the original size exceeds the min-/max-detection sizes 
  (specified in configs.yaml), it will be resized to be within the 
  min-/max-sizes.
  
  Parameters
  ----------
  img : np.ndarray
      OpenCV BGR image.
  detection_size : int, optional
      Target detection size. The default is None.
  
  Returns
  -------
  np.ndarray
      Resized OpenCV BGR image. The width and height of this image should
      be multiple of 32.
docstr_tok: ["Resize","image","such","that","the","shorter","side","of","the","image","is","equal","to","the","closest","multiple","of","32","to","the","provided","detection_size",".","If","detection_size","is","not","provided",",","it","will","be","resized","to","the","closest","multiple","of","32","each","side",".","If","the","original","size","exceeds","the","min-\/max-detection","sizes","(","specified","in","configs.yaml",")",",","it","will","be","resized","to","be","within","the","min-\/max-sizes",".","Parameters","--","--","--","--","--","img",":","np.ndarray","OpenCV","BGR","image",".","detection_size",":","int",",","optional","Target","detection","size",".","The","default","is","None",".","Returns","--","--","--","-","np.ndarray","Resized","OpenCV","BGR","image",".","The","width","and","height","of","this","image","should","be","multiple","of","32","."]
code: def resize_image(self, img, detection_size=None):
      """
      Resize image such that the shorter side of the image is equal to the
      closest multiple of 32 to the provided detection_size. If detection_size
      is not provided, it will be resized to the closest multiple of 32 each
      side. If the original size exceeds the min-/max-detection sizes
      (specified in configs.yaml), it will be resized to be within the
      min-/max-sizes.
  
      Parameters
      ----------
      img : np.ndarray
          OpenCV BGR image.
      detection_size : int, optional
          Target detection size. The default is None.
  
      Returns
      -------
      np.ndarray
          Resized OpenCV BGR image. The width and height of this image should
          be multiple of 32.
      """
      height, width, _ = img.shape
      if detection_size is None:
          detection_size = max(
              self.min_detection_size,
              min(height, width, self.max_detection_size),
          )
  
      if height < width:
          new_height = int(math.ceil(detection_size / 32) * 32)
          new_width = int(
              math.ceil(new_height / height * width / 32) * 32
          )
      else:
          new_width = int(math.ceil(detection_size / 32) * 32)
          new_height = int(
              math.ceil(new_width / width * height / 32) * 32
          )
      resized_img = cv2.resize(img, (new_width, new_height))
  
      return resized_img, (height, width)
  
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 7 for calling the DBNet obj's underlying member method code with example usage: obj.resize_image(img, detection_size) and returns: resized_img,  height,  width