class_docstr: Resize the input images.
  
  Args:
      target_size(int): Targeted input size.
      interp(str): Interpolation method.
  
  Returns:
      img(np.ndarray): Preprocessed image.
      data(dict): Image info and label info, default is None.
class_docstr_tok: ["Resize","the","input","images",".","Args",":","target_size","(","int",")",":","Targeted","input","size",".","interp","(","str",")",":","Interpolation","method",".","Returns",":","img","(","np.ndarray",")",":","Preprocessed","image",".","data","(","dict",")",":","Image","info","and","label","info",",","default","is","None","."]
code: def __init__(self, target_size: int = 512, interp: str = "RANDOM"):
      self.interp_dict = {
          "NEAREST": cv2.INTER_NEAREST,
          "LINEAR": cv2.INTER_LINEAR,
          "CUBIC": cv2.INTER_CUBIC,
          "AREA": cv2.INTER_AREA,
          "LANCZOS4": cv2.INTER_LANCZOS4,
      }
      self.interp = interp
      if not (interp == "RANDOM" or interp in self.interp_dict):
          raise ValueError(
              "interp should be one of {}".format(
                  self.interp_dict.keys()
              )
          )
      if isinstance(target_size, list) or isinstance(
          target_size, tuple
      ):
          if len(target_size) != 2:
              raise TypeError(
                  "when target is list or tuple, it should include 2 elements, but it is {}".format(
                      target_size
                  )
              )
      elif not isinstance(target_size, int):
          raise TypeError(
              "Type of target_size is invalid. Must be Integer or List or tuple, now is {}".format(
                  type(target_size)
              )
          )
  
      self.target_size = target_size
  
imports: import os
  import random
  from typing import Callable
  import cv2
  import PIL
  import numpy
  import paddlehub.vision.transforms.functional
  from paddlehub.vision.utils import box_crop, box_iou_xywh
label_desc: Use image node_id 1 to create a new Resize object  with example: obj = Resize(target_size, interp)