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
This is a PyTorch version of RoIAlign.
This implementation is based on crop_and_resize
and supports both forward and backward on CPU and GPU.
NOTE: This repo only supports pytorch < 0.4.
You can find an official version from
facebookresearch/maskrcnn-benchmark.
If you want this project to support pytorch 1.0 please submit an issue and I will
take time to upgrade it.
Introduction
The crop_and_resize function is ported from tensorflow,
and has the same interface with tensorflow version, except the input feature map
should be in NCHW order in PyTorch.
They also have the same output value (error < 1e-5) for both forward and backward as we expected,
see the comparision in test.py.
Note:
Document of crop_and_resize can be found here.
And RoIAlign is a wrap of crop_and_resize
that uses boxes with unnormalized (x1, y1, x2, y2) as input
(while crop_and_resize use normalized (y1, x1, y2, x2) as input).
See more details about the difference of
RoIAlign and crop_and_resize in tensorpack.
Warning:
Currently it only works using the default GPU (index 0)