-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential bug when creating image crops #5
Comments
Hi, the image was padded. |
Hi, The coordinate of P changes after padding since the reference frame changed. For example, the coordinate of the upper left corner of the original image is (0,0) and after padding with 10 pixels on the four sides of the image, the coordinate of the upper left corner of the original image is (10, 10) instead of (0,0). |
Aah that makes sense. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
first off I want to thank you for publishing an actually working codebase and well documented project.
I am using Eq-Transporter Nets in my Master Thesis and when looking through the code in the Attention and Transport modules I noticed a potential bug when crops are taken from the input images.
e.g. Line 121 from the attention module:
crop = input_tensor[:,:,p[0]:(p[0] + self.crop_size),p[1]:(p[1] + self.crop_size)]
or Line 89 from the transport module:
crop = crop[:, :, p[0]:(p[0] + self.crop_size_1), p[1]:(p[1] + self.crop_size_1)]
Wouldn't this put the upper left corner of the crop window at the given location instead of centering the crop window at the location?
I would expect the crop to be made like this:
crop = input_tensor[:,:,(p[0]-crop_size/2):(p[0]+crop_size/2),(p[1]-crop_size/2):(p[1]+crop_size/2)]
So that it is centered at the pick location.
Is this an actual bug or am I just missing something here?
The text was updated successfully, but these errors were encountered: