Skip to content

Refactor surya; new table recognition model

Latest
Compare
Choose a tag to compare
@VikParuchuri VikParuchuri released this 22 Jan 18:45
bdda488

Refactor

This is a complete refactor of surya - the code is now cleaner and better organized. Models are now imported and used differently, here is an example for OCR:

from PIL import Image
from surya.recognition import RecognitionPredictor
from surya.detection import DetectionPredictor

image = Image.open(IMAGE_PATH)
langs = ["en"] # Replace with your languages or pass None (recommended to use None)
recognition_predictor = RecognitionPredictor()
detection_predictor = DetectionPredictor()

predictions = recognition_predictor([image], [langs], detection_predictor)

See the README for how to use other models.

Table recognition

There is a new table recognition model which detects colspans/rowspans better, along with header cells. It also isn't as complex to use, since it operates on just the images versus the images and bboxes.

What's Changed

Full Changelog: v0.8.3...v0.9.0