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

How to understanding offset? #32

Open
MaskVulcan opened this issue Apr 3, 2018 · 2 comments
Open

How to understanding offset? #32

MaskVulcan opened this issue Apr 3, 2018 · 2 comments

Comments

@MaskVulcan
Copy link

I find that RPN and PSROIPooling all have offset and you set it to 32. I can't understand it?what's its use and where it comes from?

@jackygit-alt
Copy link

Does anyone else know that?

@tokotchd
Copy link

tokotchd commented Apr 9, 2019

So, when you create anchors, you do so in feature space, where the dimensions of the feature maps are something like [batch,7,7,512] not [batch,600,600,3]
When you attempt to scale these into pixel space (to get anchors for the actual image), you multiply the indices of the anchors by some scaling constant.
Now my top left most anchor is still at the origin of my picture, rather than the top left corner of the anchor being at the origin of the picture.
The offset is a constant term you add to the pixel coordinates after scaling anchor coordinates into pixel space to offset each anchor down and to the right. This evenly disperses the anchors throughout the picture, rather than having a higher concentration in the top left corner.
The author uses 32 as an offset because his feature_map to pixel space ratio is (presumably) approximately 64. Each anchor box needs to be offset by one half of a feature map pixel, which becomes 32 pixels in pixel space.

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

3 participants