Replies: 7 comments
-
能提供一个最小复现的demo吗,我试试看。 |
Beta Was this translation helpful? Give feedback.
-
你说用 ch_PP-OCRv4_rec_distillation.yml 训练会报错? 这个必现的,我看issue里面差不多5.6个提过,好像在安排修复中 @GreatV 如果用 ch_PP-OCRv3_rec_distillation.yml 进行蒸馏训练 ,不收敛的话,我把配置给你 |
Beta Was this translation helpful? Give feedback.
-
PaddleOCR/configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml Lines 44 to 46 in 75526f0 可能的原因
如果 pretrained 字段为空,教师模型可能从随机权重开始训练,而不是使用 PP-OCRv3 的预训练权重。这可能导致模型在印刷体上的性能下降,而更适应训练数据中的手写体。
训练数据中手写体样本可能较多,导致模型在手写体上表现良好,但在印刷体上表现较差。建议确保训练数据包含足够的印刷体样本。
配置文件中 freeze_params: false 表示教师模型参数在训练中会更新,这可能导致教师模型偏向于训练数据中的手写体特征,影响印刷体性能。 |
Beta Was this translation helpful? Give feedback.
-
@GreatV https://aistudio.baidu.com/projectdetail/4330587 你能不能提供下你们官方例子OCR手写文字识别例子里面修改好的ch_PP-OCRv3_rec_distillation.yml 配置,我看你们代码里面doc描述https://paddlepaddle.github.io/PaddleOCR/latest/applications/%E6%89%8B%E5%86%99%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB.html :configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml epoch_num: 100 # 训练epoch数 lr: Train: 感觉很写有点含糊:上面例子感觉没有teacher,student,但是他名字ch_PP-OCRv3_rec_distillation.yml 不应该没有teacher,student,你能否提供完整的针对这个例子修改好ch_PP-OCRv3_rec_distillation.yml 。已经走好几天弯路,网上好多例子都拷贝这份描述,这个例子到底有没有配置teacher,student,如果配置teacher,student里面到底怎么配置,一会说 freeze_params: false,一会true,我就是想看看你们跑成功手写体例子时候ch_PP-OCRv3_rec_distillation.yml |
Beta Was this translation helpful? Give feedback.
-
@zhangyubo0722 帮忙看下这个吧~ |
Beta Was this translation helpful? Give feedback.
-
This issue is stale because it has been open for 90 days with no activity. |
Beta Was this translation helpful? Give feedback.
-
@hecheng64 解决了嘛. 好几个月前我看都有人提了, 现在貌似还是不行 一模一样的bug , 有啥替代的方法吗 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🔎 Search before asking
🐛 Bug (问题描述)
在bug14870:ch_PP-OCRv3_rec_distillation.yml vs ch_PP-OCRv4_rec_distillation.yml
如果使用的是 PP-OCRv3 作为基础模型,建议使用 ch_PP-OCRv3_rec_distillation.yml 进行蒸馏训练,以保持与 PP-OCRv3 训练策略一致。
回答:因为我当初按照官网训练:
14870
可以训练,可以收敛,但是感觉对手写体测试有效果,原先印刷体失效的,后面怀疑 freeze_params: false 配置
有问题,根据bug 14866 建议GreatV大佬建议 改成 freeze_params: true,训练好久,损失率还很大,收敛不了
数据集是手写OCR汇总,由中科院手写数据和网上开源数据合并组合:https://aistudio.baidu.com/datasetdetail/102884/0
如果使用 PP-OCRv4 作为基础模型,则应使用 ch_PP-OCRv4_rec_distillation.yml,因为 PP-OCRv4 可能在蒸馏策略上有优化或新的调整。
用 ch_PP-OCRv4_rec_distillation.yml 训练会报错
🏃♂️ Environment (运行环境)
release/2.10.0
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
见bug描述
Beta Was this translation helpful? Give feedback.
All reactions