def complete_out_of_view(to_check_box, im_w, im_h):
    """
    check if the bounding box is completely out of view from the image
    :param to_check_box: bounding box, numpy array, [x, y, x, y]
    :param im_w: image width, int
    :param im_h:image height, int
    :return: out of view flag, bool
    """
    complete_OofV_left = (to_check_box[0] < 0) and (to_check_box[2] < 0)
    complete_OofV_top = (to_check_box[1] < 0) and (to_check_box[3] < 0)
    complete_OofV_right = (to_check_box[2] > im_w) and (to_check_box[0] > im_w)
    complete_OofV_bottom = (to_check_box[1] > im_h) and (to_check_box[3] > im_h)
    complete_OofV = complete_OofV_left or complete_OofV_top or complete_OofV_right or complete_OofV_bottom
    return complete_OofV