def crop(img, x1, y1, x2, y2):
    """
    crop image given coordinates

    :param img: input image, [H,W,3]
    :param x1: coordinate, int
    :param y1: coordinate, int
    :param x2: coordinate, int
    :param y2: coordinate, int
    :return: cropped image
    """
    img = img[y1:y2, x1:x2]
    return img