From c62c3c5bcc308e064345f8690c8b438c07014be9 Mon Sep 17 00:00:00 2001 From: Mohamad Mansour Date: Tue, 28 Sep 2021 10:59:37 +0300 Subject: [PATCH 1/5] Standarized/Fixed Config eval_batch_step parm/desc --- configs/cls/cls_mv3.yml | 2 +- configs/det/ch_PP-OCRv2/ch_PP-OCR_det_cml.yml | 2 +- configs/det/ch_PP-OCRv2/ch_PP-OCR_det_distill.yml | 2 +- configs/det/ch_PP-OCRv2/ch_PP-OCR_det_dml.yml | 2 +- configs/det/ch_PP-OCRv2/ch_PP-OCR_det_student.yml | 2 +- configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml | 2 +- configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml | 2 +- configs/det/det_mv3_db.yml | 2 +- configs/det/det_r50_vd_db.yml | 4 ++-- configs/e2e/e2e_r50_vd_pg.yml | 2 +- configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml | 1 + configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml | 1 + configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml | 2 +- configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml | 2 +- configs/rec/multi_language/rec_arabic_lite_train.yml | 5 ++--- configs/rec/multi_language/rec_cyrillic_lite_train.yml | 5 ++--- configs/rec/multi_language/rec_devanagari_lite_train.yml | 5 ++--- configs/rec/multi_language/rec_en_number_lite_train.yml | 2 +- configs/rec/multi_language/rec_french_lite_train.yml | 2 +- configs/rec/multi_language/rec_german_lite_train.yml | 2 +- configs/rec/multi_language/rec_japan_lite_train.yml | 2 +- configs/rec/multi_language/rec_korean_lite_train.yml | 2 +- configs/rec/multi_language/rec_latin_lite_train.yml | 5 ++--- configs/rec/multi_language/rec_multi_language_lite_train.yml | 2 +- configs/rec/rec_icdar15_train.yml | 2 +- configs/rec/rec_mtb_nrtr.yml | 2 +- configs/rec/rec_mv3_none_bilstm_ctc.yml | 2 +- configs/rec/rec_mv3_none_none_ctc.yml | 2 +- configs/rec/rec_mv3_tps_bilstm_att.yml | 2 +- configs/rec/rec_mv3_tps_bilstm_ctc.yml | 2 +- configs/rec/rec_r34_vd_none_bilstm_ctc.yml | 2 +- configs/rec/rec_r34_vd_none_none_ctc.yml | 2 +- configs/rec/rec_r34_vd_tps_bilstm_att.yml | 2 +- configs/rec/rec_r34_vd_tps_bilstm_ctc.yml | 2 +- configs/rec/rec_r50_fpn_srn.yml | 2 +- 35 files changed, 40 insertions(+), 42 deletions(-) diff --git a/configs/cls/cls_mv3.yml b/configs/cls/cls_mv3.yml index 5e643dc38..2d8b52a44 100644 --- a/configs/cls/cls_mv3.yml +++ b/configs/cls/cls_mv3.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/cls/mv3/ save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 1000 iterations after the 0th iteration eval_batch_step: [0, 1000] cal_metric_during_train: True pretrained_model: diff --git a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_cml.yml b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_cml.yml index 0f08909ad..a7221d7c4 100644 --- a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_cml.yml +++ b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_cml.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 2 save_model_dir: ./output/ch_db_mv3/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 3000th iteration eval_batch_step: [3000, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/ch_PP-OCRv2_det_distill_train/best_accuracy diff --git a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_distill.yml b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_distill.yml index 1159d71bf..9566a3f7b 100644 --- a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_distill.yml +++ b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_distill.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 2 save_model_dir: ./output/ch_db_mv3/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 3000th iteration eval_batch_step: [3000, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/MobileNetV3_large_x0_5_pretrained diff --git a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_dml.yml b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_dml.yml index 7fe2d2e1a..3a6f18110 100644 --- a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_dml.yml +++ b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_dml.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 2 save_model_dir: ./output/ch_db_mv3/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 3000th iteration eval_batch_step: [3000, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/MobileNetV3_large_x0_5_pretrained diff --git a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_student.yml b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_student.yml index cca2a596c..f07f38168 100644 --- a/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_student.yml +++ b/configs/det/ch_PP-OCRv2/ch_PP-OCR_det_student.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/ch_db_mv3/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 400 iterations after the 0th iteration eval_batch_step: [0, 400] cal_metric_during_train: False pretrained_model: ./pretrain_models/student.pdparams diff --git a/configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml b/configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml index 87718cad6..5951ff65b 100644 --- a/configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml +++ b/configs/det/ch_ppocr_v2.0/ch_det_mv3_db_v2.0.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 2 save_model_dir: ./output/ch_db_mv3/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 3000th iteration eval_batch_step: [3000, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/MobileNetV3_large_x0_5_pretrained diff --git a/configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml b/configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml index 7b07ef996..f819a0c24 100644 --- a/configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml +++ b/configs/det/ch_ppocr_v2.0/ch_det_res18_db_v2.0.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 2 save_model_dir: ./output/ch_db_res18/ save_epoch_step: 1200 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 3000th iteration eval_batch_step: [3000, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/ResNet18_vd_pretrained diff --git a/configs/det/det_mv3_db.yml b/configs/det/det_mv3_db.yml index b69ed58cd..addbf9f56 100644 --- a/configs/det/det_mv3_db.yml +++ b/configs/det/det_mv3_db.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/db_mv3/ save_epoch_step: 1200 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/MobileNetV3_large_x0_5_pretrained diff --git a/configs/det/det_r50_vd_db.yml b/configs/det/det_r50_vd_db.yml index 42b3898ef..3104aec0a 100644 --- a/configs/det/det_r50_vd_db.yml +++ b/configs/det/det_r50_vd_db.yml @@ -5,8 +5,8 @@ Global: print_batch_step: 10 save_model_dir: ./output/det_r50_vd/ save_epoch_step: 1200 - # evaluation is run every 2000 iterations - eval_batch_step: [0,2000] + # evaluation is run every 2000 iterations after the 0th iteration + eval_batch_step: [0, 2000] cal_metric_during_train: False pretrained_model: ./pretrain_models/ResNet50_vd_ssld_pretrained checkpoints: diff --git a/configs/e2e/e2e_r50_vd_pg.yml b/configs/e2e/e2e_r50_vd_pg.yml index 4a6e19f44..d17a32cbd 100644 --- a/configs/e2e/e2e_r50_vd_pg.yml +++ b/configs/e2e/e2e_r50_vd_pg.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/pgnet_r50_vd_totaltext/ save_epoch_step: 10 - # evaluation is run every 0 iterationss after the 1000th iteration + # evaluation is run every 1000 iterationss after the 0th iteration eval_batch_step: [ 0, 1000 ] cal_metric_during_train: False pretrained_model: diff --git a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml index 38f77f737..21e55b03b 100644 --- a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml +++ b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec.yml @@ -6,6 +6,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_mobile_pp-OCRv2 save_epoch_step: 3 + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: diff --git a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml index d2308fd57..852502987 100644 --- a/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml +++ b/configs/rec/ch_PP-OCRv2/ch_PP-OCRv2_rec_distillation.yml @@ -6,6 +6,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_pp-OCRv2_distillation save_epoch_step: 3 + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: diff --git a/configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml b/configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml index 717c16814..3f3cd4b32 100644 --- a/configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml +++ b/configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_chinese_common_v2.0 save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml b/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml index 660465f30..94d19e8af 100644 --- a/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml +++ b/configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_chinese_lite_v2.0 save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/multi_language/rec_arabic_lite_train.yml b/configs/rec/multi_language/rec_arabic_lite_train.yml index 6dcfd1b69..22487d1b4 100644 --- a/configs/rec/multi_language/rec_arabic_lite_train.yml +++ b/configs/rec/multi_language/rec_arabic_lite_train.yml @@ -5,9 +5,8 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_arabic_lite save_epoch_step: 3 - eval_batch_step: - - 0 - - 2000 + # evaluation is run every 2000 iterations after the 0th iteration + eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: null checkpoints: null diff --git a/configs/rec/multi_language/rec_cyrillic_lite_train.yml b/configs/rec/multi_language/rec_cyrillic_lite_train.yml index 52527c1df..3fe189531 100644 --- a/configs/rec/multi_language/rec_cyrillic_lite_train.yml +++ b/configs/rec/multi_language/rec_cyrillic_lite_train.yml @@ -5,9 +5,8 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_cyrillic_lite save_epoch_step: 3 - eval_batch_step: - - 0 - - 2000 + # evaluation is run every 2000 iterations after the 0th iteration + eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: null checkpoints: null diff --git a/configs/rec/multi_language/rec_devanagari_lite_train.yml b/configs/rec/multi_language/rec_devanagari_lite_train.yml index e1a7c829c..aab87bbcf 100644 --- a/configs/rec/multi_language/rec_devanagari_lite_train.yml +++ b/configs/rec/multi_language/rec_devanagari_lite_train.yml @@ -5,9 +5,8 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_devanagari_lite save_epoch_step: 3 - eval_batch_step: - - 0 - - 2000 + # evaluation is run every 2000 iterations after the 0th iteration + eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: null checkpoints: null diff --git a/configs/rec/multi_language/rec_en_number_lite_train.yml b/configs/rec/multi_language/rec_en_number_lite_train.yml index fff4dfcd9..b413d8984 100644 --- a/configs/rec/multi_language/rec_en_number_lite_train.yml +++ b/configs/rec/multi_language/rec_en_number_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_en_number_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/multi_language/rec_french_lite_train.yml b/configs/rec/multi_language/rec_french_lite_train.yml index 63378d38a..ebd3fab91 100644 --- a/configs/rec/multi_language/rec_french_lite_train.yml +++ b/configs/rec/multi_language/rec_french_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_french_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/multi_language/rec_german_lite_train.yml b/configs/rec/multi_language/rec_german_lite_train.yml index 1651510c5..b02cd640c 100644 --- a/configs/rec/multi_language/rec_german_lite_train.yml +++ b/configs/rec/multi_language/rec_german_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_german_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/multi_language/rec_japan_lite_train.yml b/configs/rec/multi_language/rec_japan_lite_train.yml index bb47584ed..c1414f462 100644 --- a/configs/rec/multi_language/rec_japan_lite_train.yml +++ b/configs/rec/multi_language/rec_japan_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_japan_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/multi_language/rec_korean_lite_train.yml b/configs/rec/multi_language/rec_korean_lite_train.yml index 77f15524f..1ca0d6457 100644 --- a/configs/rec/multi_language/rec_korean_lite_train.yml +++ b/configs/rec/multi_language/rec_korean_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_korean_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/multi_language/rec_latin_lite_train.yml b/configs/rec/multi_language/rec_latin_lite_train.yml index e71112b4b..2aee8861f 100644 --- a/configs/rec/multi_language/rec_latin_lite_train.yml +++ b/configs/rec/multi_language/rec_latin_lite_train.yml @@ -5,9 +5,8 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_latin_lite save_epoch_step: 3 - eval_batch_step: - - 0 - - 2000 + # evaluation is run every 2000 iterations after the 0th iteration + eval_batch_step: [0, 2000] cal_metric_during_train: true pretrained_model: null checkpoints: null diff --git a/configs/rec/multi_language/rec_multi_language_lite_train.yml b/configs/rec/multi_language/rec_multi_language_lite_train.yml index c42a3d1a3..67eaeea34 100644 --- a/configs/rec/multi_language/rec_multi_language_lite_train.yml +++ b/configs/rec/multi_language/rec_multi_language_lite_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec_multi_language_lite save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] # if pretrained_model is saved in static mode, load_static_weights must set to True cal_metric_during_train: True diff --git a/configs/rec/rec_icdar15_train.yml b/configs/rec/rec_icdar15_train.yml index 17a4d7648..ac58262d3 100644 --- a/configs/rec/rec_icdar15_train.yml +++ b/configs/rec/rec_icdar15_train.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/ic15/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_mtb_nrtr.yml b/configs/rec/rec_mtb_nrtr.yml index 635c392d7..65c584488 100644 --- a/configs/rec/rec_mtb_nrtr.yml +++ b/configs/rec/rec_mtb_nrtr.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/nrtr/ save_epoch_step: 1 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_mv3_none_bilstm_ctc.yml b/configs/rec/rec_mv3_none_bilstm_ctc.yml index 9e0bd23ed..2d6abc668 100644 --- a/configs/rec/rec_mv3_none_bilstm_ctc.yml +++ b/configs/rec/rec_mv3_none_bilstm_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/mv3_none_bilstm_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_mv3_none_none_ctc.yml b/configs/rec/rec_mv3_none_none_ctc.yml index 904afe113..8557e9ca9 100644 --- a/configs/rec/rec_mv3_none_none_ctc.yml +++ b/configs/rec/rec_mv3_none_none_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/mv3_none_none_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_mv3_tps_bilstm_att.yml b/configs/rec/rec_mv3_tps_bilstm_att.yml index feaeb0545..759bcc069 100644 --- a/configs/rec/rec_mv3_tps_bilstm_att.yml +++ b/configs/rec/rec_mv3_tps_bilstm_att.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/rec_mv3_tps_bilstm_att/ save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_mv3_tps_bilstm_ctc.yml b/configs/rec/rec_mv3_tps_bilstm_ctc.yml index 65ab23c42..7b886fcd2 100644 --- a/configs/rec/rec_mv3_tps_bilstm_ctc.yml +++ b/configs/rec/rec_mv3_tps_bilstm_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/mv3_tps_bilstm_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_r34_vd_none_bilstm_ctc.yml b/configs/rec/rec_r34_vd_none_bilstm_ctc.yml index 331bb36ed..8c91af496 100644 --- a/configs/rec/rec_r34_vd_none_bilstm_ctc.yml +++ b/configs/rec/rec_r34_vd_none_bilstm_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/r34_vd_none_bilstm_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_r34_vd_none_none_ctc.yml b/configs/rec/rec_r34_vd_none_none_ctc.yml index 695a46958..47be09de6 100644 --- a/configs/rec/rec_r34_vd_none_none_ctc.yml +++ b/configs/rec/rec_r34_vd_none_none_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/r34_vd_none_none_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_r34_vd_tps_bilstm_att.yml b/configs/rec/rec_r34_vd_tps_bilstm_att.yml index fdd3588c8..6d7e5ef64 100644 --- a/configs/rec/rec_r34_vd_tps_bilstm_att.yml +++ b/configs/rec/rec_r34_vd_tps_bilstm_att.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/b3_rare_r34_none_gru/ save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml b/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml index 67108a6ea..4f14cc37f 100644 --- a/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml +++ b/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 10 save_model_dir: ./output/rec/r34_vd_tps_bilstm_ctc/ save_epoch_step: 3 - # evaluation is run every 2000 iterations + # evaluation is run every 2000 iterations after the 0th iteration eval_batch_step: [0, 2000] cal_metric_during_train: True pretrained_model: diff --git a/configs/rec/rec_r50_fpn_srn.yml b/configs/rec/rec_r50_fpn_srn.yml index fa7b1ae4e..8ad4e7074 100644 --- a/configs/rec/rec_r50_fpn_srn.yml +++ b/configs/rec/rec_r50_fpn_srn.yml @@ -5,7 +5,7 @@ Global: print_batch_step: 5 save_model_dir: ./output/rec/srn_new save_epoch_step: 3 - # evaluation is run every 5000 iterations after the 4000th iteration + # evaluation is run every 5000 iterations after the 0th iteration eval_batch_step: [0, 5000] cal_metric_during_train: True pretrained_model: From 7a495bcd871451dd64b932bf90c5363a498e9470 Mon Sep 17 00:00:00 2001 From: Mohamad Mansour Date: Tue, 28 Sep 2021 11:16:06 +0300 Subject: [PATCH 2/5] Update detection_en.md --- doc/doc_en/detection_en.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/doc_en/detection_en.md b/doc/doc_en/detection_en.md index df96fd533..4f8143d03 100644 --- a/doc/doc_en/detection_en.md +++ b/doc/doc_en/detection_en.md @@ -223,6 +223,7 @@ python3 tools/infer/predict_det.py --det_algorithm="EAST" --det_model_dir="./out ## 5. FAQ Q1: The prediction results of trained model and inference model are inconsistent? + **A**: Most of the problems are caused by the inconsistency of the pre-processing and post-processing parameters during the prediction of the trained model and the pre-processing and post-processing parameters during the prediction of the inference model. Taking the model trained by the det_mv3_db.yml configuration file as an example, the solution to the problem of inconsistent prediction results between the training model and the inference model is as follows: - Check whether the [trained model preprocessing](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/configs/det/det_mv3_db.yml#L116) is consistent with the prediction [preprocessing function of the inference model](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/tools/infer/predict_det.py#L42). When the algorithm is evaluated, the input image size will affect the accuracy. In order to be consistent with the paper, the image is resized to [736, 1280] in the training icdar15 configuration file, but there is only a set of default parameters when the inference model predicts, which will be considered To predict the speed problem, the longest side of the image is limited to 960 for resize by default. The preprocessing function of the training model preprocessing and the inference model is located in [ppocr/data/imaug/operators.py](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/ppocr/data/imaug/operators.py#L147) - Check whether the [post-processing of the trained model](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/configs/det/det_mv3_db.yml#L51) is consistent with the [post-processing parameters of the inference](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/tools/infer/utility.py#L50). From cffe90853d683601bdf0f48e7a1087f5a198652a Mon Sep 17 00:00:00 2001 From: Mohamad Mansour Date: Tue, 28 Sep 2021 11:17:11 +0300 Subject: [PATCH 3/5] Update detection.md --- doc/doc_ch/detection.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/doc_ch/detection.md b/doc/doc_ch/detection.md index 59bf6384f..5ec880b79 100644 --- a/doc/doc_ch/detection.md +++ b/doc/doc_ch/detection.md @@ -230,6 +230,7 @@ python3 tools/infer/predict_det.py --det_algorithm="EAST" --det_model_dir="./out # 5. FAQ Q1: 训练模型转inference 模型之后预测效果不一致? + **A**:此类问题出现较多,问题多是trained model预测时候的预处理、后处理参数和inference model预测的时候的预处理、后处理参数不一致导致的。以det_mv3_db.yml配置文件训练的模型为例,训练模型、inference模型预测结果不一致问题解决方式如下: - 检查[trained model预处理](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/configs/det/det_mv3_db.yml#L116),和[inference model的预测预处理](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/tools/infer/predict_det.py#L42)函数是否一致。算法在评估的时候,输入图像大小会影响精度,为了和论文保持一致,训练icdar15配置文件中将图像resize到[736, 1280],但是在inference model预测的时候只有一套默认参数,会考虑到预测速度问题,默认限制图像最长边为960做resize的。训练模型预处理和inference模型的预处理函数位于[ppocr/data/imaug/operators.py](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/ppocr/data/imaug/operators.py#L147) - 检查[trained model后处理](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/configs/det/det_mv3_db.yml#L51),和[inference 后处理参数](https://github.com/PaddlePaddle/PaddleOCR/blob/c1ed243fb68d5d466258243092e56cbae32e2c14/tools/infer/utility.py#L50)是否一致。 From 578d8e82359f214bb8dea43a8a956ba1ca29b26e Mon Sep 17 00:00:00 2001 From: Mohamad Mansour Date: Tue, 28 Sep 2021 11:21:49 +0300 Subject: [PATCH 4/5] Update pgnet.md --- doc/doc_ch/pgnet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/doc_ch/pgnet.md b/doc/doc_ch/pgnet.md index 357d222d2..264d5a117 100644 --- a/doc/doc_ch/pgnet.md +++ b/doc/doc_ch/pgnet.md @@ -28,9 +28,9 @@ PGNet算法细节详见[论文](https://www.aaai.org/AAAI21Papers/AAAI-2885.Wang ### 性能指标 -测试集: Total Text +#### 测试集: Total Text -测试环境: NVIDIA Tesla V100-SXM2-16GB +#### 测试环境: NVIDIA Tesla V100-SXM2-16GB |PGNetA|det_precision|det_recall|det_f_score|e2e_precision|e2e_recall|e2e_f_score|FPS|下载| | --- | --- | --- | --- | --- | --- | --- | --- | --- | From 14009290c1089b83eb0199699a8d67ea52f22370 Mon Sep 17 00:00:00 2001 From: Mohamad Mansour Date: Tue, 28 Sep 2021 11:21:57 +0300 Subject: [PATCH 5/5] Update pgnet_en.md --- doc/doc_en/pgnet_en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/doc_en/pgnet_en.md b/doc/doc_en/pgnet_en.md index df5610e59..d2c6b3024 100644 --- a/doc/doc_en/pgnet_en.md +++ b/doc/doc_en/pgnet_en.md @@ -24,9 +24,9 @@ The results of detection and recognition are as follows: ![](../imgs_results/e2e_res_img293_pgnet.png) ![](../imgs_results/e2e_res_img295_pgnet.png) ### Performance -####Test set: Total Text +#### Test set: Total Text -####Test environment: NVIDIA Tesla V100-SXM2-16GB +#### Test environment: NVIDIA Tesla V100-SXM2-16GB |PGNetA|det_precision|det_recall|det_f_score|e2e_precision|e2e_recall|e2e_f_score|FPS|download| | --- | --- | --- | --- | --- | --- | --- | --- | --- | |Paper|85.30|86.80|86.1|-|-|61.7|38.20 (size=640)|-|