class_docstr: The ILSVRC12 classification dataset, aka the commonly used 1000 classes ImageNet subset.
  This dataflow produces uint8 images of shape [h, w, 3(BGR)], and a label between [0, 999].
  The label map follows the synsets.txt file in
  http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz,
  which can also be queried using :class:`ILSVRCMeta`.
class_docstr_tok: ["The","ILSVRC12","classification","dataset",",","aka","the","commonly","used","1000","classes","ImageNet","subset",".","This","dataflow","produces","uint8","images","of","shape","[","h",",","w",",","3","(","BGR",")","]",",","and","a","label","between","[","0",",","999","]",".","The","label","map","follows","the","synsets.txt","file","in","http",":","\/\/dl.caffe.berkeleyvision.org\/caffe_ilsvrc12.tar.gz",",","which","can","also","be","queried","using",":","class",":","`","ILSVRCMeta","`","."]
code: def get_training_bbox(bbox_dir, imglist):
      import xml.etree.ElementTree as ET
  
      ret = []
  
      def parse_bbox(fname):
          root = ET.parse(fname).getroot()
          size = root.find("size").getchildren()
          size = map(int, [size[0].text, size[1].text])
  
          box = root.find("object").find("bndbox").getchildren()
          box = [float(x.text) for x in box]
          return np.asarray(box, dtype="float32")
  
      with timed_operation("Loading Bounding Boxes ..."):
          cnt = 0
          for k in tqdm.trange(len(imglist)):
              fname = imglist[k][0]
              fname = fname[:-4] + "xml"
              fname = os.path.join(bbox_dir, fname)
              try:
                  ret.append(parse_bbox(fname))
                  cnt += 1
              except Exception:
                  ret.append(None)
          logger.info(
              "{}/{} images have bounding box.".format(
                  cnt, len(imglist)
              )
          )
      return ret
  
imports: import numpy
  import os
  import tarfile
  import tqdm
  from pathlib import Path
  from ...utils import logger
  from ...utils.fs import download, get_dataset_path, mkdir_p
  from ...utils.loadcaffe import get_caffe_pb
  from ...utils.timer import timed_operation
  from ..base import RNGDataFlow
label_desc: Use image node_id 3 for calling the ILSVRC12 obj's underlying member method code with example usage: obj.get_training_bbox(bbox_dir, imglist) and returns: ret, np