code: def load_txt_info(gt_file, img_info):
      """Collect the annotation information.
  
      The annotation format is as the following:
      x1, y1, x2, y2, x3, y3, x4, y4, difficult, text
  
      390,902,1856,902,1856,1225,390,1225,0,"金氏眼镜"
      1875,1170,2149,1170,2149,1245,1875,1245,0,"创于1989"
      2054,1277,2190,1277,2190,1323,2054,1323,0,"城建店"
  
      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
      """
  
      anno_info = []
      with open(gt_file, encoding="utf-8-sig") as f:
          lines = f.readlines()
      for line in lines:
          points = line.split(",")[0:8]
          word = line.split(",")[9].rstrip("\n").strip('"')
          difficult = 1 if line.split(",")[8] != "0" else 0
          segmentation = [int(pt) for pt in 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]
  
          if word == "###" or difficult == 1:
              iscrowd = 1
          else:
              iscrowd = 0
  
          anno = dict(
              iscrowd=iscrowd,
              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/rctw_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_txt_info(gt_file, img_info) and returns: img_info