def _target_to_aabb_polygons(target):
    """ Transforms target AABB into 4 point polygons
    The vehicle AABB representation is transformed into:
        ((xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax))

    Parameters
    ----------
    target : dict
             single image label as provided by Boxy dataset

    Returns
        list of AABB as polygons defined by 4 points
    """
    boxes = []
    for box in target['vehicles']:
        box = box['AABB']
        aabb = [
            (box['x1'], box['y1']),
            (box['x2'], box['y1']),
            (box['x2'], box['y2']),
            (box['x1'], box['y2'])
        ]
        boxes.append(aabb)
    return boxes