2 lines
133 B
Python
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) |