def windows2img(img_splits, h_split, w_split, img_h, img_w):
    """Convert splitted stripes back

    Args:
        img_splits: tensor, image tensor with shape [B, C, H, W]
        h_split: int, splits width in height direction
        w_split: int, splits width in width direction
        img_h: int, original tensor height
        img_w: int, original tensor width
    Returns:
        img: tensor, original tensor
    """
    B = int(img_splits.shape[0] / (img_h / h_split * img_w / w_split))
    img = img_splits.reshape([B, img_h // h_split, img_w // w_split, h_split, w_split, -1])
    img = img.transpose([0, 1, 3, 2, 4, 5]) #[B,img_h//h_split, h_split, img_w//w_split, w_split,C]
    img = img.reshape([B, img_h, img_w, -1]) # [B, img_h, img_w, C]
    return img