mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-06-03 21:53:39 +08:00
Prepare 2.7.3 release (#11826)
* fix: Correct misuse of `try_import` from `paddle.utils` (#11820) This commit addresses the incorrect usage of the `try_import` function from `paddle.utils` in both `ppocr/utils/utility.py` and `ppstructure/pdf2word/pdf2word.py`. * bump version to 2.7.3 --------- Co-authored-by: NeterOster <neteroster@gmail.com>
This commit is contained in:
parent
89e0a15ce7
commit
ddaa85ddaf
@ -59,7 +59,7 @@ __all__ = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
SUPPORT_DET_MODEL = ['DB']
|
SUPPORT_DET_MODEL = ['DB']
|
||||||
VERSION = '2.7.2'
|
VERSION = '2.7.3'
|
||||||
SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet']
|
SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet']
|
||||||
BASE_DIR = os.path.expanduser("~/.paddleocr/")
|
BASE_DIR = os.path.expanduser("~/.paddleocr/")
|
||||||
|
|
||||||
|
@ -108,7 +108,8 @@ def check_and_read(img_path):
|
|||||||
return imgvalue, True, False
|
return imgvalue, True, False
|
||||||
elif os.path.basename(img_path)[-3:].lower() == 'pdf':
|
elif os.path.basename(img_path)[-3:].lower() == 'pdf':
|
||||||
from paddle.utils import try_import
|
from paddle.utils import try_import
|
||||||
try_import('fitz')
|
|
||||||
|
fitz = try_import("fitz")
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
imgs = []
|
imgs = []
|
||||||
with fitz.open(img_path) as pdf:
|
with fitz.open(img_path) as pdf:
|
||||||
|
@ -21,9 +21,9 @@ import functools
|
|||||||
import cv2
|
import cv2
|
||||||
import platform
|
import platform
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import fitz
|
|
||||||
from paddle.utils import try_import
|
from paddle.utils import try_import
|
||||||
try_import('fitz')
|
fitz = try_import("fitz")
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from pdf2docx.converter import Converter
|
from pdf2docx.converter import Converter
|
||||||
from qtpy.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar, \
|
from qtpy.QtWidgets import QApplication, QWidget, QPushButton, QProgressBar, \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user