PaddleX
PaddleX copied to clipboard
paddlex 加载yaml文件没有这个产线名
用的官方镜像paddlex:paddlex3.0.0rc0-paddlepaddle3.0.0rc0-gpu-cuda11.8-cudnn8.6-trt8.5
之前可以正常运行,个把月没碰过现在又不行了。
运行报错,没有layout_parsing_v2is not registered on BasePipeline,如何解决: Traceback (most recent call last): File "/data8T/yajieliu/seal-PaddleOCR/manage.py", line 5, in <module> from app.api.api_handler import RecommendHandler File "/data8T/yajieliu/seal-PaddleOCR/app/api/api_handler.py", line 3, in <module> from app.main import sealpredict File "/data8T/yajieliu/seal-PaddleOCR/app/main.py", line 6, in <module> from app.conf_ocr.conf import * File "/data8T/yajieliu/seal-PaddleOCR/app/conf_ocr/conf.py", line 7, in <module> pipeline = create_pipeline(pipeline="./app/weights/layout_parsing_v2.yaml") File "/home/hnxt/anaconda3/envs/ppocrx/lib/python3.9/site-packages/paddlex/inference/pipelines/__init__.py", line 155, in create_pipeline pipeline = BasePipeline.get(pipeline_name)( File "/home/hnxt/anaconda3/envs/ppocrx/lib/python3.9/site-packages/paddlex/utils/subclass_register.py", line 94, in get raise_class_not_found_error(name, cls, all_entities) File "/home/hnxt/anaconda3/envs/ppocrx/lib/python3.9/site-packages/paddlex/utils/errors/others.py", line 126, in raise_class_not_found_error raise ClassNotFoundException(msg) paddlex.utils.errors.others.ClassNotFoundException:layout_parsing_v2` is not registered on BasePipeline.
The registied entities: [doc_preprocessor, OCR, layout_parsing, PP-StructureV3, PP_ChatOCR_Pipeline, PP-ChatOCRv3-doc, PP-ChatOCRv4-doc, image_classification, object_detection, seal_recognition, table_recognition, table_recognition_v2, multilingual_speech_recognition, formula_recognition, image_multilabel_classification, video_classification, video_detection, anomaly_detection, ts_forecast, ts_anomaly_detection, ts_classification, PP-ShiTuV2, face_recognition, AttributeRecPipeline, pedestrian_attribute_recognition, vehicle_attribute_recognition, semantic_segmentation, instance_segmentation, small_object_detection, rotated_object_detection, human_keypoint_detection, open_vocabulary_detection, open_vocabulary_segmentation, 3d_bev_detection]
这是我layout_parsing_v2.yaml文件配置。
pipeline_name: layout_parsing_v2
use_doc_preprocessor: False use_general_ocr: True use_seal_recognition: True use_table_recognition: False use_formula_recognition: False
SubModules: LayoutDetection: module_name: layout_detection model_name: PP-DocLayout-L model_dir: app/weights/seal/PP-DocLayout-L threshold:
7: 0.3
7: 0.2
layout_nms: True
layout_unclip_ratio: 1.0
layout_merge_bboxes_mode: "large"
SubPipelines: DocPreprocessor: pipeline_name: doc_preprocessor use_doc_orientation_classify: False use_doc_unwarping: False SubModules: DocOrientationClassify: module_name: doc_text_orientation model_name: PP-LCNet_x1_0_doc_ori model_dir: app/weights/seal/PP-LCNet_x1_0_doc_ori DocUnwarping: module_name: image_unwarping model_name: UVDoc model_dir: null
GeneralOCR: pipeline_name: OCR text_type: general use_doc_preprocessor: False use_textline_orientation: True SubModules: TextDetection: module_name: text_detection model_name: PP-OCRv4_server_det model_dir: app/weights/seal/PP-OCRv4_server_det # model_dir: null limit_side_len: 960 limit_type: max
thresh: 0.3
thresh: 0.2
box_thresh: 0.6
unclip_ratio: 2.0
TextLineOrientation:
module_name: textline_orientation
model_name: PP-LCNet_x0_25_textline_ori
model_dir: app/weights/seal/PP-LCNet_x0_25_textline_ori
batch_size: 1
TextRecognition:
module_name: text_recognition
model_name: PP-OCRv4_server_rec_doc
model_dir: app/weights/seal/PP-OCRv4_server_rec_doc
batch_size: 6
score_thresh: 0.0
TableRecognition: pipeline_name: table_recognition_v2 use_layout_detection: False use_doc_preprocessor: False use_ocr_model: False SubModules: TableClassification: module_name: table_classification model_name: PP-LCNet_x1_0_table_cls model_dir: null
WiredTableStructureRecognition:
module_name: table_structure_recognition
model_name: SLANeXt_wired
model_dir: null
WirelessTableStructureRecognition:
module_name: table_structure_recognition
model_name: SLANeXt_wireless
model_dir: null
WiredTableCellsDetection:
module_name: table_cells_detection
model_name: RT-DETR-L_wired_table_cell_det
model_dir: null
WirelessTableCellsDetection:
module_name: table_cells_detection
model_name: RT-DETR-L_wireless_table_cell_det
model_dir: null
SealRecognition: pipeline_name: seal_recognition use_layout_detection: False use_doc_preprocessor: False SubPipelines: SealOCR: pipeline_name: OCR text_type: seal use_doc_preprocessor: False use_textline_orientation: False SubModules: TextDetection: module_name: seal_text_detection model_name: PP-OCRv4_server_seal_det model_dir: app/weights/seal/PP-OCRv4_server_seal_det/inference
model_dir: app/weights/seal/PP-OCRv4_server_seal_det_infer
limit_side_len: 736
limit_type: min
thresh: 0.2
box_thresh: 0.6
unclip_ratio: 0.5
TextRecognition:
module_name: text_recognition
model_name: PP-OCRv4_server_rec
model_dir: app/weights/seal/PP-OCRv4_server_rec
batch_size: 1
score_thresh: 0
FormulaRecognition: pipeline_name: formula_recognition use_layout_detection: False use_doc_preprocessor: False SubModules: FormulaRecognition: module_name: formula_recognition model_name: PP-FormulaNet-L model_dir: null batch_size: 5
您好 使用版面解析产线 配置文件产线名称可以设置为layout_parsing 或 PP-StructureV3
The issue has no response for a long time and will be closed. You can reopen or new another issue if are still confused.
From Bot