PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
43.9k stars 7.8k forks source link

crnn 算法训练 acc 一直是0 #406

Closed xxllp closed 4 years ago

xxllp commented 4 years ago

你好 我训练个中文的识别数据 ,配置都改了 但是模型的结果一直如下 也没啥改进 这个应该是啥问题呢 预训练模型我也加载了

2020-07-23 10:23:14,404-INFO: epoch: 0, iter: 70, lr: 0.000500, 'loss': 24589.031, 'acc': 0.0, time: 0.311 2020-07-23 10:23:17,498-INFO: epoch: 0, iter: 80, lr: 0.000500, 'loss': 20268.621, 'acc': 0.0, time: 0.310 2020-07-23 10:23:20,597-INFO: epoch: 0, iter: 90, lr: 0.000500, 'loss': 19371.156, 'acc': 0.0, time: 0.310 2020-07-23 10:23:23,695-INFO: epoch: 0, iter: 100, lr: 0.000500, 'loss': 18829.586, 'acc': 0.0, time: 0.315 2020-07-23 10:23:26,796-INFO: epoch: 0, iter: 110, lr: 0.000500, 'loss': 18637.812, 'acc': 0.0, time: 0.309 2020-07-23 10:23:29,901-INFO: epoch: 0, iter: 120, lr: 0.000500, 'loss': 18484.93, 'acc': 0.0, time: 0.310 2020-07-23 10:23:33,006-INFO: epoch: 0, iter: 130, lr: 0.000500, 'loss': 18289.287, 'acc': 0.0, time: 0.309 2020-07-23 10:23:36,134-INFO: epoch: 0, iter: 140, lr: 0.000500, 'loss': 18245.352, 'acc': 0.0, time: 0.311 2020-07-23 10:23:39,251-INFO: epoch: 0, iter: 150, lr: 0.000500, 'loss': 18166.889, 'acc': 0.0, time: 0.311 2020-07-23 10:23:42,439-INFO: epoch: 0, iter: 160, lr: 0.000500, 'loss': 18140.8, 'acc': 0.0, time: 0.311 2020-07-23 10:23:45,565-INFO: epoch: 0, iter: 170, lr: 0.000500, 'loss': 18062.816, 'acc': 0.0, time: 0.309 2020-07-23 10:23:48,697-INFO: epoch: 0, iter: 180, lr: 0.000500, 'loss': 18038.531, 'acc': 0.0, time: 0.310 2020-07-23 10:23:51,834-INFO: epoch: 0, iter: 190, lr: 0.000500, 'loss': 18011.63, 'acc': 0.0, time: 0.313 2020-07-23 10:23:54,974-INFO: epoch: 0, iter: 200, lr: 0.000500, 'loss': 17986.59, 'acc': 0.0, time: 0.312

xxllp commented 4 years ago

表现就是loss 几千 acc 一直为0

LDOUBLEV commented 4 years ago

预训练模型是否加载成功?看Loss在下降,多训练会试试,一开始acc为0是正常的

xxllp commented 4 years ago

2020-07-23 11:25:24,010-INFO: Loading parameters from ./pretrain_models/rec_mv3_none_bilstm_ctc/best_accuracy... 2020-07-23 11:25:24,100-WARNING: variable conv7_se_1_weights not used 2020-07-23 11:25:24,100-WARNING: variable conv9_linear_bn_variance not used 2020-07-23 11:25:24,100-WARNING: variable conv11_depthwise_bn_offset not used 2020-07-23 11:25:24,100-WARNING: variable conv6_se_1_weights not used 2020-07-23 11:25:24,100-WARNING: variable conv9_expand_bn_variance not used 2020-07-23 11:25:24,100-WARNING: variable conv9_linear_bn_offset not used 2020-07-23 11:25:24,100-WARNING: variable conv3_depthwise_bn_variance not used 2020-07-23 11:25:24,100-WARNING: variable conv6_se_2_offset not used 2020-07-23 11:25:24,100-WARNING: variable conv8_linear_bn_mean not used 2020-07-23 11:25:24,101-WARNING: variable conv3_depthwise_weights not used 2020-07-23 11:25:24,101-WARNING: variable lstm_st2_fc2_b not used 2020-07-23 11:25:24,101-WARNING: variable conv4_linear_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv8_linear_bn_offset not used 2020-07-23 11:25:24,101-WARNING: variable conv12_expand_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv12_se_2_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv5_se_1_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv10_linear_bn_scale not used 2020-07-23 11:25:24,101-WARNING: variable conv4_expand_bn_offset not used 2020-07-23 11:25:24,101-WARNING: variable conv5_expand_bn_variance not used 2020-07-23 11:25:24,101-WARNING: variable conv5_se_2_offset not used 2020-07-23 11:25:24,101-WARNING: variable conv8_expand_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv4_depthwise_weights not used 2020-07-23 11:25:24,101-WARNING: variable conv12_linear_bn_scale not used 2020-07-23 11:25:24,101-WARNING: variable conv12_depthwise_bn_mean not used 2020-07-23 11:25:24,101-WARNING: variable conv7_depthwise_bn_mean not used 2020-07-23 11:25:24,101-WARNING: variable conv11_depthwise_bn_mean not used 2020-07-23 11:25:24,101-WARNING: variable conv6_se_1_offset not used 2020-07-23 11:25:24,102-WARNING: variable conv10_expand_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv6_depthwise_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv6_expand_bn_scale not used 2020-07-23 11:25:24,102-WARNING: variable conv6_expand_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv12_se_2_offset not used 2020-07-23 11:25:24,102-WARNING: variable conv9_linear_bn_scale not used 2020-07-23 11:25:24,102-WARNING: variable conv8_linear_weights not used 2020-07-23 11:25:24,102-WARNING: variable conv7_depthwise_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv5_expand_bn_mean not used 2020-07-23 11:25:24,102-WARNING: variable conv5_depthwise_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv12_depthwise_bn_scale not used 2020-07-23 11:25:24,102-WARNING: variable conv9_expand_weights not used 2020-07-23 11:25:24,102-WARNING: variable conv12_expand_bn_variance not used 2020-07-23 11:25:24,102-WARNING: variable conv10_linear_weights not used 2020-07-23 11:25:24,102-WARNING: variable conv11_linear_bn_scale not used 2020-07-23 11:25:24,102-WARNING: variable conv6_depthwise_bn_scale not used 2020-07-23 11:25:24,102-WARNING: variable conv4_expand_weights not used 2020-07-23 11:25:24,102-WARNING: variable ctc_fc_b_attr not used 2020-07-23 11:25:24,102-WARNING: variable conv12_depthwise_bn_offset not used 2020-07-23 11:25:24,102-WARNING: variable conv4_depthwise_bn_variance not used 2020-07-23 11:25:24,103-WARNING: variable conv5_depthwise_bn_scale not used 2020-07-23 11:25:24,103-WARNING: variable conv12_se_1_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv12_expand_bn_scale not used 2020-07-23 11:25:24,103-WARNING: variable conv6_se_2_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv10_linear_bn_variance not used 2020-07-23 11:25:24,103-WARNING: variable conv11_depthwise_bn_scale not used 2020-07-23 11:25:24,103-WARNING: variable lstm_st2_out1_b not used 2020-07-23 11:25:24,103-WARNING: variable conv10_expand_bn_mean not used 2020-07-23 11:25:24,103-WARNING: variable conv4_depthwise_bn_mean not used 2020-07-23 11:25:24,103-WARNING: variable conv12_linear_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv7_linear_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv10_depthwise_bn_scale not used 2020-07-23 11:25:24,103-WARNING: variable lstm_st1_out2_b not used 2020-07-23 11:25:24,103-WARNING: variable conv5_se_1_offset not used 2020-07-23 11:25:24,103-WARNING: variable conv3_expand_bn_mean not used 2020-07-23 11:25:24,103-WARNING: variable conv5_se_2_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv7_expand_bn_mean not used 2020-07-23 11:25:24,103-WARNING: variable conv5_depthwise_weights not used 2020-07-23 11:25:24,103-WARNING: variable conv9_linear_bn_mean not used 2020-07-23 11:25:24,103-WARNING: variable conv3_depthwise_bn_offset not used 2020-07-23 11:25:24,104-WARNING: variable conv7_se_2_weights not used 2020-07-23 11:25:24,104-WARNING: variable conv7_depthwise_weights not used 2020-07-23 11:25:24,104-WARNING: variable conv8_linear_bn_scale not used 2020-07-23 11:25:24,104-WARNING: variable lstm_st2_fc1_w not used 2020-07-23 11:25:24,104-WARNING: variable conv5_depthwise_bn_offset not used 2020-07-23 11:25:24,104-WARNING: variable conv10_depthwise_weights not used 2020-07-23 11:25:24,104-WARNING: variable conv_last_bn_variance not used 2020-07-23 11:25:24,104-WARNING: variable conv4_depthwise_bn_offset not used 2020-07-23 11:25:24,104-WARNING: variable conv9_expand_bn_scale not used 2020-07-23 11:25:24,104-WARNING: variable conv10_depthwise_bn_offset not used 2020-07-23 11:25:24,104-WARNING: variable conv6_depthwise_weights not used 2020-07-23 11:25:24,104-WARNING: variable conv12_linear_bn_variance not used 2020-07-23 11:25:24,104-WARNING: variable conv11_expand_bn_variance not used 2020-07-23 11:25:24,104-WARNING: variable conv9_depthwise_bn_mean not used 2020-07-23 11:25:24,104-WARNING: variable conv9_linear_weights not used 2020-07-23 11:25:24,104-WARNING: variable conv9_depthwise_bn_variance not used 2020-07-23 11:25:24,104-WARNING: variable lstm_st1_fc2_w not used 2020-07-23 11:25:24,104-WARNING: variable lstm_st2_out2_w not used 2020-07-23 11:25:24,104-WARNING: variable conv11_depthwise_weights not used 2020-07-23 11:25:24,104-WARNING: variable lstm_st1_fc1_w not used 2020-07-23 11:25:24,105-WARNING: variable conv4_expand_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv7_depthwise_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv11_expand_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv7_se_1_offset not used 2020-07-23 11:25:24,105-WARNING: variable conv6_linear_weights not used 2020-07-23 11:25:24,105-WARNING: variable conv11_depthwise_bn_variance not used 2020-07-23 11:25:24,105-WARNING: variable conv7_expand_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv_last_bn_offset not used 2020-07-23 11:25:24,105-WARNING: variable lstm_st1_out1_b not used 2020-07-23 11:25:24,105-WARNING: variable lstm_st2_out2_b not used 2020-07-23 11:25:24,105-WARNING: variable conv8_expand_bn_mean not used 2020-07-23 11:25:24,105-WARNING: variable conv6_expand_weights not used 2020-07-23 11:25:24,105-WARNING: variable conv12_linear_bn_offset not used 2020-07-23 11:25:24,105-WARNING: variable conv8_expand_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv_last_bn_scale not used 2020-07-23 11:25:24,105-WARNING: variable conv8_depthwise_bn_offset not used 2020-07-23 11:25:24,105-WARNING: variable lstm_st2_fc2_w not used 2020-07-23 11:25:24,105-WARNING: variable conv11_expand_bn_mean not used 2020-07-23 11:25:24,105-WARNING: variable conv7_depthwise_bn_offset not used 2020-07-23 11:25:24,105-WARNING: variable conv4_expand_bn_variance not used 2020-07-23 11:25:24,106-WARNING: variable conv9_depthwise_bn_offset not used 2020-07-23 11:25:24,106-WARNING: variable conv12_linear_bn_mean not used 2020-07-23 11:25:24,106-WARNING: variable conv8_expand_bn_offset not used 2020-07-23 11:25:24,106-WARNING: variable lstm_st1_fc1_b not used 2020-07-23 11:25:24,106-WARNING: variable conv10_expand_bn_scale not used 2020-07-23 11:25:24,106-WARNING: variable conv7_expand_bn_offset not used 2020-07-23 11:25:24,106-WARNING: variable conv10_depthwise_bn_variance not used 2020-07-23 11:25:24,106-WARNING: variable conv_last_bn_mean not used 2020-07-23 11:25:24,106-WARNING: variable conv3_expand_bn_scale not used 2020-07-23 11:25:24,106-WARNING: variable conv7_expand_bn_variance not used 2020-07-23 11:25:24,106-WARNING: variable conv12_se_1_offset not used 2020-07-23 11:25:24,106-WARNING: variable conv12_expand_bn_offset not used 2020-07-23 11:25:24,106-WARNING: variable conv10_depthwise_bn_mean not used 2020-07-23 11:25:24,106-WARNING: variable conv8_expand_bn_variance not used 2020-07-23 11:25:24,106-WARNING: variable conv5_depthwise_bn_mean not used 2020-07-23 11:25:24,106-WARNING: variable conv_last_weights not used 2020-07-23 11:25:24,106-WARNING: variable conv12_depthwise_bn_variance not used 2020-07-23 11:25:24,106-WARNING: variable lstm_st2_out1_w not used 2020-07-23 11:25:24,106-WARNING: variable lstm_st2_fc1_b not used 2020-07-23 11:25:24,107-WARNING: variable conv10_expand_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv8_depthwise_bn_scale not used 2020-07-23 11:25:24,107-WARNING: variable conv5_expand_bn_offset not used 2020-07-23 11:25:24,107-WARNING: variable conv5_expand_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv11_linear_bn_offset not used 2020-07-23 11:25:24,107-WARNING: variable conv6_depthwise_bn_mean not used 2020-07-23 11:25:24,107-WARNING: variable conv9_depthwise_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv8_depthwise_bn_variance not used 2020-07-23 11:25:24,107-WARNING: variable conv11_linear_bn_mean not used 2020-07-23 11:25:24,107-WARNING: variable conv3_expand_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv3_expand_bn_variance not used 2020-07-23 11:25:24,107-WARNING: variable conv11_expand_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv11_expand_bn_offset not used 2020-07-23 11:25:24,107-WARNING: variable conv11_linear_bn_variance not used 2020-07-23 11:25:24,107-WARNING: variable conv3_expand_bn_offset not used 2020-07-23 11:25:24,107-WARNING: variable conv10_linear_bn_mean not used 2020-07-23 11:25:24,107-WARNING: variable ctc_fc_w_attr not used 2020-07-23 11:25:24,107-WARNING: variable conv9_expand_bn_offset not used 2020-07-23 11:25:24,107-WARNING: variable conv7_expand_weights not used 2020-07-23 11:25:24,107-WARNING: variable conv6_expand_bn_mean not used 2020-07-23 11:25:24,113-WARNING: variable conv8_depthwise_weights not used 2020-07-23 11:25:24,113-WARNING: variable conv10_linear_bn_offset not used 2020-07-23 11:25:24,113-WARNING: variable conv12_expand_bn_mean not used 2020-07-23 11:25:24,113-WARNING: variable conv4_expand_bn_mean not used 2020-07-23 11:25:24,113-WARNING: variable conv5_linear_weights not used 2020-07-23 11:25:24,113-WARNING: variable conv7_se_2_offset not used 2020-07-23 11:25:24,113-WARNING: variable conv9_depthwise_bn_scale not used 2020-07-23 11:25:24,113-WARNING: variable conv11_linear_weights not used 2020-07-23 11:25:24,113-WARNING: variable conv3_linear_weights not used 2020-07-23 11:25:24,113-WARNING: variable conv6_expand_bn_offset not used 2020-07-23 11:25:24,113-WARNING: variable conv3_depthwise_bn_mean not used 2020-07-23 11:25:24,113-WARNING: variable conv8_linear_bn_variance not used 2020-07-23 11:25:24,113-WARNING: variable conv4_depthwise_bn_scale not used 2020-07-23 11:25:24,113-WARNING: variable conv8_depthwise_bn_mean not used 2020-07-23 11:25:24,113-WARNING: variable lstm_st1_out1_w not used 2020-07-23 11:25:24,113-WARNING: variable conv10_expand_bn_offset not used 2020-07-23 11:25:24,113-WARNING: variable conv6_depthwise_bn_offset not used 2020-07-23 11:25:24,114-WARNING: variable conv3_depthwise_bn_scale not used 2020-07-23 11:25:24,114-WARNING: variable lstm_st1_out2_w not used 2020-07-23 11:25:24,114-WARNING: variable conv12_depthwise_weights not used 2020-07-23 11:25:24,114-WARNING: variable conv5_expand_bn_scale not used 2020-07-23 11:25:24,114-WARNING: variable conv9_expand_bn_mean not used 2020-07-23 11:25:24,114-WARNING: variable lstm_st1_fc2_b not used /home/mlp/python/anaconda3/lib/python3.6/site-packages/paddle/fluid/io.py:1972: UserWarning: This list is not set, Because of Paramerter not found in program. There are: conv13_expand_weights conv13_expand_bn_scale conv13_expand_bn_offset conv13_expand_bn_mean conv13_expand_bn_variance conv13_depthwise_weights conv13_depthwise_bn_scale conv13_depthwise_bn_offset conv13_depthwise_bn_mean conv13_depthwise_bn_variance conv13_se_1_weights conv13_se_1_offset conv13_se_2_weights conv13_se_2_offset conv13_linear_weights conv13_linear_bn_scale conv13_linear_bn_offset conv13_linear_bn_mean conv13_linear_bn_variance conv14_expand_weights conv14_expand_bn_scale conv14_expand_bn_offset conv14_expand_bn_mean conv14_expand_bn_variance conv14_depthwise_weights conv14_depthwise_bn_scale conv14_depthwise_bn_offset conv14_depthwise_bn_mean conv14_depthwise_bn_variance conv14_se_1_weights conv14_se_1_offset conv14_se_2_weights conv14_se_2_offset conv14_linear_weights conv14_linear_bn_scale conv14_linear_bn_offset conv14_linear_bn_mean conv14_linear_bn_variance conv15_expand_weights conv15_expand_bn_scale conv15_expand_bn_offset conv15_expand_bn_mean conv15_expand_bn_variance conv15_depthwise_weights conv15_depthwise_bn_scale conv15_depthwise_bn_offset conv15_depthwise_bn_mean conv15_depthwise_bn_variance conv15_se_1_weights conv15_se_1_offset conv15_se_2_weights conv15_se_2_offset conv15_linear_weights conv15_linear_bn_scale conv15_linear_bn_offset conv15_linear_bn_mean conv15_linear_bn_variance conv16_expand_weights conv16_expand_bn_scale conv16_expand_bn_offset conv16_expand_bn_mean conv16_expand_bn_variance conv16_depthwise_weights conv16_depthwise_bn_scale conv16_depthwise_bn_offset conv16_depthwise_bn_mean conv16_depthwise_bn_variance conv16_se_1_weights conv16_se_1_offset conv16_se_2_weights conv16_se_2_offset conv16_linear_weights conv16_linear_bn_scale conv16_linear_bn_offset conv16_linear_bn_mean conv16_linear_bn_variance format(" ".join(unused_para_list)))

xxllp commented 4 years ago

预训练模型好像是没加载成功 很奇怪啊

xxllp commented 4 years ago

用的 rec_chinese_lite_train.yml ,在linux上跑的

tink2123 commented 4 years ago

预训练模型加载失败,看你的log加载的似乎是英文模型的预训练权重。请确认一下下载的预训练模型是否是 ch_rec_mv3_crnn,下载链接:https://paddleocr.bj.bcebos.com/ch_models/ch_rec_mv3_crnn.tar

xxllp commented 4 years ago

已解决了 模型加载的不对

augiot commented 3 years ago

已解决了 模型加载的不对

我好像也加载的不对,你最后怎么解决的啊?