优化命名,类与模块最好不要重名
This commit is contained in:
@@ -11,7 +11,7 @@ from tenacity import retry, stop_after_attempt, wait_random
|
||||
from paddle_detection import PADDLE_DET
|
||||
from paddle_detection.deploy.third_engine.onnx.infer import PredictConfig
|
||||
from paddle_detection.deploy.third_engine.onnx.preprocess import Compose
|
||||
from util import image_util, util
|
||||
from util import image_util, common_util
|
||||
|
||||
|
||||
def predict_image(infer_config, predictor, img_path):
|
||||
@@ -45,7 +45,7 @@ def get_book_areas(image):
|
||||
with tempfile.NamedTemporaryFile(delete=False, suffix=".jpg") as temp_file:
|
||||
cv2.imwrite(temp_file.name, image)
|
||||
detect_result = detect_image(temp_file.name)
|
||||
util.delete_temp_file(temp_file.name)
|
||||
common_util.delete_temp_file(temp_file.name)
|
||||
book_areas = detect_result[73]
|
||||
result = []
|
||||
for book_area in book_areas:
|
||||
|
||||
Reference in New Issue
Block a user