Something wrong about ROIAlign source code
-
Useless codes here:
https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L101-L105 -
The sampling points are not equally spaced:
https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L110 Is it right to represent theyas
roi_start_h + ph * bin_size_h + (scalar_t)(iy + 1) * bin_size_h / (scalar_t)(sample_num_h+1)
BTW , I can't figure out the function here :
https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L133
such as AT_DISPATCH_FLOATING_TYPES_AND_HALF , features.type() , features.data ,especially the first one ,any relative information for that ?
Thanks !!! :p
Another question: Why '+1' here? It seems not necessary for this op. https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L82-L83
Useless codes here: https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L101-L105
The sampling points are not equally spaced: https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L110
Is it right to represent the
yasroi_start_h + ph * bin_size_h + (scalar_t)(iy + 1) * bin_size_h / (scalar_t)(sample_num_h+1)
- Yes these lines are unused.
- If sample_num is 2, then we want the point at 0.5, 1.5 instead of 2/3, 4/3, which follows the official implementation.
BTW , I can't figure out the function here : https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L133
such as
AT_DISPATCH_FLOATING_TYPES_AND_HALF,features.type(),features.data,especially the first one ,any relative information for that ? Thanks !!! :p
The documentation of PyTorch C++ APIs is quite poor, we need to look into the source code sometimes.
Another question: Why '+1' here? It seems not necessary for this op. https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L82-L83
See #835 for details.
Another question: Why '+1' here? It seems not necessary for this op. https://github.com/open-mmlab/mmdetection/blob/5b9c5dd45fc5446a1c2f6c1fce571ad504e4d9ce/mmdet/ops/roi_align/src/roi_align_kernel.cu#L82-L83
See #835 for details.
Thanks for your reply !!!!