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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
| [root@instance-epknpagk ~]# paddleocr --image_dir ocr_20211023140320.png --use_gpu false /usr/lib/python3.6/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /usr/local/lib64/python3.6/site-packages/paddle/fluid/framework.py:301: UserWarning: You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default. "You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default." [2021/10/23 14:05:27] root WARNING: version PP-OCRv2 not support cls models, use version PP-OCR instead Namespace(benchmark=False, cls_batch_num=6, cls_image_shape='3, 48, 192', cls_model_dir='/root/.paddleocr/2.3.0.1/ocr/cls/ch_ppocr_mobile_v2.0_cls_infer', cls_thresh=0.9, cpu_threads=10, det=True, det_algorithm='DB', det_db_box_thresh=0.6, det_db_score_mode='fast', det_db_thresh=0.3, det_db_unclip_ratio=1.5, det_east_cover_thresh=0.1, det_east_nms_thresh=0.2, det_east_score_thresh=0.8, det_limit_side_len=960, det_limit_type='max', det_model_dir='/root/.paddleocr/2.3.0.1/ocr/det/ch/ch_PP-OCRv2_det_infer', det_sast_nms_thresh=0.2, det_sast_polygon=False, det_sast_score_thresh=0.5, drop_score=0.5, e2e_algorithm='PGNet', e2e_char_dict_path='./ppocr/utils/ic15_dict.txt', e2e_limit_side_len=768, e2e_limit_type='max', e2e_model_dir=None, e2e_pgnet_mode='fast', e2e_pgnet_polygon=True, e2e_pgnet_score_thresh=0.5, e2e_pgnet_valid_set='totaltext', enable_mkldnn=False, gpu_mem=500, help='==SUPPRESS==', image_dir='ocr_20211023140320.png', ir_optim=True, label_list=['0', '180'], lang='ch', layout_path_model='lp://PubLayNet/ppyolov2_r50vd_dcn_365e_publaynet/config', max_batch_size=10, max_text_length=25, min_subgraph_size=15, output='./output/table', precision='fp32', process_id=0, rec=True, rec_algorithm='CRNN', rec_batch_num=6, rec_char_dict_path='/usr/local/lib/python3.6/site-packages/paddleocr/ppocr/utils/ppocr_keys_v1.txt', rec_char_type='ch', rec_image_shape='3, 32, 320', rec_model_dir='/root/.paddleocr/2.3.0.1/ocr/rec/ch/ch_PP-OCRv2_rec_infer', save_log_path='./log_output/', show_log=True, table_char_dict_path=None, table_char_type='en', table_max_len=488, table_model_dir=None, total_process_num=1, type='ocr', use_angle_cls=False, use_dilation=False, use_gpu=False, use_mp=False, use_pdserving=False, use_space_char=True, use_tensorrt=False, version='PP-OCRv2', vis_font_path='./doc/fonts/simfang.ttf', warmup=True) --- Running analysis [ir_graph_build_pass] --- Running analysis [ir_graph_clean_pass] --- Running analysis [ir_analysis_pass] --- Running IR pass [simplify_with_basic_ops_pass] --- Running IR pass [layer_norm_fuse_pass] --- Fused 0 subgraphs into layer_norm op. --- Running IR pass [attention_lstm_fuse_pass] --- Running IR pass [seqconv_eltadd_relu_fuse_pass] --- Running IR pass [seqpool_cvm_concat_fuse_pass] --- Running IR pass [mul_lstm_fuse_pass] --- Running IR pass [fc_gru_fuse_pass] --- Running IR pass [mul_gru_fuse_pass] --- Running IR pass [seq_concat_fc_fuse_pass] --- Running IR pass [squeeze2_matmul_fuse_pass] --- Running IR pass [reshape2_matmul_fuse_pass] --- Running IR pass [flatten2_matmul_fuse_pass] --- Running IR pass [map_matmul_to_mul_pass] --- Running IR pass [fc_fuse_pass] --- Running IR pass [repeated_fc_relu_fuse_pass] --- Running IR pass [squared_mat_sub_fuse_pass] --- Running IR pass [conv_bn_fuse_pass] I1023 14:05:27.458253 31860 graph_pattern_detector.cc:91] --- detected 33 subgraphs --- Running IR pass [conv_eltwiseadd_bn_fuse_pass] --- Running IR pass [conv_transpose_bn_fuse_pass] --- Running IR pass [is_test_pass] --- Running IR pass [runtime_context_cache_pass] --- Running analysis [ir_params_sync_among_devices_pass] --- Running analysis [adjust_cudnn_workspace_size_pass] --- Running analysis [inference_op_replace_pass] --- Running analysis [memory_optimize_pass] I1023 14:05:27.481014 31860 memory_optimize_pass.cc:199] Cluster name : batch_norm_68.tmp_0 size: 1920 I1023 14:05:27.481048 31860 memory_optimize_pass.cc:199] Cluster name : conv2d_185.tmp_0 size: 1382400 I1023 14:05:27.481055 31860 memory_optimize_pass.cc:199] Cluster name : conv2d_150.tmp_0 size: 29491200 I1023 14:05:27.481062 31860 memory_optimize_pass.cc:199] Cluster name : elementwise_add_5 size: 576000 I1023 14:05:27.481066 31860 memory_optimize_pass.cc:199] Cluster name : nearest_interp_v2_3.tmp_0 size: 5529600 I1023 14:05:27.481071 31860 memory_optimize_pass.cc:199] Cluster name : batch_norm_31.tmp_3 size: 29491200 I1023 14:05:27.481076 31860 memory_optimize_pass.cc:199] Cluster name : conv2d_182.tmp_0 size: 22118400 I1023 14:05:27.481079 31860 memory_optimize_pass.cc:199] Cluster name : x size: 11059200 I1023 14:05:27.481083 31860 memory_optimize_pass.cc:199] Cluster name : batch_norm_30.tmp_3 size: 7372800 --- Running analysis [ir_graph_to_program_pass] I1023 14:05:27.529305 31860 analysis_predictor.cc:636] ======= optimize end ======= I1023 14:05:27.533017 31860 naive_executor.cc:98] --- skip [feed], feed -> x I1023 14:05:27.535477 31860 naive_executor.cc:98] --- skip [batch_norm_31.tmp_3], fetch -> fetch --- Running analysis [ir_graph_build_pass] --- Running analysis [ir_graph_clean_pass] --- Running analysis [ir_analysis_pass] --- Running IR pass [simplify_with_basic_ops_pass] --- Running IR pass [layer_norm_fuse_pass] --- Fused 0 subgraphs into layer_norm op. --- Running IR pass [attention_lstm_fuse_pass] --- Running IR pass [seqconv_eltadd_relu_fuse_pass] --- Running IR pass [seqpool_cvm_concat_fuse_pass] --- Running IR pass [mul_lstm_fuse_pass] --- Running IR pass [fc_gru_fuse_pass] --- Running IR pass [mul_gru_fuse_pass] --- Running IR pass [seq_concat_fc_fuse_pass] --- Running IR pass [squeeze2_matmul_fuse_pass] --- Running IR pass [reshape2_matmul_fuse_pass] --- Running IR pass [flatten2_matmul_fuse_pass] --- Running IR pass [map_matmul_to_mul_pass] I1023 14:05:27.574136 31860 graph_pattern_detector.cc:91] --- detected 2 subgraphs --- Running IR pass [fc_fuse_pass] I1023 14:05:27.575150 31860 graph_pattern_detector.cc:91] --- detected 2 subgraphs --- Running IR pass [repeated_fc_relu_fuse_pass] --- Running IR pass [squared_mat_sub_fuse_pass] --- Running IR pass [conv_bn_fuse_pass] I1023 14:05:27.584664 31860 graph_pattern_detector.cc:91] --- detected 14 subgraphs --- Running IR pass [conv_eltwiseadd_bn_fuse_pass] --- Running IR pass [conv_transpose_bn_fuse_pass] --- Running IR pass [is_test_pass] --- Running IR pass [runtime_context_cache_pass] --- Running analysis [ir_params_sync_among_devices_pass] --- Running analysis [adjust_cudnn_workspace_size_pass] --- Running analysis [inference_op_replace_pass] --- Running analysis [memory_optimize_pass] I1023 14:05:27.595206 31860 memory_optimize_pass.cc:199] Cluster name : lstm_1._generated_var_0 size: 1 I1023 14:05:27.595235 31860 memory_optimize_pass.cc:199] Cluster name : lstm_1.tmp_3 size: 1 I1023 14:05:27.595240 31860 memory_optimize_pass.cc:199] Cluster name : softmax_0.tmp_0 size: 662500 I1023 14:05:27.595247 31860 memory_optimize_pass.cc:199] Cluster name : batch_norm_33.tmp_2 size: 204800 I1023 14:05:27.595254 31860 memory_optimize_pass.cc:199] Cluster name : x size: 38400 I1023 14:05:27.595258 31860 memory_optimize_pass.cc:199] Cluster name : lstm_1.tmp_2 size: 1024 I1023 14:05:27.595263 31860 memory_optimize_pass.cc:199] Cluster name : student_ctc_head_2.tmp_1 size: 662500 I1023 14:05:27.595268 31860 memory_optimize_pass.cc:199] Cluster name : batch_norm_52.tmp_1 size: 2048 I1023 14:05:27.595271 31860 memory_optimize_pass.cc:199] Cluster name : lstm_1.tmp_1 size: 1024 --- Running analysis [ir_graph_to_program_pass] I1023 14:05:27.623514 31860 analysis_predictor.cc:636] ======= optimize end ======= I1023 14:05:27.625537 31860 naive_executor.cc:98] --- skip [feed], feed -> x I1023 14:05:27.627077 31860 naive_executor.cc:98] --- skip [student_ctc_head_2.tmp_1], fetch -> fetch [2021/10/23 14:05:27] root INFO: **********ocr_20211023140320.png********** [2021/10/23 14:05:28] root DEBUG: dt_boxes num : 15, elapse : 0.39180588722229004 [2021/10/23 14:05:31] root DEBUG: rec_res num : 15, elapse : 3.1125948429107666 [2021/10/23 14:05:31] root INFO: [[[27.0, 21.0], [76.0, 21.0], [76.0, 40.0], [27.0, 40.0]], ('学而篇', 0.92950207)] [2021/10/23 14:05:31] root INFO: [[[30.0, 77.0], [76.0, 77.0], [76.0, 92.0], [30.0, 92.0]], ('子日:', 0.9615998)] [2021/10/23 14:05:31] root INFO: [[[83.0, 78.0], [657.0, 78.0], [657.0, 92.0], [83.0, 92.0]], ('"学而时习之,不亦说乎?有朋自远方来,不亦乐乎?人不知而不温,不亦君子乎?', 0.9332169)] [2021/10/23 14:05:31] root INFO: [[[27.0, 121.0], [910.0, 122.0], [910.0, 139.0], [27.0, 138.0]], ('有子日:“其为人也孝弟而好犯上者,鲜矣;不好犯上而好作乱者,未之有也。君子务本,本立而道生。孝弟也者,其为仁之本', 0.95606136)] [2021/10/23 14:05:31] root INFO: [[[27.0, 150.0], [56.0, 150.0], [56.0, 170.0], [27.0, 170.0]], ('与!"', 0.88232946)] [2021/10/23 14:05:31] root INFO: [[[30.0, 200.0], [224.0, 200.0], [224.0, 213.0], [30.0, 213.0]], ('子日:"巧言令色,鲜仁!', 0.93246955)] [2021/10/23 14:05:31] root INFO: [[[30.0, 246.0], [522.0, 246.0], [522.0, 259.0], [30.0, 259.0]], ('曾子日“吾日三省昔影:为人谋而不思平7与朋友交而不信平?传不习平?', 0.8734449)] [2021/10/23 14:05:31] root INFO: [[[30.0, 291.0], [419.0, 291.0], [419.0, 305.0], [30.0, 305.0]], ('子日:“道千乘之国.敬事而信,节用而爱人,使民以时。', 0.93525136)] [2021/10/23 14:05:31] root INFO: [[[28.0, 335.0], [603.0, 336.0], [603.0, 353.0], [28.0, 352.0]], ('子日:“弟子入则孝,出则弟,谨而信,泛爱众,而亲仁。行有余力,则以学文。', 0.99160206)] [2021/10/23 14:05:31] root INFO: [[[29.0, 382.0], [87.0, 382.0], [87.0, 399.0], [29.0, 399.0]], ('子夏日:', 0.96413237)] [2021/10/23 14:05:31] root INFO: [[[94.0, 381.0], [803.0, 383.0], [803.0, 400.0], [93.0, 398.0]], ('“贤贤易色;事父母,能竭其力;事君,能致其身;与朋友交,言而有信。虽日未学,吾必谓之学矣。', 0.9826589)] [2021/10/23 14:05:31] root INFO: [[[30.0, 429.0], [76.0, 429.0], [76.0, 443.0], [30.0, 443.0]], ('子日:', 0.9726858)] [2021/10/23 14:05:31] root INFO: [[[77.0, 427.0], [567.0, 428.0], [567.0, 444.0], [77.0, 443.0]], ('“君子不重则不威,学则不固。主忠信,无友不如己者,过则勿惮改。', 0.9420074)] [2021/10/23 14:05:31] root INFO: [[[29.0, 474.0], [84.0, 474.0], [84.0, 490.0], [29.0, 490.0]], ('曾子日:', 0.97829574)] [2021/10/23 14:05:31] root INFO: [[[102.0, 476.0], [274.0, 476.0], [274.0, 489.0], [102.0, 489.0]], ('“绎追远,民德归厚矣,', 0.86066586)]
|