Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【OCR Issue No.2】修复训练过程中找不到對應模型和训练时计算精度报错 #12140

Merged
merged 1 commit into from
May 20, 2024

Conversation

mattheliu
Copy link
Contributor

@mattheliu mattheliu commented May 18, 2024

#10685

修复训练过程中找不到對應模型和训练时计算精度报错
模型名称有出入
PaddleOCR用的是PPLCNetV3而非PPLCNetNewV3
解决方案:
在Backbone下把PPLCNetNew改成PPLCNetV3,在添加一行det: true
image
训练时计算精度报错
发现shappe_list是一个 batch_size * 640(height) *640(width) 的数组, 显然下标访问后取值无法返回src_h, src_w, ratio_h, ratio_w
解决方案:
set: cal_metric_during_train: false可直接运行
...

Copy link

paddle-bot bot commented May 18, 2024

Thanks for your contribution!

@CLAassistant
Copy link

CLAassistant commented May 18, 2024

CLA assistant check
All committers have signed the CLA.

@GreatV GreatV self-requested a review May 18, 2024 07:40
@mattheliu mattheliu marked this pull request as ready for review May 19, 2024 04:48
@mattheliu
Copy link
Contributor Author

这个issue主要是因为cal_metric_during_train参出的问题
495fcf7163e726ce2f19a7c03dd587f3_
comment应该给出答复了,我看了一下应该是通用的

为什么cal_metric_during_train: true不行

cal_metric_during_train 参数是计算当前训练batch数据的精度,pred是一个mask
发现shape_list[batch_index]好像不是四个值的列,导致传递的时候报错ValueError:too many values to unpack (expected 4)
e5680e2a691876aac74b7555e727101e_
现在没找到修复的方案,佬们能帮我看一下吗
@GreatV @sunzhongkai588 @Liyulingyue @jzhang533

GreatV

This comment was marked as outdated.

Copy link
Collaborator

@GreatV GreatV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GreatV
Copy link
Collaborator

GreatV commented May 20, 2024

这个 cal_metric_during_train: true 只有rec和cls需要设置

@GreatV GreatV merged commit 9602438 into PaddlePaddle:main May 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants