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
43.55k stars 7.77k forks source link

2.7分支代码,不能完全加载v4 det预训练模型参数 #11618

Open ymy1005 opened 8 months ago

ymy1005 commented 8 months ago

加载v4 det的预训练模型best_accuracy,模型参数加载不全,出现告警:The pretrained params backbone.conv1.hardswish.scale not in model,The pretrained params backbone.conv1.hardswish.bias not in model,大家遇到过吗,如何解决?

changdazhou commented 7 months ago

正常的哈,忽略就可以了

ymy1005 commented 7 months ago

正常的哈,忽略就可以了

有告警也能继续训练,但是模型参数加载不完全是不是需要更多数据训练更久,有可能效果变差。试了v4 rec模型和v3 det模型,都是能完全加载预训练模型参数的,都是用的student模型,v4 det没有student模型。

changdazhou commented 7 months ago

V4 mobile det 就是student 模型哈,不过精度问题确实会有波动

ymy1005 commented 7 months ago

V4 mobile det 就是student 模型哈,不过精度问题确实会有波动

官方给出的model list里,v4版本det train里只有best_accuracy,,其他模型从哪里下载?

iPengXPro commented 7 months ago

请问你们训练有没有遇到过训练几个epoch之后loss变为0,其他参数nanxx 的这总情况?

changdazhou commented 7 months ago

V4 mobile det 就是student 模型哈,不过精度问题确实会有波动

官方给出的model list里,v4版本det train里只有best_accuracy,,其他模型从哪里下载?

这个只提供最佳模型哈

changdazhou commented 7 months ago

请问你们训练有没有遇到过训练几个epoch之后loss变为0,其他参数nanxx 的这总情况?

请问训练的哪个模型呢,方便说一下用的什么训练数据吗

iPengXPro commented 7 months ago

请问你们训练有没有遇到过训练几个epoch之后loss变为0,其他参数nanxx 的这总情况?

请问训练的哪个模型呢,方便说一下用的什么训练数据吗

您好,使用的是模型是/en_PP-OCRv4_rec_train/best_accuracy,训练数据是在v3可以正常跑的,自己做的数据集。图片是我开训练的log。 image

iPengXPro commented 7 months ago

请问你们训练有没有遇到过训练几个epoch之后loss变为0,其他参数nanxx 的这总情况?

请问训练的哪个模型呢,方便说一下用的什么训练数据吗

您好,使用的是模型是/en_PP-OCRv4_rec_train/best_accuracy,训练数据是在v3可以正常跑的,自己做的数据集。图片是我开训练的log。 image

Global: debug: false use_gpu: true epoch_num: 50 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/rec_ppocr_v4 save_epoch_step: 10 eval_batch_step:

TheHonestBob commented 5 months ago

加载v4 det的预训练模型best_accuracy,模型参数加载不全,出现告警:The pretrained params backbone.conv1.hardswish.scale not in model,The pretrained params backbone.conv1.hardswish.bias not in model,大家遇到过吗,如何解决?

想问一下,你最后微调det V4了没有,是不是不能微调呀,我用的ch_PP-OCRv4_det_student.yml和ch_PP-OCRv4_det_train的best_accuracy.pdparams为预训练模型,但是根本没法训练吧,感觉所有参数都对不上

changdazhou commented 5 months ago

你用的那个版本PaddleOCR呢

TheHonestBob commented 5 months ago

你用的那个版本PaddleOCR呢

是回复我吗,我用的2.7.3

ymy1005 commented 5 months ago

加载v4 det的预训练模型best_accuracy,模型参数加载不全,出现告警:The pretrained params backbone.conv1.hardswish.scale not in model,The pretrained params backbone.conv1.hardswish.bias not in model,大家遇到过吗,如何解决?

想问一下,你最后微调det V4了没有,是不是不能微调呀,我用的ch_PP-OCRv4_det_student.yml和ch_PP-OCRv4_det_train的best_accuracy.pdparams为预训练模型,但是根本没法训练吧,感觉所有参数都对不上

可以微调,微调的时候有两条告警,backbone的两个参数不能加载。也能继续训练,loss会降低。