Files
2023-11-18 03:46:29 +01:00

2 lines
133 B
Python

def mask_to_image_tensor(mask):
return mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])).movedim(1, -1).expand(-1, -1, -1, 3)