优化文档检测为接口
This commit is contained in:
@@ -82,7 +82,9 @@ def information_extraction(ie, phrecs, identity):
|
||||
|
||||
image = image_util.read(img_path)
|
||||
target_images = []
|
||||
target_images += detector.get_book_areas(image) # 识别文档区域并裁剪
|
||||
det_time = time.time()
|
||||
target_images += detector.request_book_areas(image) # 识别文档区域并裁剪
|
||||
logging.info(f"检测目标耗时{time.time() - det_time}秒")
|
||||
if not target_images:
|
||||
target_images.append(image) # 识别失败
|
||||
angle_count = defaultdict(int, {"0": 0}) # 分割后图片的最优角度统计
|
||||
|
||||
Reference in New Issue
Block a user