You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make convertToAbsoluteInputBoxes depend on output tensor dimensions
In docTR/onnxTR models the width and height of the input image matches
the "width" and "height" of the output tensor. So us using the
pre-defined static dimensions was fine. But for some of the other
models this doesn't work...
One example is EasyOCR. There the output of the detection model is
only a quarter of the input. While in that particular case it doesn't
really matter, as the dimensions are reduced uniformly in both width
and height, so the results are the same, but calculations are still
using the wrong value.
What does matter though is that the input width and height are not
static. So we cannot get actual width and height from declarative
input properties. In that case mismatch is easily noticeable.
Another example is PaddleOCR. While width and height of the output
matches that of the input, the size of the input is not static there
either, which cause issues with boxes during testing.
Since our assumptions on width and height being static and channel count
being constant are broken, I've relaxed the output shape validation. So
at this point the only place, where this validation does anything, is
class count in orientation and recognition predictors. Kind of
disappointing, but at least the remaining case helps can still help
catching errors.
Two test files were updated, as bumping float to double adjusted
coordinates slightly.
0 commit comments