[rotation] Fix handling of bounding boxes in predictor when expand=True #443
Closed
Description
In our current OCR predictor, there is a potential issue with rotation at the detection stage:
- by default,
expand=False
in rotations: this means that a segment at the very top right end of the image, if rotated 45°, would go out of bounds and won't become a box candidate. Here we miss potential detections - if we simply switch to
expand=True
: some extra care needs to be taken to rotate and reproject bounding boxes relatively to the initial image (and with relative coords). As of now, making this switch would most likely cause a lot of problems.
This will require some heavy discussions to handle the matter properly in the long term.