How do I convert a single-channel image tensor to a Texture2D?

Hi there,

I am trying to convert a Mask Tensor of size (1,256,256,1) with a single channel to a Texture2D to display it and view it by setting it to a RawImage. I’ve tried using the TextureConvert.ToTexture() method but I am unable to get it to work even after trying different arguments. Could you please recommend me the best way to achieve this?

Thanks.

Hi nbhandari,
You can provide the model and script and we will take a look into it.
Have you tried TextureConverter.RenderToTexture() ?
thank you,

Viviane