code: def convert_annotation(input_ann_path):
      tree = ET.parse(input_ann_path)
      root = tree.getroot()
      size = root.find("size")
      w = int(size.find("width").text)
      h = int(size.find("height").text)
  
      ann_list = []
  
      for obj in root.iter("object"):
          obj_class = obj.find("name").text
          if obj_class not in classes:
              classes.append(obj_class)
          xmlbox = obj.find("bndbox")
          b = (
              float(xmlbox.find("xmin").text),
              float(xmlbox.find("xmax").text),
              float(xmlbox.find("ymin").text),
              float(xmlbox.find("ymax").text),
          )
          bb = convert((w, h), b)
  
          ann_list.append({"class": obj_class, "bbox": bb})
  
      return ann_list
  
file_path: ImageAI/scripts/pascal_voc_to_yolo.py
imports: import glob
  import os
  import argparse
  import pickle
  import xml.etree.ElementTree
  from os import listdir, getcwd
  from os.path import join
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: convert_annotation(input_ann_path) and returns: ann_list