def get_bbox_from_shapely(shapely_object):
    """
    Accepts shapely box/poly object and returns its bounding box in coco and voc formats
    """
    minx, miny, maxx, maxy = shapely_object.bounds
    width = maxx - minx
    height = maxy - miny
    coco_bbox = [minx, miny, width, height]
    coco_bbox = [round(point) for point in coco_bbox] if coco_bbox else coco_bbox
    voc_bbox = [minx, miny, maxx, maxy]
    voc_bbox = [round(point) for point in voc_bbox] if voc_bbox else voc_bbox

    return coco_bbox, voc_bbox