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

训练PaddleOCR的识别模型为什么学习率不会衰减? #3891

Closed PhilCuriosity closed 2 years ago

PhilCuriosity commented 3 years ago

您好,问题如标题。下面是启动训练后生成的配置文件: (使用的是rec_icdar15_train.yml,其中name:Cosine,是参考配置文件的参数添加的)

Global: debug: false use_gpu: true epoch_num: 100 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/rec/detonator/ save_epoch_step: 3 eval_batch_step:

  • 0
  • 100 cal_metric_during_train: true pretrained_model: pretrain_models/rec_mv3_none_bilstm_ctc_v2.0_train/best_accuracy checkpoints: null save_inference_dir: null use_visualdl: false infer_img: null character_dict_path: ppocr/utils/dict/detonator_dict.txt character_type: ch max_text_length: 13 infer_mode: false use_space_char: false save_res_path: ./output/rec/predicts_ic15.txt distributed: false Optimizer: name: Adam beta1: 0.9 beta2: 0.999 lr: learning_rate: 0.0005 name: Cosine regularizer: name: L2 factor: 0 Architecture: model_type: rec algorithm: CRNN Transform: null Backbone: name: MobileNetV3 scale: 0.5 model_name: large Neck: name: SequenceEncoder encoder_type: rnn hidden_size: 96 Head: name: CTCHead fc_decay: 0 Loss: name: CTCLoss PostProcess: name: CTCLabelDecode Metric: name: RecMetric main_indicator: acc Train: dataset: name: SimpleDataSet data_dir: /home/*/Data/**/Print/RecognitionForTrain/ label_file_list:
    • /home/*/Data/**/Print/RecognitionForTrain/train.txt transforms:
    • DecodeImage: img_mode: BGR channel_first: false
    • CTCLabelEncode: null
    • RecResizeImg: image_shape:
      • 3
      • 32
      • 256
    • KeepKeys: keep_keys:
      • image
      • label
      • length loader: shuffle: true batch_size_per_card: 64 drop_last: true num_workers: 8 use_shared_memory: false Eval: dataset: name: SimpleDataSet data_dir: /home/*/Data/**/Print/RecognitionForTrain/ label_file_list:
    • /home/*/Data/**/Print/RecognitionForTrain/test.txt transforms:
    • DecodeImage: img_mode: BGR channel_first: false
    • CTCLabelEncode: null
    • RecResizeImg: image_shape:
      • 3
      • 32
      • 256
    • KeepKeys: keep_keys:
      • image
      • label
      • length loader: shuffle: false drop_last: false batch_size_per_card: 64 num_workers: 4 use_shared_memory: false
xmadog commented 3 years ago

在paddleocr的2.0版本上,使用默认的rec_chinese_common_train_v2.0.yml配置做迁移训练,也发现了同样的问题

paddle-bot-old[bot] commented 2 years ago

Since you haven\'t replied for more than 3 months, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于您超过三个月未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。