code: def main():
      args = parse_args()
      root_path = args.root_path
      for split in ["training", "test", "unseen_test"]:
          print(f"Processing {split} set...")
          with mmengine.Timer(
              print_tmpl="It takes {}s to convert VinText annotation"
          ):
              files = collect_files(
                  osp.join(root_path, "imgs", split),
                  osp.join(root_path, "annotations"),
              )
              image_infos = collect_annotations(files, nproc=args.nproc)
              dump_ocr_data(
                  image_infos,
                  osp.join(root_path, "instances_" + split + ".json"),
                  "textdet",
              )
  
file_path: mmocr/tools/dataset_converters/textdet/vintext_converter.py
imports: import argparse
  import os
  import os.path
  import mmcv
  import mmengine
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types