aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.39k stars 652 forks source link

Some questions about BezierAlign in BeizerAlign_cpu.cpp #268

Closed northwill closed 3 years ago

northwill commented 3 years ago

in AdelaiDet/adet/layers/csrc/BezierAlign/BezierAlign_cpu.cpp, `for (int iy = 0; iy < iy_upper; iy++) { const T yy = y_center - (T)0.5 bin_size_h + static_cast(iy + .5f) bin_size_h / static_cast(roi_bin_grid_h); // e.g., 0.5, 1.5

    for (int ix = 0; ix < ix_upper; ix++)
    {
        const T xx = x_center - (T)0.5 * bin_size_w +static_cast<T>(ix + .5f) * bin_size_w /static_cast<T>(roi_bin_grid_w)`

Can you roughly explain what this code does,cause I'm not very familiar with the previous implementation of ROIAlign in Caffe about sampling,thx!

Yuliang-Liu commented 3 years ago

Finding the coordinates of the referenced point for bilinear interpolation.