code: def load_json_info(gt_file, img_info):
      """Collect the annotation information.
  
      The annotation format is as the following:
  
      {
          "chars": [
              {
                  "ignore": 0,
                  "transcription": "H",
                  "points": [25, 175, 112, 175, 112, 286, 25, 286]
              },
              {
                  "ignore": 0,
                  "transcription": "O",
                  "points": [102, 182, 210, 182, 210, 273, 102, 273]
              }, ...
          ]
          "lines": [
              {
                  "ignore": 0,
                  "transcription": "HOKI",
                  "points": [23, 173, 327, 180, 327, 290, 23, 283]
              },
              {
                  "ignore": 0,
                  "transcription": "TEA",
                  "points": [368, 180, 621, 180, 621, 294, 368, 294]
              }, ...
          ]
      }
  
  
      Args:
          gt_file (str): The path to ground-truth
          img_info (dict): The dict of the img and annotation information
  
      Returns:
          img_info (dict): The dict of the img and annotation information
      """
  
      annotation = mmengine.load(gt_file)
      anno_info = []
      for line in annotation["lines"]:
          segmentation = line["points"]
          x = max(0, min(segmentation[0::2]))
          y = max(0, min(segmentation[1::2]))
          w = abs(max(segmentation[0::2]) - x)
          h = abs(max(segmentation[1::2]) - y)
          bbox = [x, y, w, h]
  
          anno = dict(
              iscrowd=line["ignore"],
              category_id=1,
              bbox=bbox,
              area=w * h,
              segmentation=[segmentation],
          )
          anno_info.append(anno)
  
      img_info.update(anno_info=anno_info)
  
      return img_info
  
file_path: mmocr/tools/dataset_converters/textdet/rects_converter.py
imports: import argparse
  import math
  import os
  import os.path
  import mmcv
  import mmengine
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 4 for calling a global function with example usage: load_json_info(gt_file, img_info) and returns: img_info