class_docstr: XML dataset for detection.
  
  Args:
      img_subdir (str): Subdir where images are stored. Default: JPEGImages.
      ann_subdir (str): Subdir where annotations are. Default: Annotations.
      backend_args (dict, optional): Arguments to instantiate the
          corresponding backend. Defaults to None.
docstr: parse instance information.
  
  Args:
      raw_ann_info (ElementTree): ElementTree object.
      minus_one (bool): Whether to subtract 1 from the coordinates.
          Defaults to True.
  
  Returns:
      List[dict]: List of instances.
docstr_tok: ["parse","instance","information",".","Args",":","raw_ann_info","(","ElementTree",")",":","ElementTree","object",".","minus_one","(","bool",")",":","Whether","to","subtract","1","from","the","coordinates",".","Defaults","to","True",".","Returns",":","List","[","dict","]",":","List","of","instances","."]
code: def _parse_instance_info(
      self, raw_ann_info: ET, minus_one: bool = True
  ) -> List[dict]:
      """parse instance information.
  
      Args:
          raw_ann_info (ElementTree): ElementTree object.
          minus_one (bool): Whether to subtract 1 from the coordinates.
              Defaults to True.
  
      Returns:
          List[dict]: List of instances.
      """
      instances = []
      for obj in raw_ann_info.findall("object"):
          instance = {}
          name = obj.find("name").text
          if name not in self._metainfo["classes"]:
              continue
          difficult = obj.find("difficult")
          difficult = 0 if difficult is None else int(difficult.text)
          bnd_box = obj.find("bndbox")
          bbox = [
              int(float(bnd_box.find("xmin").text)),
              int(float(bnd_box.find("ymin").text)),
              int(float(bnd_box.find("xmax").text)),
              int(float(bnd_box.find("ymax").text)),
          ]
  
          # VOC needs to subtract 1 from the coordinates
          if minus_one:
              bbox = [x - 1 for x in bbox]
  
          ignore = False
          if self.bbox_min_size is not None:
              assert not self.test_mode
              w = bbox[2] - bbox[0]
              h = bbox[3] - bbox[1]
              if w < self.bbox_min_size or h < self.bbox_min_size:
                  ignore = True
          if difficult or ignore:
              instance["ignore_flag"] = 1
          else:
              instance["ignore_flag"] = 0
          instance["bbox"] = bbox
          instance["bbox_label"] = self.cat2label[name]
          instances.append(instance)
      return instances
  
file_path: mmdetection/mmdet/datasets/xml_style.py
imports: import os.path
  import xml.etree.ElementTree
  from typing import List, Optional, Union
  import mmcv
  from mmengine.fileio import get, get_local_path, list_from_file
  from mmdet.registry import DATASETS
  from .base_det_dataset import BaseDetDataset
label_desc: Use image node_id 6 for calling the XMLDataset obj's underlying member method code with example usage: obj._parse_instance_info(raw_ann_info, minus_one) and returns: instances