Tensorboard works for 3D data?

I was trying trying to run tensorboard module in Pytorch with 3D image data with the following code:

class GetTB(object):
    def __init__(self, img, lbl, model):
        self.image = img
        self.label = lbl
        self.model = model

    def WorkTB(self):
        tb = SummaryWriter()
        grid = torchvision.utils.make_grid(self.image)
        tb.add_image("images", grid)
        tb.add_graph(model, self.image)

A = GetTB(images, labels, model).WorkTB()

A bit about the images and labels is: images have B,C,H,W,D dimensions. which is C=1 for images and C=5/6 for the one-hot encoded label.
Now in my search the make_grid() documentation mentions images to be:

    tensor (Tensor or list): 4D mini-batch Tensor of shape (B x C x H x W)
        or a list of images all of the same size.

Does it indicate tensorboard only works with RGB image data?
I also couldn’t find any sort of implementation tutorial/article for specific 3D data. If anyone updates would be highly appreciated.

I’m not sure there is any out-of-the-box support for depth images in tensorboard. However, if there is some visualization function you have for depth + color images, you can simply run that first and pass in the results encoded in RGB to tensorboard.

1 Like

Thanks, I guess apart from 5D tensors or 3D image/label visualization, I suppose other performance metrics/analyses should work in tensorboard.