class_docstr: Preprocess the input data according to the operators.
  
  Args:
      transforms(list): Preprocessing operators.
  
  Returns:
      img(np.ndarray): Preprocessed image.
      data(dict): Image info and label info, default is None.
class_docstr_tok: ["Preprocess","the","input","data","according","to","the","operators",".","Args",":","transforms","(","list",")",":","Preprocessing","operators",".","Returns",":","img","(","np.ndarray",")",":","Preprocessed","image",".","data","(","dict",")",":","Image","info","and","label","info",",","default","is","None","."]
code: def __call__(self, data: dict):
      if isinstance(data, dict):
          if isinstance(data["image"], str):
              img = cv2.imread(data["image"])
              img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
          gt_labels = data["gt_labels"].copy()
          data["gt_scores"] = np.ones_like(gt_labels)
          for op in self.transforms:
              img, data = op(img, data)
          img = img.transpose((2, 0, 1))
          return img, data
  
      if isinstance(data, str):
          img = cv2.imread(data)
          img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
          for op in self.transforms:
              img, data = op(img, data)
          img = img.transpose((2, 0, 1))
          return img
  
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 2 for calling the Compose obj's underlying member method code with example usage: obj.__call__(data) and returns: img,  data, img