-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Ignoring annotations outside of an image #1269
Comments
There's multiple questions there, I'll try to split them up:
Generated anchors can't be outside the image batch, but the image batch can have caused a margin around some images. If you have images of different ratios, e.g. an image of shape
We encode our boxes as
Hmm interesting point. I worked out the code treating the x2 and y2 as exclusive, but it seems indeed that |
I see, thank you)
A tough question. Unfortunately I'm not that skilled to give a correct answer. I came across this information while searching for a solution https://stackoverflow.com/a/57247833 |
Have you considered the Darknet approach? It uses single size images and there are lots of ways to resize image (with keeping the aspect ratio or not) in this framework. |
Hmm our approach is basically the same as their second approach, with the exception that they center the image. I'm not sure what the effects of that would be, I would image it doesn't matter much. |
They use a fixed-size network so all images have equal spatial dimensions, |
what about just clamp the size within the image, instead of ignoring them |
This issue has been automatically marked as stale due to the lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi! What is the purpose of doing so? You are trying to ignore anchors whose centres are outside of an image, but according to your code, generated anchors just can't be outside of the image. It's mentioned in the Faster R-CNN paper that cross-bounding anchors are ignored (but FPN doesn't ignore them). Another strange thing there is that you compare x coordinate with the height, not width.
Also, I checked your code and it seems that you doesn't shift width and height of anchors by 1 (pixel ranges are inclusive from both sides and so on, compute_overlap.pyx contains a good example of such shifting)
The text was updated successfully, but these errors were encountered: