Open quasimik opened 3 years ago
An easy workaround is to make sure that the initial image is square-ish, because infer_scale
only triggers once per instance.
The underlying problem in the example is that the image after downsampling by the network has a size of 1 in one of the dimensions (it would have been 0 if it wasn't for padding).
I think we can extend the checks to make sure that having 1
in the scaled size is a dummy value which can be bypassed in the check.
Although I would say that this is a corner case which is in principle bond not to work as expected anyway (the boxes will most certainly not be correct), so maybe I'd be tempted to say that having an error is fine as well, as at least it points to the user that something is wrong, instead of silently working (and giving bad results)
🐛 Bug
If the first given image is very tall or very wide,
MultiScaleRoIAlign.infer_scale
throws an AssertionError.To Reproduce
in
test.py
:execute:
Expected behavior
Very oblong images should not cause this failure. At the very least, there should be a way to manually set up the pooling scales without relying on heuristics from the initial image.
Environment
Additional context