code: def main():
      args = parse_args()
      root_path = args.root_path
      print("Processing training set...")
      training_infos = collect_art_info(
          root_path, "train", args.val_ratio
      )
      convert_annotations(
          training_infos, osp.join(root_path, "instances_training.json")
      )
      if args.val_ratio > 0:
          print("Processing validation set...")
          val_infos = collect_art_info(root_path, "val", args.val_ratio)
          convert_annotations(
              val_infos, osp.join(root_path, "instances_val.json")
          )
      print("Finish")
  
file_path: mmocr/tools/dataset_converters/textdet/art_converter.py
imports: import argparse
  import math
  import os.path
  import mmcv
  import mmengine
  from mmocr.utils import convert_annotations
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types