Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occasions where sampling locations are outside of the image boundary #278

Open
vlee-harmonicinc opened this issue May 7, 2020 · 0 comments

Comments

@vlee-harmonicinc
Copy link

DCN and DCNv2 is very powerful. EDVR, winner of NTIRE 2019 used DCNv2 for frame alignment. But it seems that it is unstable when training. Author of EDVR said unstable offset phenomenon is very frequent.
According to DCNv2_op/README.md,

To better handle occasions where sampling locations are outside of the image boundary.
In the previous operator, if the sampling location is outside of the feature map boundary, its sampled value would be zero. Thus, the gradient with respect to learnable offset would be zero. We found such a scheme may deteriate the performance in ImageNet classification (perhaps because the feature maps are of low resolution). For object detection on COCO, both the previous and the updated operators deliver the same results.
In the new operator, if the sampling location is within one pixel outside of the feature map boundary, bilinear sampling would also be applied. And gradient with respect to learnable offset can be non zero for such locations. This is implemented by padding zeros (by one row/column) outside of the boundaries of feature maps, and performing bilinear sampling on the padded feature maps.

I'm wondering why zero padding / bilinear with zero is used instead of using to the pixel of boundary? Would the deformable layer learnt to throw a large offset that out-of-boundary to make the gradient zero?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant