def box_to_rect(box, width, height):
    """
    :param box: center_x, center_y, bbox_w, bbox_h
    :param width:  image width
    :param height: image height
    :return: x1, y1, x2, y2(in pixel)
    """
    x, y, w, h = box

    x1 = (x - w * 0.5) * width
    y1 = (y - h * 0.5) * height
    x2 = (x + w * 0.5) * width
    y2 = (y + h * 0.5) * height

    return [int(x1), int(y1), int(x2), int(y2)]