deepview
deepview copied to clipboard
A bug in utils_dset.py?
Why is the line 122 of utils_dset.py written like below:
in_pixel_y = torch.clamp(in_pixel_xy[:,1], min = crop_y / 2, max = img_h - img_h / 2)
But not:
in_pixel_y = torch.clamp(in_pixel_xy[:,1], min = crop_y / 2, max = img_h - crop_y / 2)
Because the line 121 of utils_dset.py uses "crop_x" instead of "img_w":
in_pixel_x = torch.clamp(in_pixel_xy[:,0], min = crop_x / 2, max = img_w - crop_x / 2)
I mean why for "in_pixel_y", the script uses "img_h" instead of "crop_y"? Looking forward to your reply!