class_docstr: SCUT-CTW1500 dataset parser.
  
  Args:
      ignore (str): The text of the ignored instances. Defaults to
          '###'.
class_docstr_tok: ["SCUT-CTW1500","dataset","parser",".","Args",":","ignore","(","str",")",":","The","text","of","the","ignored","instances",".","Defaults","to","'","#","#","#","'","."]
docstr: Convert annotation for a single image.
  
  Args:
      img_path (str): The path of image.
      ann_path (str): The path of annotation.
  
  Returns:
      Tuple: A tuple of (img_path, instance).
  
      - img_path (str): The path of image file, which can be read
        directly by opencv.
      - instance: instance is a list of dict containing parsed
        annotations, which should contain the following keys:
  
        - 'poly' or 'box' (textdet or textspotting)
        - 'text' (textspotting or textrecog)
        - 'ignore' (all task)
  
  Examples:
      An example of returned values:
      >>> ('imgs/train/xxx.jpg',
      >>> dict(
      >>>    poly=[[[0, 1], [1, 1], [1, 0], [0, 0]]],
      >>>    text='hello',
      >>>    ignore=False)
      >>> )
docstr_tok: ["Convert","annotation","for","a","single","image",".","Args",":","img_path","(","str",")",":","The","path","of","image",".","ann_path","(","str",")",":","The","path","of","annotation",".","Returns",":","Tuple",":","A","tuple","of","(","img_path",",","instance",")",".","-","img_path","(","str",")",":","The","path","of","image","file",",","which","can","be","read","directly","by","opencv",".","-","instance",":","instance","is","a","list","of","dict","containing","parsed","annotations",",","which","should","contain","the","following","keys",":","-","'poly","'","or","'box","'","(","textdet","or","textspotting",")","-","'text","'","(","textspotting","or","textrecog",")","-","'ignore","'","(","all","task",")","Examples",":","An","example","of","returned","values",":",">",">",">","(","'imgs\/train\/xxx.jpg","'",",",">",">",">","dict","(",">",">",">","poly=","[","[","[","0",",","1","]",",","[","1",",","1","]",",","[","1",",","0","]",",","[","0",",","0","]","]","]",",",">",">",">","text='hello","'",",",">",">",">","ignore=False",")",">",">",">",")"]
code: def parse_file(self, img_path: str, ann_path: str) -> Tuple:
      """Convert annotation for a single image.
  
      Args:
          img_path (str): The path of image.
          ann_path (str): The path of annotation.
  
      Returns:
          Tuple: A tuple of (img_path, instance).
  
          - img_path (str): The path of image file, which can be read
            directly by opencv.
          - instance: instance is a list of dict containing parsed
            annotations, which should contain the following keys:
  
            - 'poly' or 'box' (textdet or textspotting)
            - 'text' (textspotting or textrecog)
            - 'ignore' (all task)
  
      Examples:
          An example of returned values:
          >>> ('imgs/train/xxx.jpg',
          >>> dict(
          >>>    poly=[[[0, 1], [1, 1], [1, 0], [0, 0]]],
          >>>    text='hello',
          >>>    ignore=False)
          >>> )
      """
  
      if self.split == "train":
          instances = self.load_xml_info(ann_path)
      elif self.split == "test":
          instances = self.load_txt_info(ann_path)
      return img_path, instances
  
file_path: mmocr/mmocr/datasets/preparers/parsers/ctw1500_parser.py
imports: import xml.etree.ElementTree
  from typing import List, Tuple
  import numpy
  from mmocr.datasets.preparers.data_preparer import DATA_PARSERS
  from mmocr.datasets.preparers.parsers.base import BaseParser
  from mmocr.utils import list_from_file
label_desc: Use image node_id 2 for calling the CTW1500AnnParser obj's underlying member method code with example usage: obj.parse_file(img_path, ann_path) and returns: img_path,  instances