parameters: (filename, cl="person", usetr=False, usedf=False)
return_statement: return rect
docstring: get the ground truth bbox from the PASCAL VOC 2007 database at filename
docstring_summary: get the ground truth bbox from the PASCAL VOC 2007 database at filename
docstring_tokens: get the ground truth bbox from the PASCAL VOC 2007 database at filename
function: def getbboxVOC07(filename, cl="person", usetr=False, usedf=False):
      """
      get the ground truth bbox from the PASCAL VOC 2007 database at filename
      """
      rect = []
      doc = xml.dom.minidom.parse(filename)
      for node in doc.getElementsByTagName("object"):
          # print node
          tr = 0
          df = 0
          if node.getElementsByTagName("name")[0].childNodes[0].data == cl:
              pose = node.getElementsByTagName(
                  "pose")[0].childNodes[0].data  # last
              if node.getElementsByTagName("difficult")[0].childNodes[0].data == "0" or usedf:
                  if node.getElementsByTagName("truncated")[0].childNodes[0].data == "0" or usetr:
                      if node.getElementsByTagName("difficult")[0].childNodes[0].data == "1":
                          df = 1
                      if node.getElementsByTagName("truncated")[0].childNodes[0].data == "1":
                          tr = 1
                      l = node.getElementsByTagName("bndbox")
                      for el in l:
                          if el.parentNode.nodeName == "object":
                              xmin = int(
                                  el.getElementsByTagName("xmin")[0].childNodes[0].data)
                              ymin = int(
                                  el.getElementsByTagName("ymin")[0].childNodes[0].data)
                              xmax = int(
                                  el.getElementsByTagName("xmax")[0].childNodes[0].data)
                              ymax = int(
                                  el.getElementsByTagName("ymax")[0].childNodes[0].data)
                              rect.append(
                                  (ymin, xmin, ymax, xmax, tr, df, pose))  # last
      return rect
function_tokens: def getbboxVOC07 ( filename , cl = "person" , usetr = False , usedf = False ) : rect = [ ] doc = xml . dom . minidom . parse ( filename ) for node in doc . getElementsByTagName ( "object" ) : # print node tr = 0 df = 0 if node . getElementsByTagName ( "name" ) [ 0 ] . childNodes [ 0 ] . data == cl : pose = node . getElementsByTagName ( "pose" ) [ 0 ] . childNodes [ 0 ] . data # last if node . getElementsByTagName ( "difficult" ) [ 0 ] . childNodes [ 0 ] . data == "0" or usedf : if node . getElementsByTagName ( "truncated" ) [ 0 ] . childNodes [ 0 ] . data == "0" or usetr : if node . getElementsByTagName ( "difficult" ) [ 0 ] . childNodes [ 0 ] . data == "1" : df = 1 if node . getElementsByTagName ( "truncated" ) [ 0 ] . childNodes [ 0 ] . data == "1" : tr = 1 l = node . getElementsByTagName ( "bndbox" ) for el in l : if el . parentNode . nodeName == "object" : xmin = int ( el . getElementsByTagName ( "xmin" ) [ 0 ] . childNodes [ 0 ] . data ) ymin = int ( el . getElementsByTagName ( "ymin" ) [ 0 ] . childNodes [ 0 ] . data ) xmax = int ( el . getElementsByTagName ( "xmax" ) [ 0 ] . childNodes [ 0 ] . data ) ymax = int ( el . getElementsByTagName ( "ymax" ) [ 0 ] . childNodes [ 0 ] . data ) rect . append ( ( ymin , xmin , ymax , xmax , tr , df , pose ) ) # last return rect