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
44.21k stars 7.82k forks source link

AssertionError: absence reader_yml in global #1935

Closed zhenkunlin closed 2 years ago

zhenkunlin commented 3 years ago

grep: warning: GREP_OPTIONS is deprecated; please use an alias or script Traceback (most recent call last): File "./tools/export_model.py", line 77, in main() File "./tools/export_model.py", line 49, in main startup_prog, evalprogram, place, config, = program.preprocess() File "/home/PaddleOCR/tools/program.py", line 654, in preprocess config = load_config(FLAGS.config) File "/home/PaddleOCR/tools/program.py", line 95, in load_config "absence reader_yml in global" AssertionError: absence reader_yml in global

WenmuZhou commented 3 years ago

看看你的配置文件里有没有reader_yml这个字段

kano201 commented 3 years ago

我想使用develop分支将模型装换为model和param格式但是出现了同样的问题 下面是我的配置文件,用2.0和2.3版本都可以成功转换 Global: use_gpu: true epoch_num: 1200 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/db_mv3_block/ save_epoch_step: 1

evaluation is run every 2000 iterations

eval_batch_step: [0, 2000] cal_metric_during_train: False pretrained_model: ./output/db_mv3_block/best_accuracy checkpoints: save_inference_dir: use_visualdl: False infer_img: ../../data save_res_path: ./output/det_db/predicts_db.txt

Architecture: model_type: det algorithm: DB Transform: Backbone: name: MobileNetV3 scale: 0.5 model_name: large Neck: name: DBFPN out_channels: 256 Head: name: DBHead k: 50

Loss: name: DBLoss balance_loss: true main_loss_type: DiceLoss alpha: 5 beta: 10 ohem_ratio: 3

Optimizer: name: Adam beta1: 0.9 beta2: 0.999 lr: learning_rate: 0.001 regularizer: name: 'L2' factor: 0

PostProcess: name: DBPostProcess thresh: 0.3 box_thresh: 0.6 max_candidates: 1000 unclip_ratio: 1.5

Metric: name: DetMetric main_indicator: hmean

Train: dataset: name: SimpleDataSet data_dir: ../../ label_file_list:

Eval: dataset: name: SimpleDataSet data_dir: ../../ label_file_list:

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。 若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。