def flip_bbox(bbox, size, y_flip=False, x_flip=False):

    """
    Flips Bounding Boxes.

    Arguments:
        bbox            :- The GT bounding boxes of the image
        size            :- A tuple with height and the width of the image before resized.
        y_flip (bool)   :- vertical flip of an image.
        x_flip (bool)   :- horizontal flip of an image.
    Returns:
        ~numpy.ndarray  :- Bounding boxes flipped according to the given image shapes.
    """

    H, W = size
    bbox = bbox.copy()

    y_flip, x_flip = False, False
    
    if y_flip:
        y_max = H - bbox[:, 0]
        y_min = H - bbox[:, 2]
        bbox[:, 0] = y_min
        bbox[:, 2] = y_max
    if x_flip:
        x_max = W - bbox[:, 1]
        x_min = W - bbox[:, 3]
        bbox[:, 1] = x_min
        bbox[:, 3] = x_max
    return bbox