mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-09-24 23:10:23 +08:00
refactor(magic_pdf): update paddleocr module import paths
- Modify import paths for paddleocr utilities in ocr_utils.py and ppocr_273_mod.py - Change from `ppocr.utils.utility` to `paddleocr.ppocr.utils.utility` - Update related import statements in two files to reflect the new path
This commit is contained in:
@@ -7,7 +7,7 @@ import base64
|
||||
from magic_pdf.libs.boxbase import __is_overlaps_y_exceeds_threshold
|
||||
from magic_pdf.pre_proc.ocr_dict_merge import merge_spans_to_line
|
||||
|
||||
from ppocr.utils.utility import check_and_read
|
||||
from paddleocr.ppocr.utils.utility import check_and_read
|
||||
|
||||
|
||||
def img_decode(content: bytes):
|
||||
|
||||
@@ -4,10 +4,10 @@ import cv2
|
||||
import numpy as np
|
||||
|
||||
from paddleocr import PaddleOCR
|
||||
from ppocr.utils.logging import get_logger
|
||||
from ppocr.utils.utility import alpha_to_color, binarize_img
|
||||
from tools.infer.predict_system import sorted_boxes
|
||||
from tools.infer.utility import get_rotate_crop_image, get_minarea_rect_crop
|
||||
from paddleocr.ppocr.utils.logging import get_logger
|
||||
from paddleocr.ppocr.utils.utility import alpha_to_color, binarize_img
|
||||
from paddleocr.tools.infer.predict_system import sorted_boxes
|
||||
from paddleocr.tools.infer.utility import get_rotate_crop_image, get_minarea_rect_crop
|
||||
|
||||
from magic_pdf.model.sub_modules.ocr.paddleocr.ocr_utils import update_det_boxes, merge_det_boxes, check_img
|
||||
|
||||
|
||||
Reference in New Issue
Block a user