You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
Why do I think there is a tiny inaccurate place in Fuction ToPercentCoords in utils/augmentations.py in line 85-96 ?
It feels like the following lines
"""
boxes_pre[:, 0] /= width
boxes_pre[:, 2] /= width
boxes_pre[:, 1] /= height
boxes_pre[:, 3] /= height
boxes_next[:, 0] /= width
boxes_next[:, 2] /= width
boxes_next[:, 1] /= height
boxes_next[:, 3] /= height
"""
should be corrected as:
"""
boxes_pre[:, 0] /= width-1
boxes_pre[:, 2] /= width-1
boxes_pre[:, 1] /= height-1
boxes_pre[:, 3] /= height-1
boxes_next[:, 0] /= width-1
boxes_next[:, 2] /= width-1
boxes_next[:, 1] /= height-1
boxes_next[:, 3] /= height-1
"""
cause when I used the original codes as an example to extract a specific number in a tensor by means of function torch.nn.functional.grid_sample, it wouldn't get the expected number, but when I changed width/height to width-1/height-1 , it came out the expected number.
Does anyone have the same confusion?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Why do I think there is a tiny inaccurate place in Fuction ToPercentCoords in utils/augmentations.py in line 85-96 ?
It feels like the following lines
"""
boxes_pre[:, 0] /= width
boxes_pre[:, 2] /= width
boxes_pre[:, 1] /= height
boxes_pre[:, 3] /= height
boxes_next[:, 0] /= width
boxes_next[:, 2] /= width
boxes_next[:, 1] /= height
boxes_next[:, 3] /= height
"""
should be corrected as:
"""
boxes_pre[:, 0] /= width-1
boxes_pre[:, 2] /= width-1
boxes_pre[:, 1] /= height-1
boxes_pre[:, 3] /= height-1
boxes_next[:, 0] /= width-1
boxes_next[:, 2] /= width-1
boxes_next[:, 1] /= height-1
boxes_next[:, 3] /= height-1
"""
cause when I used the original codes as an example to extract a specific number in a tensor by means of function torch.nn.functional.grid_sample, it wouldn't get the expected number, but when I changed width/height to width-1/height-1 , it came out the expected number.
Does anyone have the same confusion?
The text was updated successfully, but these errors were encountered: