docstr: Setup the model and optimizer which are used in every test method.
  
  TestCase calls functions in this order: setUp() -> testMethod()
  -> tearDown() -> cleanUp()
code: def setUp(self):
      """Setup the model and optimizer which are used in every test method.
  
      TestCase calls functions in this order: setUp() -> testMethod()
      -> tearDown() -> cleanUp()
      """
      self.H, self.W = 5, 8
      self.img = np.zeros((self.H, self.W, 3))
      self.gt_bboxes = np.zeros((2, 4))
      self.gt_bboxes_labels = [
          np.zeros((2,)),
          np.zeros((2,)) + 1,
          np.zeros((2,)) - 1,
      ]
      self.gt_instances_id = [
          np.ones((2,), dtype=np.int32),
          np.ones((2,), dtype=np.int32) - 1,
          np.ones((2,), dtype=np.int32) + 1,
      ]
      self.frame_id = [0, 1, 2]
      self.scale_factor = [1.0, 1.5, 2.0]
      self.flip = [False] * 3
      self.ori_shape = [(self.H, self.W)] * 3
      self.img_id = [0, 1, 2]
  
      self.video_infos = dict(
          video_id=0, video_length=10, key_frame_id=4
      )
      self.video_infos["images"] = []
      self.info_keys = [
          "video_id",
          "video_length",
          "img",
          "gt_bboxes",
          "gt_bboxes_labels",
          "gt_instances_id",
          "img_id",
          "frame_id",
      ]
      for i in range(10):
          frame_info = dict(
              img=np.zeros((self.H, self.W, 3)) + i,
              gt_bboxes=np.zeros((2, 4)) + i,
              gt_bboxes_labels=np.zeros((2,)) + i,
              gt_instances_id=np.zeros((2,), dtype=np.int32) + i,
              ori_shape=(self.H + i, self.W + i),
              frame_id=i,
              img_id=i,
          )
          self.video_infos["images"].append(frame_info)
  
file_path: mmdetection/tests/test_datasets/test_transforms/test_frame_sampling.py
imports: import unittest
  import numpy
  from mmdet.datasets.transforms import BaseFrameSample, UniformRefFrameSample
label_desc: Use image node_id 1 for calling the TestFrameSample obj's underlying member method code with example usage: obj.setUp() without return types