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

微调det_v4,hmean很低 #12101

Closed
ymy1005 opened this issue May 13, 2024 · 16 comments
Closed

微调det_v4,hmean很低 #12101

ymy1005 opened this issue May 13, 2024 · 16 comments
Assignees

Comments

@ymy1005
Copy link

ymy1005 commented May 13, 2024

微调det_v4,loss从降低4.9降到1.2,但是precision,recall,hmean都很低,基本是0.04,这种情况原因是啥?

@ymy1005
Copy link
Author

ymy1005 commented May 13, 2024

2000张训练数据,400张验证,batch_size是8,lr是0.0001,到21个epoch后hmean一直无法提升

@UserWangZz
Copy link
Collaborator

可以先infer一下看看模型输出,查找原因

@ymy1005
Copy link
Author

ymy1005 commented May 13, 2024

是因为模型太大很难调出效果吗,数据集是根据原模型检测不出来的情况准备的,专门微调检测这一种情况。现在是22个epoch,hmean还是0.04

@UserWangZz
Copy link
Collaborator

数据量大吗

@ymy1005
Copy link
Author

ymy1005 commented May 13, 2024

数据量大吗

2000张训练数据,400张验证,现在是到27个epoch,hmean还是0.04

@gengyanlei
Copy link

请问你设置cal_metric_during_train: false了么,然后这个还会评估精度么?我的都是0

@ymy1005
Copy link
Author

ymy1005 commented May 13, 2024

请问你设置cal_metric_during_train: false了么,然后这个还会评估精度么?我的都是0

设置了, cal_metric_during_train: false,有eval数据,每到一定轮数评估一次。我的loss在持续降低,但是precision,recall,hmean没怎么提高,都很低

@gengyanlei
Copy link

那你模型导出时,导出了student、student2、teacher 3个文件夹的推理模型文件么?

@gengyanlei
Copy link

@ymy1005 你看过这个issue么
#11796

@ymy1005
Copy link
Author

ymy1005 commented May 13, 2024

那你模型导出时,导出了student、student2、teacher 3个文件夹的推理模型文件么?

我用的配置是student.yml,模型是best_accuracy,微调生成best_accuracy模型。加载的时候有两个告警:The pretrained params backbone.conv1.hardswish.scale not in model,The pretrained params backbone.conv1.hardswish.bias not in model,参数不能完全加载

@gengyanlei
Copy link

好吧,我用的ch_PP-OCRv4_det_cml.yml,这个丢失的更多。而且搜到说尽量别用这个yml
按照你说的,我再重新试试,谢谢

@UserWangZz
Copy link
Collaborator

请问你设置cal_metric_during_train: false了么,然后这个还会评估精度么?我的都是0

设置了, cal_metric_during_train: false,有eval数据,每到一定轮数评估一次。我的loss在持续降低,但是precision,recall,hmean没怎么提高,都很低

一般不会掉这么点的,可能还是需要检查下哪里出问题了

@gengyanlei
Copy link

@UserWangZz
我现在重新训练了,按照ch_PP-OCRv4_det_student.yml来训练的;结果检测效果有提升,从264个框提升到295个;但是还差很多。

@UserWangZz
Copy link
Collaborator

@UserWangZz 我现在重新训练了,按照ch_PP-OCRv4_det_student.yml来训练的;结果检测效果有提升,从264个框提升到295个;但是还差很多。

差很多是指什么情况呢?

@gengyanlei
Copy link

gengyanlei commented May 14, 2024

@UserWangZz 这有个loss一直为0
image
我标注的是小尺寸的图片800-2000,然后检测是大尺寸的图10000+,有很多漏的(约1/4漏掉)。

@UserWangZz
Copy link
Collaborator

cbnloss在这个yml中是不起作用的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants