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
Hi, I was trying to read the source code of ROIAlignLayer.cpp and had some difficulties understanding the bilinear interpolation part in your implementation as following.
Suppose if a ROI bin's width ranges from 0.5 to 2.1, and height ranges from 0.9 to 1.5. Then the hstart=0.9, hend=1.5, wstart=0.5, wend =2.1. And suppose smp = 0.
Then the loop starts with h_idx = floor(0.9) = 0, w_idx =floor(0.5) = 0, bisampled[0] is added with the feature map value at (0,0) multiplying a weight. count = 1.
In the second loop, h_idx = 0, ++w_idx =1, bisampled[0] is added with the feature map value at (0,1) multiplying a bilinear interpolation weight, count = 2
In the third loop, h_idx = 0, ++w_idx =2, bisampled[0] is added with the feature map value at (0,2) multiplying a bilinear interpolation weight. count = 3
In the fourth loop, h_idx = 0, ++w_idx =3, bisampled[0] is added with the feature map value at (0,3) multiplying a bilinear interpolation weight. count =4, then it goes to stop function.
My question is, to get the bisampled[0], isn't it to sum up the bilinear interpolation weighted feature map value at (0,0), (0,1),(1,0) and (1,1) since the upper-left corner of the ROI bin is at (0.9,0.5)? Or is there anything I misunderstood? Hope you can answer my question. Thanks!
The text was updated successfully, but these errors were encountered:
Hi, I was trying to read the source code of ROIAlignLayer.cpp and had some difficulties understanding the bilinear interpolation part in your implementation as following.
Suppose if a ROI bin's width ranges from 0.5 to 2.1, and height ranges from 0.9 to 1.5. Then the hstart=0.9, hend=1.5, wstart=0.5, wend =2.1. And suppose smp = 0.
Then the loop starts with h_idx = floor(0.9) = 0, w_idx =floor(0.5) = 0, bisampled[0] is added with the feature map value at (0,0) multiplying a weight. count = 1.
In the second loop, h_idx = 0, ++w_idx =1, bisampled[0] is added with the feature map value at (0,1) multiplying a bilinear interpolation weight, count = 2
In the third loop, h_idx = 0, ++w_idx =2, bisampled[0] is added with the feature map value at (0,2) multiplying a bilinear interpolation weight. count = 3
In the fourth loop, h_idx = 0, ++w_idx =3, bisampled[0] is added with the feature map value at (0,3) multiplying a bilinear interpolation weight. count =4, then it goes to stop function.
My question is, to get the bisampled[0], isn't it to sum up the bilinear interpolation weighted feature map value at (0,0), (0,1),(1,0) and (1,1) since the upper-left corner of the ROI bin is at (0.9,0.5)? Or is there anything I misunderstood? Hope you can answer my question. Thanks!
The text was updated successfully, but these errors were encountered: