test_ocr_table_structure.yml 1.2 KB
Newer Older
W
wangguanzhong 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
ENV:
  run_mode: paddle
  device: GPU
  min_subgraph_size: 3
  trt_calib_mode: False
  cpu_threads: 1
  trt_use_static: False
  save_img: true
  save_res: true
  return_res: False

MODEL:
  - PPStructureTableStructureOp:
      name: table
      param_path: paddlecv://models/ch_PP-StructureV2_SLANet_infer/inference.pdiparams
      model_path: paddlecv://models/ch_PP-StructureV2_SLANet_infer/inference.pdmodel
      batch_size: 1
      PreProcess:
        - RGB2BGR:
        - ResizeTableImage:
            max_len: 488
        - NormalizeImage:
            scale: 1./255.
            mean: [ 0.485, 0.456, 0.406 ]
            std: [ 0.229, 0.224, 0.225 ]
            order: 'hwc'
        - PaddingTableImage:
            size: [ 488, 488 ]
        - ToCHWImage:
        - ExpandDim:
            axis: 0
      PostProcess:
        - TableLabelDecode:
            character_dict_path: "paddlecv://dict/ocr/table_structure_dict_ch.txt"
            merge_no_span_structure: true
      Inputs:
        - input.image
  - OCRTableOutput:
      name: vis
      Inputs:
        - input.fn
        - input.image
        - table.dt_bboxes
        - table.structures
        - table.scores