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
- Layout improvements by @VikParuchuri in #267
- New table model; total refactor by @VikParuchuri in #279
- Add ci workflow by @VikParuchuri in #284
Full Changelog: v0.8.3...v0.9.0