Skip to content

Commit

Permalink
New layout model
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Dec 30, 2024
1 parent f8188f4 commit ffd3f5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ocr_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def table_recognition(img, highres_img, skip_table_detection: bool) -> (Image.Im
labels = []
colors = []

for item in results.rows + results.cols:
for item in results.cells:
adjusted_bboxes.append([
(item.bbox[0] + table_bbox[0]),
(item.bbox[1] + table_bbox[1]),
Expand Down
2 changes: 1 addition & 1 deletion surya/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def TORCH_DEVICE_MODEL(self) -> str:
RECOGNITION_ENCODER_BATCH_DIVISOR: int = 1 # Divisor for batch size in decoder

# Layout
LAYOUT_MODEL_CHECKPOINT: str = "datalab-to/surya_layout0"
LAYOUT_MODEL_CHECKPOINT: str = "datalab-to/surya_layout"
LAYOUT_IMAGE_SIZE: Dict = {"height": 768, "width": 768}
LAYOUT_SLICE_MIN: Dict = {"height": 1500, "width": 1500} # When to start slicing images
LAYOUT_SLICE_SIZE: Dict = {"height": 1200, "width": 1200} # Size of slices
Expand Down

0 comments on commit ffd3f5f

Please sign in to comment.