I am trying to perform a custom alignment code on batch of images from the dataloader.
The custom alignment code that I have written takes one image as a base reference and align other images based on that. My alignment code runs on cv2 python package, hence I need image format not Tensors, as returned by dataloader during training to align before sending them into the network.
Till now, I have been using a Static Image file to align images in a batch in the getitem implementation. I need to align the batch based on the very first image in the batch. It will help me to generalize better, I think.
Let me know If anyone can help me. I would be so greatful as I am facing this problem since very long and trying to figure out on my own.