def bboxes_to_pixels(bbox, im_width, im_height):
    """
    Convert bounding box coordinates to pixels.
    (It is common that bboxes are parametrized as percentage of image size
    instead of pixels.)

    Args:
      bboxes (tuple): (xmin, xmax, ymin, ymax)
      im_width (int): image width in pixels
      im_height (int): image height in pixels

    Returns:
      bboxes (tuple): (xmin, xmax, ymin, ymax)
    """
    xmin, xmax, ymin, ymax = bbox
    return xmin * im_width, xmax * im_width, ymin * im_height, ymax * im_height