longcw / RoIAlign.pytorch

RoIAlign & crop_and_resize for PyTorch
554 stars 103 forks source link

pytorch 1.2.0 c++ interface (new-style torch.autograd.Function) #34

Closed meikuam closed 5 years ago

meikuam commented 5 years ago

Get rid of deprecation warnings with old-style autograd.Function.

xiaoyaoyang commented 5 years ago

Tried to install it with OSX Catalina, and got error error: unsupported option '-fopenmp'. Do you think we should replace this roi_align with roi_align from torchvision?

meikuam commented 5 years ago

For '-fopenmp' you could just remove this flag from setup.py file (adds OpenMP capability to CPU implementation): https://github.com/meikuam/RoIAlign.pytorch/blob/master/setup.py#L9 https://github.com/meikuam/RoIAlign.pytorch/blob/master/setup.py#L19

I use this operation for backward compatibility of my project. Since torchvision 0.3 and pytorch 1.1.0 you can use roi_align from: torchvision.ops.roi_align But there are some differences in arguments. Like for this implementation you should pass three args:

torchvision implementation reqiures:

I think if you intend to use torchvision.models.detection.maskrcnn_resnet50_fpn, your choise is using torchvision implementation.

I did not make comparisons on the speed of work, but I think that they are similar.