def local_patch(x, bbox):
    """Crop local patch according to bbox.
    Args:
        x: input
        bbox: (top, left, height, width)
    """
    return x[:, :, bbox[0]:bbox[0] + bbox[2], bbox[1]:bbox[1] + bbox[3]]