def addShape(self, label, bndbox, difficult, parents, children, object_id):
    parent_ids = []
    try:
        for item in parents.findall('parent'):
            parent_ids.append(int(item.text))
    except:
        pass
    child_ids = []
    try:
        for item in children.findall('child'):
            child_ids.append(int(item.text))
    except:
        pass
    xmin = int(float(bndbox.find('xmin').text))
    ymin = int(float(bndbox.find('ymin').text))
    xmax = int(float(bndbox.find('xmax').text))
    ymax = int(float(bndbox.find('ymax').text))
    points = [(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)]
    self.shapes.append((label, points, parent_ids, child_ids, object_id, None, None, difficult))
def addShape(self, label, bndbox, difficult, parents, children, object_id):
    parent_ids = []
    try:
        for item in parents.findall('parent'):
            parent_ids.append(int(item.text))
    except:
        pass
    child_ids = []
    try:
        for item in children.findall('child'):
            child_ids.append(int(item.text))
    except:
        pass
    xmin = int(float(bndbox.find('xmin').text))
    ymin = int(float(bndbox.find('ymin').text))
    xmax = int(float(bndbox.find('xmax').text))
    ymax = int(float(bndbox.find('ymax').text))
    points = [(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)]
    self.shapes.append((label, points, parent_ids, child_ids, object_id, None, None, difficult))