code: def test_ocr2det2ocr(self):
      from mmdet.datasets.transforms import Resize as MMDet_Resize
  
      t1 = MMOCR2MMDet()
      t2 = MMDet_Resize(scale=(60, 60))
      t3 = MMDet2MMOCR()
      t4 = Resize(scale=(30, 15))
      results = t4(t3(t2(t1(self.data_info_ocr.copy()))))
      self.assertEqual(results["img"].shape, (15, 30, 3))
      for i in range(2):
          self.assertTrue(
              poly2shapely(results["gt_polygons"][i]).equals(
                  poly2shapely(self.data_info_ocr["gt_polygons"][i])
              )
          )
      self.assertTrue(
          np.allclose(
              results["gt_bboxes"], self.data_info_ocr["gt_bboxes"]
          )
      )
      self.assertTrue(
          np.array_equal(
              results["gt_ignored"], self.data_info_ocr["gt_ignored"]
          )
      )
  
file_path: mmocr/tests/test_datasets/test_transforms/test_adapters.py
imports: import unittest
  import numpy
  from mmdet.structures.mask import PolygonMasks, bitmap_to_polygon
  from mmocr.datasets import MMDet2MMOCR, MMOCR2MMDet, Resize
  from mmocr.utils import poly2shapely
label_desc: Use image node_id 6 for calling the TestMMDet2MMOCR obj's underlying member method code with example usage: obj.test_ocr2det2ocr() without return types