PaddleOCR
PaddleOCR copied to clipboard
added sliding window for large image inference
PaddleOCR does not work on large documents/images, this feature consists of a sliding window inference method, which although takes longer (expectedly), uses a sliding window to create slices of the input image and run detection+recognition on it. Unlike the default code, it gives correct results. The vertical and horizontal strides are adjustable by the user.
Output on an image of dimensions (5088x3600):
Without sliding window:
With sliding window:
Note: It could use a postprocessing step where the adjacent detections are merged into one, if needed.