|
|
@@ -14,6 +14,7 @@ from .base import (
|
|
|
from .paddle_layout_detector import PaddleLayoutDetector
|
|
|
from .paddle_vl_adapter import PaddleVLRecognizer
|
|
|
|
|
|
+from .docling_layout_adapter import DoclingLayoutDetector
|
|
|
# 可选导入 MinerU 适配器
|
|
|
try:
|
|
|
from .mineru_adapter import (
|
|
|
@@ -37,6 +38,9 @@ __all__ = [
|
|
|
# PaddleX 适配器
|
|
|
'PaddleLayoutDetector',
|
|
|
'PaddleVLRecognizer',
|
|
|
+
|
|
|
+ # Docling 适配器
|
|
|
+ 'DoclingLayoutDetector',
|
|
|
]
|
|
|
|
|
|
# 如果 MinerU 可用,添加到导出列表
|
|
|
@@ -67,6 +71,8 @@ def get_layout_detector(config: dict):
|
|
|
if not MINERU_AVAILABLE:
|
|
|
raise ImportError("MinerU adapter not available")
|
|
|
return MinerULayoutDetector(config)
|
|
|
+ elif module == 'docling':
|
|
|
+ return DoclingLayoutDetector(config)
|
|
|
else:
|
|
|
raise ValueError(f"Unknown layout detection module: {module}")
|
|
|
|