Replies: 1 comment 1 reply
-
Paddle编译过程:
然后修改 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[root@localhost cpp_infer]# build/ppocr --det_model_dir=/opt/ocr/PaddleOCR/inference/ch_PP-OCRv3_det_infer/ --rec_model_dir=/opt/ocr/PaddleOCR/inference/ch_PP-OCRv3_rec_infer/ --image_dir=/opt/ocr/PaddleOCR/doc/imgs/11.jpg
In PP-OCRv3, rec_image_shape parameter defaults to '3, 48, 320',if you are using recognition model with PP-OCRv2 or an older version, please set --rec_image_shape='3,32,320
total images num: 1
--- Running analysis [ir_graph_build_pass]
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0614 20:21:49.510432 378241 executor.cc:187] Old Executor is Running.
--- Running analysis [ir_analysis_pass]
--- Running IR pass [simplify_with_basic_ops_pass]
--- Running IR pass [layer_norm_fuse_pass]
--- 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 [gpu_cpu_squeeze2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_reshape2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_flatten2_matmul_fuse_pass]
--- Running IR pass [matmul_v2_scale_fuse_pass]
--- Running IR pass [gpu_cpu_map_matmul_v2_to_mul_pass]
--- Running IR pass [gpu_cpu_map_matmul_v2_to_matmul_pass]
--- Running IR pass [matmul_scale_fuse_pass]
--- Running IR pass [gpu_cpu_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]
I0614 20:21:49.694710 378241 fuse_pass_base.cc:59] --- detected 33 subgraphs
--- Running IR pass [conv_eltwiseadd_bn_fuse_pass]
--- Running IR pass [conv_transpose_bn_fuse_pass]
--- Running IR pass [conv_transpose_eltwiseadd_bn_fuse_pass]
I0614 20:21:49.751570 378241 fuse_pass_base.cc:59] --- detected 1 subgraphs
--- Running IR pass [is_test_pass]
--- Running IR pass [constant_folding_pass]
--- Running analysis [save_optimized_model_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]
I0614 20:21:49.787482 378241 memory_optimize_pass.cc:118] The persistable params in main graph are : 2.23764MB
I0614 20:21:49.801360 378241 memory_optimize_pass.cc:246] Cluster name : batch_norm_41.tmp_0 size: 1920
I0614 20:21:49.801388 378241 memory_optimize_pass.cc:246] Cluster name : conv2d_221.tmp_0 size: 29491200
I0614 20:21:49.801400 378241 memory_optimize_pass.cc:246] Cluster name : batch_norm_4.tmp_3 size: 29491200
I0614 20:21:49.801411 378241 memory_optimize_pass.cc:246] Cluster name : elementwise_add_1 size: 3686400
I0614 20:21:49.801421 378241 memory_optimize_pass.cc:246] Cluster name : tmp_10 size: 22118400
I0614 20:21:49.801431 378241 memory_optimize_pass.cc:246] Cluster name : x size: 11059200
I0614 20:21:49.801441 378241 memory_optimize_pass.cc:246] Cluster name : tmp_1 size: 345600
I0614 20:21:49.801452 378241 memory_optimize_pass.cc:246] Cluster name : hardswish_0.tmp_0 size: 7372800
I0614 20:21:49.801462 378241 memory_optimize_pass.cc:246] Cluster name : nearest_interp_v2_5.tmp_0 size: 5529600
--- Running analysis [ir_graph_to_program_pass]
I0614 20:21:50.085887 378241 analysis_predictor.cc:1934] ======= ir optimization completed =======
I0614 20:21:50.118196 378241 naive_executor.cc:203] --- skip [feed], feed -> x
I0614 20:21:50.127347 378241 naive_executor.cc:203] --- skip [sigmoid_0.tmp_0], fetch -> fetch
In PP-OCRv3, default rec_img_h is 48,if you use other model, you should set the param rec_img_h=32
--- Running analysis [ir_graph_build_pass]
--- Running analysis [ir_analysis_pass]
--- Running IR pass [simplify_with_basic_ops_pass]
--- Running IR pass [layer_norm_fuse_pass]
--- 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 [gpu_cpu_squeeze2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_reshape2_matmul_fuse_pass]
--- Running IR pass [gpu_cpu_flatten2_matmul_fuse_pass]
--- Running IR pass [matmul_v2_scale_fuse_pass]
--- Running IR pass [gpu_cpu_map_matmul_v2_to_mul_pass]
I0614 20:21:50.244401 378241 fuse_pass_base.cc:59] --- detected 9 subgraphs
--- Running IR pass [gpu_cpu_map_matmul_v2_to_matmul_pass]
I0614 20:21:50.247087 378241 fuse_pass_base.cc:59] --- detected 4 subgraphs
--- Running IR pass [matmul_scale_fuse_pass]
--- Running IR pass [gpu_cpu_map_matmul_to_mul_pass]
--- Running IR pass [fc_fuse_pass]
I0614 20:21:50.258428 378241 fuse_pass_base.cc:59] --- detected 9 subgraphs
--- Running IR pass [repeated_fc_relu_fuse_pass]
--- Running IR pass [squared_mat_sub_fuse_pass]
--- Running IR pass [conv_bn_fuse_pass]
I0614 20:21:50.313755 378241 fuse_pass_base.cc:59] --- detected 19 subgraphs
--- Running IR pass [conv_eltwiseadd_bn_fuse_pass]
--- Running IR pass [conv_transpose_bn_fuse_pass]
--- Running IR pass [conv_transpose_eltwiseadd_bn_fuse_pass]
--- Running IR pass [is_test_pass]
--- Running IR pass [constant_folding_pass]
--- Running analysis [save_optimized_model_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]
I0614 20:21:50.357383 378241 memory_optimize_pass.cc:118] The persistable params in main graph are : 10.0928MB
I0614 20:21:50.363580 378241 memory_optimize_pass.cc:246] Cluster name : matmul_v2_4.tmp_0 size: 32
I0614 20:21:50.363600 378241 memory_optimize_pass.cc:246] Cluster name : tmp_7 size: 480
I0614 20:21:50.363611 378241 memory_optimize_pass.cc:246] Cluster name : batch_norm_39.tmp_4 size: 6144
I0614 20:21:50.363621 378241 memory_optimize_pass.cc:246] Cluster name : linear_43.tmp_1 size: 26500
I0614 20:21:50.363631 378241 memory_optimize_pass.cc:246] Cluster name : batch_norm_52.tmp_1 size: 2048
I0614 20:21:50.363641 378241 memory_optimize_pass.cc:246] Cluster name : batch_norm_42.tmp_3 size: 6144
I0614 20:21:50.363651 378241 memory_optimize_pass.cc:246] Cluster name : x size: 576
I0614 20:21:50.363660 378241 memory_optimize_pass.cc:246] Cluster name : transpose_9.tmp_0 size: 480
--- Running analysis [ir_graph_to_program_pass]
I0614 20:21:50.605667 378241 analysis_predictor.cc:1934] ======= ir optimization completed =======
I0614 20:21:50.607167 378241 naive_executor.cc:203] --- skip [feed], feed -> x
I0614 20:21:50.614113 378241 naive_executor.cc:203] --- skip [softmax_5.tmp_0], fetch -> fetch
predict img: /opt/ocr/PaddleOCR/doc/imgs/11.jpg
0 det boxes: [[27,37],[301,39],[301,72],[27,70]] rec text: 纯臻营养护发素 rec score: 0.927906
1 det boxes: [[25,81],[171,83],[171,103],[25,101]] rec text: 产品信息/参数 rec score: 0.851073
2 det boxes: [[28,115],[330,115],[330,131],[28,131]] rec text: 45元每公斤,100公斤起订) rec score: 0.90874
3 det boxes: [[396,122],[423,113],[430,132],[403,142]] rec text: rec score: 0
4 det boxes: [[27,144],[282,144],[282,164],[27,164]] rec text: 每瓶22元,1000瓶起订) rec score: 0.972308
5 det boxes: [[406,156],[428,156],[428,170],[406,170]] rec text: rec score: 0
6 det boxes: [[26,178],[298,178],[298,195],[26,195]] rec text: 【品牌】:代加工方式/OEMODM rec score: 0.904677
7 det boxes: [[26,209],[232,209],[232,226],[26,226]] rec text: 【品名】:纯臻营养护发素 rec score: 0.883685
8 det boxes: [[26,241],[241,241],[241,257],[26,257]] rec text: 【产品编号】:YM-X-3011 rec score: 0.855335
9 det boxes: [[413,236],[429,236],[429,302],[413,302]] rec text: ODMOEM rec score: 0.855649
10 det boxes: [[23,270],[179,269],[179,289],[23,290]] rec text: 【净含量】:220ml rec score: 0.88486
11 det boxes: [[26,303],[251,303],[251,320],[26,320]] rec text: 【适用人群】:适合所有肤质 rec score: 0.900196
12 det boxes: [[26,334],[342,334],[342,351],[26,351]] rec text: 【主要成分】:鲸蜡硬脂醇、燕麦β-葡聚 rec score: 0.880816
13 det boxes: [[27,366],[281,366],[281,382],[27,382]] rec text: 糖、椰油酰胺丙基甜菜碱、泛醒 rec score: 0.875617
14 det boxes: [[368,369],[475,369],[475,385],[368,385]] rec text: (成品包材) rec score: 0.971406
15 det boxes: [[26,397],[361,397],[361,414],[26,414]] rec text: 【主要功能】:可紧致头发磷层,从而达到 rec score: 0.848575
16 det boxes: [[28,428],[372,428],[372,445],[28,445]] rec text: 即时持久改善头发光泽的效果,给干燥的头 rec score: 0.948419
17 det boxes: [[26,458],[134,458],[134,478],[26,478]] rec text: 发足够的滋养 rec score: 0.864855
The detection visualized image saved in ./output//11.jpg
Beta Was this translation helpful? Give feedback.
All reactions