|
@@ -86,6 +86,9 @@ def image_process(image_np, image_path, is_from_pdf=False, is_from_docx=False, u
|
|
|
|
|
|
log("into image_preprocess")
|
|
log("into image_preprocess")
|
|
try:
|
|
try:
|
|
|
|
+ if image_np is None:
|
|
|
|
+ return []
|
|
|
|
+
|
|
# 整体分辨率限制
|
|
# 整体分辨率限制
|
|
if image_np.shape[0] > 2000 or image_np.shape[1] > 2000:
|
|
if image_np.shape[0] > 2000 or image_np.shape[1] > 2000:
|
|
h, w = get_best_predict_size2(image_np, threshold=2000)
|
|
h, w = get_best_predict_size2(image_np, threshold=2000)
|