-
Notifications
You must be signed in to change notification settings - Fork 10
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
请教一下grid sample的grid最后一维顺序问题 #7
Comments
您好,交换顺序前gt_box的最后一维顺序为(W,H), 而grid_sample要求是(H, W), 所以需要交换顺序 |
grid中(H, W)是中间二维吧,代码交换的是最后一维 所以交换最后一维之后会导致采样的点位置错了 |
如果我没记错的话,gt_boxes_bev_all在没交换最后一维前的格式是(batch_size, box个数, 9, (W,H)),交换最后一维是需要的 |
最后一维的顺序是(W,H),对应的是input的(Hin,Win) |
Hin是5,Win是9,-1的意思就是第一列,不就是对应的Win吗 |
不好意思有些时间没有梳理这个代码了,具体细节有点记不太清楚,也有可能是在开源的时候重新编写代码引入的bug,我后续check一下,谢谢指出问题 |
附议,我也觉得有问题 |
附议 |
还有一个问题,在后面输入进入torch.nn.functional.grid_sample之前,grid应该归一化吧 |
CVPR2023-UniDistill/unidistill/exps/multisensor_fusion/nuscenes/BEVFusion/BEVFusion_nuscenes_centerhead_camera_exp_distill_fusion.py
Line 225 in 1a31cdb
torch.nn.functional.grid_sample的输入grid疑问,交换顺序之前是xy,交换之后是yx,交换之后是否顺序反了?
参数grid中的最后一维的顺序为( x , y ) (x,y)(x,y),但输入图像大小( H , W ) (H,W)(H,W)对应( y _ s i z e , x _ s i z e ) (y_size,x_size)(y_size,x_size)
参考的
The text was updated successfully, but these errors were encountered: