code: def load_json_info(gt_file, img_info):
      """Collect the annotation information.
  
      Annotation Format
      {
          'filedBBs': [{
              'poly_points': [[435,1406], [466,1406], [466,1439], [435,1439]],
              "type": "fieldCheckBox",
              "id": "f0",
              "isBlank": 1, # 0:text,1:handwriting,2:print,3:blank,4:signature,
          }], ...
          "transcriptions":{
              "f38": "CASE NUMBER",
              "f29": "July 1, 1949",
              "t20": "RANK",
              "t19": "COMPANY",
              ...
          }
      }
  
      Some special characters are used in the transcription:
      "«text»" indicates that "text" had a strikethrough
      "¿" indicates the transcriber could not read a character
      "§" indicates the whole line or word was illegible
      "" (empty string) is if the field was blank
  
      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
      """
      assert isinstance(gt_file, str)
      assert isinstance(img_info, dict)
  
      annotation = mmengine.load(gt_file)
      anno_info = []
  
      # 'textBBs' contains the printed texts of the table while 'fieldBBs'
      #  contains the text filled by human.
      for box_type in ["textBBs", "fieldBBs"]:
          # NAF dataset only provides transcription GT for 'filedBBs', the
          # 'textBBs' is only used for detection task.
          if box_type == "textBBs":
              continue
          for anno in annotation[box_type]:
              # Skip images containing detection annotations only
              if "transcriptions" not in annotation.keys():
                  continue
              # Skip boxes without recognition GT
              if anno["id"] not in annotation["transcriptions"].keys():
                  continue
  
              word = annotation["transcriptions"][anno["id"]]
              # Skip blank boxes
              if len(word) == 0:
                  continue
  
              bbox = (
                  np.array(anno["poly_points"])
                  .reshape(1, 8)[0]
                  .tolist()
              )
  
              anno = dict(bbox=bbox, word=word)
              anno_info.append(anno)
  
      img_info.update(anno_info=anno_info)
  
      return img_info
  
file_path: mmocr/tools/dataset_converters/textrecog/naf_converter.py
imports: import argparse
  import os.path
  import mmcv
  import mmengine
  import numpy
  from mmocr.utils import crop_img, 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