Adding Boundaries to images shown in tensorboard

In the Tensorboard offical websites, they can use tf.summary.image("25 training data examples", images, max_outputs=25, step=0) to plot multiple images with boundaries.

But I don’t find this function in PyTorch SummaryWriter. Instead, there is a function called writer.add_images() that can show a batch of images at a time. However, these images are placed right next to each other. I have attached an example below showing how 16 MNIST images are shown.


For MNIST, it’s easy to spot the boundaries, since there is only one object per image.
But I have a dataset with more complicated images, putting them right next to each other causes me a hard time in distinguishing which image is which.

Is it possible to add a boundary between each image?