Open
Description
🔎 Search before asking
- I have searched the PaddleOCR Docs and found no similar bug report.
- I have searched the PaddleOCR Issues and found no similar bug report.
- I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
🏃♂️ Environment (运行环境)
linux 服务器
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
def init_model():
"""
初始化PPStructure模型。只在应用启动时调用一次。
"""
global pipeline
with model_lock:
if pipeline is None:
try:
# 修正类名和参数
pipeline = PPStructureV3(
use_doc_orientation_classify=True, # 使用文档方向分类
use_doc_unwarping=True, # 使用文档反畸变,
device="gpu:3"
)
logging.info("PPStructure model initialized successfully")
except Exception as e:
logging.error(f"Failed to initialize PPStructure model: {e}")
raise e
return pipeline
Metadata
Metadata
Assignees
Labels
No labels