class_docstr: Reader for the WIDER Face dataset in PASCAL VOC format.
  
  Conversion scripts can be found in
  https://github.com/sovrasov/wider-face-pascal-voc-annotations
class_docstr_tok: ["Reader","for","the","WIDER","Face","dataset","in","PASCAL","VOC","format",".","Conversion","scripts","can","be","found","in","https",":","\/\/github.com\/sovrasov\/wider-face-pascal-voc-annotations"]
docstr: Parse raw annotation to target format.
  
  Args:
      img_info (dict): Raw image information, usually it includes
          `img_id`, `file_name`, and `xml_path`.
  
  Returns:
      Union[dict, List[dict]]: Parsed annotation.
docstr_tok: ["Parse","raw","annotation","to","target","format",".","Args",":","img_info","(","dict",")",":","Raw","image","information",",","usually","it","includes","`","img_id","`",",","`","file_name","`",",","and","`","xml_path","`",".","Returns",":","Union","[","dict",",","List","[","dict","]","]",":","Parsed","annotation","."]
code: def parse_data_info(self, img_info: dict) -> Union[dict, List[dict]]:
      """Parse raw annotation to target format.
  
      Args:
          img_info (dict): Raw image information, usually it includes
              `img_id`, `file_name`, and `xml_path`.
  
      Returns:
          Union[dict, List[dict]]: Parsed annotation.
      """
      data_info = {}
      img_id = img_info["img_id"]
      xml_path = osp.join(
          self.data_prefix["img"], "Annotations", f"{img_id}.xml"
      )
      data_info["img_id"] = img_id
      data_info["xml_path"] = xml_path
  
      # deal with xml file
      with get_local_path(
          xml_path, backend_args=self.backend_args
      ) as local_path:
          raw_ann_info = ET.parse(local_path)
      root = raw_ann_info.getroot()
      size = root.find("size")
      width = int(size.find("width").text)
      height = int(size.find("height").text)
      folder = root.find("folder").text
      img_path = osp.join(
          self.data_prefix["img"], folder, img_info["file_name"]
      )
      data_info["img_path"] = img_path
  
      data_info["height"] = height
      data_info["width"] = width
  
      # Coordinates are in range [0, width - 1 or height - 1]
      data_info["instances"] = self._parse_instance_info(
          raw_ann_info, minus_one=False
      )
      return data_info
  
file_path: mmdetection/mmdet/datasets/wider_face.py
imports: import os.path
  import xml.etree.ElementTree
  from mmengine.dist import is_main_process
  from mmengine.fileio import get_local_path, list_from_file
  from mmengine.utils import ProgressBar
  from mmdet.registry import DATASETS
  from mmdet.utils.typing_utils import List, Union
  from .xml_style import XMLDataset
label_desc: Use image node_id 2 for calling the WIDERFaceDataset obj's underlying member method code with example usage: obj.parse_data_info(img_info) and returns: data_info