Closed Xinxinatg closed 3 years ago
We didn't try it on rectangle images. In theory, the shape of the image doesn't affect the OT loss. OT loss should work for rectangle images. You are welcome to try it on rectangle images. You need to modify the distance computation. For square images, we normalize the x,y coordinates from [-1 to 1] and compute the distance. For rectangle images, since the height and width are no longer the same, you need to normalize the x,y coordinates accordingly.
Thanks a lot for your reply! Just another quick question, are other losses like tv_loss can be calculated on rectangle images as well?
Yes. TV_loss will work for rectangle images as well. TV_loss is just L1 loss on normalized density maps.
Hi I notice that in the process of training, the images will be cropped into images of square shape. Just wondering is it possible that the OT loss can be implemented on the rectangle images during training? Thanks for your time in advance!