title: Bounding box extraction
body: <p>I am having some trouble with a function I found for generating the xmin, xmax, ymin, ymax located in a <code>.xml</code> file. I am not sure why is it not working and I feel like it's a simple mistake that I am not considering.</p>
  <pre><code>def extract_boxes(self, filename):
          
          # load and parse the file
          tree = ElementTree.parse(filename)
          # get the root of the document
          root = tree.getroot()
          # extract each bounding box
          boxes = list()
          for box in root.findall('.//bndbox'):
              xmin = int(box.find('xmin').text)
              ymin = int(box.find('ymin').text)
              xmax = int(box.find('xmax').text)
              ymax = int(box.find('ymax').text)
              coors = [xmin, ymin, xmax, ymax]
              boxes.append(coors)
          
          # extract image dimensions
          width = int(root.find('.//size/width').text)
          height = int(root.find('.//size/height').text)
          return boxes, width, height
  
  
  bbs = extract_boxes(r'C:\Users\name\Desktop\kangaroo-master\annots\00001.xml')
  </code></pre>
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-18-b6a299d4377e&gt; in &lt;module&gt;
       23 
       24 
  ---&gt; 25 bbs = extract_boxes(r'C:\Users\name\Desktop\kangaroo-master\annots\00001.xml')
       26 
       27 
  
  TypeError: extract_boxes() missing 1 required positional argument: 'filename'
  </code></pre>