Closed rockallorange closed 1 year ago
你好,数据量太少了,如果修改了字典的话,建议每个字至少10张图片
有的,我將每個字的圖片增加了10倍數量(總訓練圖片數大約為1萬張),但acc、loss依然皆維持0... norm_edit_dis一剛開始有值,但後來亦降為0 請問該如何解決呢?
另外想問log值這幾個參數norm_edit_dis:, reader_cost, batch_cost, samples, ips所代表意思,謝謝
[訓練log] [2021/08/18 00:18:43] root INFO: epoch: [1/1000], iter: 10, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000180, reader_cost: 8.21959 s, batch_cost: 8.51831 s, samples: 1408, ips: 16.52910 [2021/08/18 00:20:04] root INFO: epoch: [1/1000], iter: 20, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000134, reader_cost: 7.66144 s, batch_cost: 7.90789 s, samples: 1280, ips: 16.18637 [2021/08/18 00:21:26] root INFO: epoch: [1/1000], iter: 30, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000087, reader_cost: 7.68209 s, batch_cost: 7.93320 s, samples: 1280, ips: 16.13472 [2021/08/18 00:22:46] root INFO: epoch: [1/1000], iter: 40, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000087, reader_cost: 7.56449 s, batch_cost: 7.81569 s, samples: 1280, ips: 16.37731 [2021/08/18 00:24:06] root INFO: epoch: [1/1000], iter: 50, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000173, reader_cost: 7.45993 s, batch_cost: 7.71224 s, samples: 1280, ips: 16.59698 [2021/08/18 00:25:24] root INFO: epoch: [1/1000], iter: 60, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000175, reader_cost: 7.32662 s, batch_cost: 7.58060 s, samples: 1280, ips: 16.88521 [2021/08/18 00:26:47] root INFO: epoch: [1/1000], iter: 70, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000130, reader_cost: 7.79468 s, batch_cost: 8.04534 s, samples: 1280, ips: 15.90984 [2021/08/18 00:27:27] root INFO: epoch: [1/1000], iter: 75, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000086, reader_cost: 3.80840 s, batch_cost: 3.92914 s, samples: 640, ips: 16.28856 [2021/08/18 00:27:28] root INFO: save model in ./output4/rec_chinese_lite_v2.0/latest [2021/08/18 00:27:28] root INFO: Initialize indexs of datasets:['./train_data/rec/train_list.txt'] [2021/08/18 00:28:07] root INFO: epoch: [2/1000], iter: 80, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000086, reader_cost: 3.70322 s, batch_cost: 3.82994 s, samples: 640, ips: 16.71046 [2021/08/18 00:29:28] root INFO: epoch: [2/1000], iter: 90, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.62812 s, batch_cost: 7.87393 s, samples: 1280, ips: 16.25617 [2021/08/18 00:30:49] root INFO: epoch: [2/1000], iter: 100, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.58805 s, batch_cost: 7.83770 s, samples: 1280, ips: 16.33132 [2021/08/18 00:32:09] root INFO: epoch: [2/1000], iter: 110, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.52570 s, batch_cost: 7.78688 s, samples: 1280, ips: 16.43790 [2021/08/18 00:33:27] root INFO: epoch: [2/1000], iter: 120, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.24070 s, batch_cost: 7.50223 s, samples: 1280, ips: 17.06160 [2021/08/18 00:34:47] root INFO: epoch: [2/1000], iter: 130, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.61101 s, batch_cost: 7.85753 s, samples: 1280, ips: 16.29011 [2021/08/18 00:36:06] root INFO: epoch: [2/1000], iter: 140, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.36625 s, batch_cost: 7.62378 s, samples: 1280, ips: 16.78956 [2021/08/18 00:37:27] root INFO: epoch: [2/1000], iter: 150, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.57597 s, batch_cost: 7.81852 s, samples: 1280, ips: 16.37139 [2021/08/18 00:37:35] root INFO: epoch: [2/1000], iter: 151, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 0.77567 s, batch_cost: 0.79778 s, samples: 128, ips: 16.04458 [2021/08/18 00:37:35] root INFO: save model in ./output4/rec_chinese_lite_v2.0/latest [2021/08/18 00:37:35] root INFO: Initialize indexs of datasets:['./train_data/rec/train_list.txt'] [2021/08/18 00:38:48] root INFO: epoch: [3/1000], iter: 160, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 6.84612 s, batch_cost: 7.07392 s, samples: 1152, ips: 16.28517 [2021/08/18 00:40:13] root INFO: epoch: [3/1000], iter: 170, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 8.04897 s, batch_cost: 8.28975 s, samples: 1280, ips: 15.44076 [2021/08/18 00:41:35] root INFO: epoch: [3/1000], iter: 180, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.67731 s, batch_cost: 7.92455 s, samples: 1280, ips: 16.15233 [2021/08/18 00:42:54] root INFO: epoch: [3/1000], iter: 190, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.39957 s, batch_cost: 7.65088 s, samples: 1280, ips: 16.73010 [2021/08/18 00:44:13] root INFO: epoch: [3/1000], iter: 200, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.39543 s, batch_cost: 7.65637 s, samples: 1280, ips: 16.71811 [2021/08/18 00:45:32] root INFO: epoch: [3/1000], iter: 210, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.41603 s, batch_cost: 7.66206 s, samples: 1280, ips: 16.70568 [2021/08/18 00:46:52] root INFO: epoch: [3/1000], iter: 220, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 7.48510 s, batch_cost: 7.73624 s, samples: 1280, ips: 16.54550 [2021/08/18 00:47:49] root INFO: epoch: [3/1000], iter: 227, lr: 0.001000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000000, reader_cost: 5.38052 s, batch_cost: 5.55671 s, samples: 896, ips: 16.12466
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
-自定義圖片集、字典
[train log] [2021/08/16 20:06:59] root INFO: save model in ./output/rec_chinese_lite_v2.0/latest [2021/08/16 20:06:59] root INFO: Initialize indexs of datasets:['./train_data/rec/train_list.txt'] [2021/08/16 20:07:33] root INFO: epoch: [999/1000], iter: 1997, lr: 0.000000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000041, reader_cost: 3.25311 s, batch_cost: 3.29636 s, samples: 512, ips: 15.53227 [2021/08/16 20:07:33] root INFO: save model in ./output/rec_chinese_lite_v2.0/latest [2021/08/16 20:07:33] root INFO: save model in ./output/rec_chinese_lite_v2.0/iter_epoch_999 [2021/08/16 20:07:33] root INFO: Initialize indexs of datasets:['./train_data/rec/train_list.txt'] [2021/08/16 20:08:06] root INFO: epoch: [1000/1000], iter: 1999, lr: 0.000000, loss: 0.000000, acc: 0.000000, norm_edit_dis: 0.000041, reader_cost: 3.24705 s, batch_cost: 3.29185 s, samples: 512, ips: 15.55354 [2021/08/16 20:08:06] root INFO: save model in ./output/rec_chinese_lite_v2.0/latest [2021/08/16 20:08:06] root INFO: best metric, acc: 0
[rec_chinese_lite_train_v2.0.yml] Global: use_gpu: True epoch_num: 1000 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output2/rec_chinese_lite_v2.0 save_epoch_step: 3 eval_batch_step: [0, 2000] cal_metric_during_train: True load_static_weights: False pretrained_model: ./pretrain_models/chinese_cht_mobile_v2.0_rec_train/best_accuracy checkpoints: save_inference_dir: use_visualdl: False infer_img: ./OCR_TEST_Sample/1126016000711001E0_cut_image_1.tif character_dict_path: ./ppocr/utils/dict/chinese_cht_dict2.txt character_type: ch rec_char_type: ch rec_char_dict_path : ./ppocr/utils/dict/chinese_cht_dict2.txt max_text_length: 100 infer_mode: False use_space_char: True save_res_path: ./output/rec/predicts_chinese_lite_v2.0.txt
Optimizer: name: Adam beta1: 0.9 beta2: 0.999 lr: name: Cosine learning_rate: 0.001 regularizer: name: 'L2' factor: 0.00001
Architecture: model_type: rec algorithm: CRNN Transform: Backbone: name: MobileNetV3 scale: 0.5 model_name: small small_stride: [1, 2, 2, 2] Neck: name: SequenceEncoder encoder_type: rnn hidden_size: 48 Head: name: CTCHead fc_decay: 0.00001
Loss: name: CTCLoss
PostProcess: name: CTCLabelDecode
Metric: name: RecMetric main_indicator: acc
Train: dataset: name: SimpleDataSet data_dir: ./train_data/rec/train/ label_file_list: ["./train_data/rec/train_list.txt"] transforms:
Eval: dataset: name: SimpleDataSet data_dir: ./train_data/rec/test/ label_file_list: ["./train_data/rec/test_list.txt"] transforms: