PaddleOCR 训练时遇到的问题
config path: PaddleOCR/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_cml.yml
PPLCNetNew找不到对应模型
File "/home/aistudio/PaddleOCR-release-2.7/ppocr/modeling/backbones/init.py", line 77, in build_backbone
assert module_name in support_dict, Exception(
AssertionError: when model typs is det, backbone only support ['MobileNetV3', 'ResNet', 'ResNet_vd', 'ResNet_SAST', 'PPLCNet', 'PPLCNetV3', 'PPHGNet_small']
更改两个studen
的backbone
参数
Backbone:
name: PPLCNetV3 # 将PPLCNetNew改为PPLCNetV3
det: True # 添加det: True
训练时模型评估时,精度(precision)、召回率(recall)、F1值(hmean)都为0
[2023/03/24 11:24:16] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0.0, recall: 0.0, fps: 6.358296325689887, best_epoch: 45
将config
文件中的lr
调高 我设置的是0.02
ValueError: too many values to unpack (expected 4)
File "/workspace/PaddleOCR/ppocr/postprocess/db_postprocess.py", line 229, in __call__
src_h, src_w, ratio_h, ratio_w = shape_list[batch_index]
ValueError: too many values to unpack (expected 4)
将config
文件中的cal_metric_during_train
改为false
Global:
cal_metric_during_train: false