Эх сурвалжийг харах

feat(model_factory): add support for MinerU VL layout detector

- Introduced a new layout detector, MinerUVLLayoutDetector, to the ModelFactory class for enhanced layout detection capabilities.
- This addition allows for improved processing of documents using the MinerU VL model, expanding the functionality of the OCR tools.
zhch158_admin 2 өдөр өмнө
parent
commit
8a3471cf83

+ 3 - 0
ocr_tools/universal_doc_parser/core/model_factory.py

@@ -48,6 +48,9 @@ class ModelFactory:
         elif module_name == 'mineru':
             from models.adapters import MinerULayoutDetector
             detector = MinerULayoutDetector(config)
+        elif module_name == 'mineru_vl':
+            from models.adapters import MinerUVLLayoutDetector
+            detector = MinerUVLLayoutDetector(config)
         elif module_name == 'smart_router':
             from .layout_model_router import SmartLayoutRouter
             detector = SmartLayoutRouter(config)