sirius-ai / LPRNet_Pytorch

Pytorch Implementation For LPRNet, A High Performance And Lightweight License Plate Recognition Framework.
Apache License 2.0
920 stars 231 forks source link

你们测试的正确率都有多少 #44

Open XieHui1995 opened 3 years ago

XieHui1995 commented 3 years ago

用预训练的模型测试所给的测试集,怎么只有0.9的正确率,再训练了自己的数据集之后就只有0.74了。。。

kingStar1006 commented 3 years ago

我也是0.74

luotianhang commented 3 years ago

请问有训练过模型吗,为啥感觉训练不好啊

kingStar1006 commented 3 years ago

训练过,测试准确率50多

------------------ 原始邮件 ------------------ 发件人: "luotianhang"<notifications@github.com>; 发送时间: 2021年2月5日(星期五) 下午3:25 收件人: "sirius-ai/LPRNet_Pytorch"; 抄送: "Comment"; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

请问有训练过模型吗,为啥感觉训练不好啊

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

rawli commented 3 years ago

用预训练的模型测试所给的测试集,怎么只有0.9的正确率,再训练了自己的数据集之后就只有0.74了。。。

请教一下大神,你是什么训练出0.74的准确率的?能教我一下你修改了哪儿吗?为啥我训练出来的都是0呢。 这是我训练的过程: Successful to build network! initial net weight successful! [Info] Test Accuracy: 0.0 [0:861:99:960] [Info] Test Speed: 0.015824174165725707s 1/1000] [Info] Test Accuracy: 0.0 [0:866:94:960] [Info] Test Speed: 0.016215238094329835s 1/1000] [Info] Test Accuracy: 0.0 [0:857:103:960] [Info] Test Speed: 0.015121325016021729s 1/1000] [Info] Test Accuracy: 0.0 [0:840:120:960] [Info] Test Speed: 0.015990777015686033s 1/1000] [Info] Test Accuracy: 0.0 [0:860:100:960] [Info] Test Speed: 0.016122838973999024s 1/1000] [Info] Test Accuracy: 0.0 [0:850:110:960] [Info] Test Speed: 0.01493265199661255s 1/1000] [Info] Test Accuracy: 0.0 [0:873:87:960] [Info] Test Speed: 0.01611969208717346s 1/1000]

kingStar1006 commented 3 years ago

我的数据集是ccpd加生成的数据,我主要修改了dataset,其他没动,你这好像不是最终训好模型的测试结果。

------------------ 原始邮件 ------------------ 发件人: "sirius-ai/LPRNet_Pytorch" <notifications@github.com>; 发送时间: 2021年2月25日(星期四) 中午11:18 收件人: "sirius-ai/LPRNet_Pytorch"<LPRNet_Pytorch@noreply.github.com>; 抄送: "四月的谎言"<1065205459@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

用预训练的模型测试所给的测试集,怎么只有0.9的正确率,再训练了自己的数据集之后就只有0.74了。。。

请教一下大神,你是什么训练出0.74的准确率的?能教我一下你修改了哪儿吗?为啥我训练出来的都是0呢。 这是我训练的过程: Successful to build network! initial net weight successful! [Info] Test Accuracy: 0.0 [0:861:99:960] [Info] Test Speed: 0.015824174165725707s 1/1000] [Info] Test Accuracy: 0.0 [0:866:94:960] [Info] Test Speed: 0.016215238094329835s 1/1000] [Info] Test Accuracy: 0.0 [0:857:103:960] [Info] Test Speed: 0.015121325016021729s 1/1000] [Info] Test Accuracy: 0.0 [0:840:120:960] [Info] Test Speed: 0.015990777015686033s 1/1000] [Info] Test Accuracy: 0.0 [0:860�9�9960] [Info] Test Speed: 0.016122838973999024s 1/1000] [Info] Test Accuracy: 0.0 [0:850:110:960] [Info] Test Speed: 0.01493265199661255s 1/1000] [Info] Test Accuracy: 0.0 [0:873:87:960] [Info] Test Speed: 0.01611969208717346s 1/1000]

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

litingting1111 commented 3 years ago

我的是数据集是ccpd,现在测试结果正确率82%,还在训练

zhangjianying commented 3 years ago

CCPD的数据 [2021-05-03 22:51:18,529][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 45/277|| Totel iter 31900 || Loss: 0. 0347||Batch time: 0.2164 sec. ||LR: 0.00010000 [2021-05-03 22:51:41,751][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9659668508287292 [4371:73:81:4525] [2021-05-03 22:51:41,751][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9807734806629834 [4438/4525] [2021-05-03 22:51:41,753][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00043868047880454803s 1/4544] [2021-05-03 22:51:42,188][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 145/277|| Totel iter 32000 || Loss: 0

[2021-05-03 22:58:56,468][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9646408839779006 [4365:76:84:4525] [2021-05-03 22:58:56,469][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9812154696132597 [4440/4525] [2021-05-03 22:58:56,471][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00045087188482284546s 1/4544] [2021-05-03 22:58:56,908][train_LPRNet.py][line:311][INFO] Epoch:123 || epochiter: 206/277|| Totel iter 34000 || Loss: .0097||Batch time: 0.2157 sec. ||LR: 0.00010000

参数: parser.add_argument('--learning_rate', default=0.01, help='base value of learning rate.') parser.add_argument('--lr_schedule', default=[20, 95, 135, 142, 148], help='schedule for learning rate.')

littlePrince126 commented 3 years ago

You should add Net.eval() for BN and dropout

CherishSmile commented 2 years ago

CCPD的数据 [2021-05-03 22:51:18,529][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 45/277|| Totel iter 31900 || Loss: 0. 0347||Batch time: 0.2164 sec. ||LR: 0.00010000 [2021-05-03 22:51:41,751][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9659668508287292 [4371:73:81:4525] [2021-05-03 22:51:41,751][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9807734806629834 [4438/4525] [2021-05-03 22:51:41,753][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00043868047880454803s 1/4544] [2021-05-03 22:51:42,188][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 145/277|| Totel iter 32000 || Loss: 0

[2021-05-03 22:58:56,468][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9646408839779006 [4365:76:84:4525] [2021-05-03 22:58:56,469][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9812154696132597 [4440/4525] [2021-05-03 22:58:56,471][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00045087188482284546s 1/4544] [2021-05-03 22:58:56,908][train_LPRNet.py][line:311][INFO] Epoch:123 || epochiter: 206/277|| Totel iter 34000 || Loss: .0097||Batch time: 0.2157 sec. ||LR: 0.00010000

参数: parser.add_argument('--learning_rate', default=0.01, help='base value of learning rate.') parser.add_argument('--lr_schedule', default=[20, 95, 135, 142, 148], help='schedule for learning rate.')

我的准确率也一直是0.0,不知道哪里出问题了

wang-TJ-20 commented 2 years ago

您好,你找到准确率为0.0的原因了嘛 @CherishSmile

123Vincent2018 commented 2 years ago

@wang-TJ-20 我也是准确率一直为0,你找到原因了么

123Vincent2018 commented 2 years ago

倒入预训练模型后,使用他给的data/test里的数据做测试,准确率有0.896 image

wang-TJ-20 commented 2 years ago

后面没看这个了,我记得我当时主要是训练不成功,就是用数据训练完后生成的权重进行测试,准确率为0,不懂为什么😂

---原始邮件--- 发件人: @.> 发送时间: 2022年3月16日(周三) 下午3:02 收件人: @.>; 抄送: @.**@.>; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

倒入鱼训练模型后,使用他给的data/test里的数据做测试,准确率有0.896

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

123Vincent2018 commented 2 years ago

@wang-TJ-20 @CherishSmile 问题解决了!是预训练模型加载错误以及学习率设置不合理造成的。

wang-TJ-20 commented 2 years ago

您指的是训练时学习率设置不对和预训练模型不对吗,那方便分享一下您的设置和预训练模型吗,我当时因为找不到原因都放弃了😂

---原始邮件--- 发件人: @.> 发送时间: 2022年3月17日(周四) 上午9:26 收件人: @.>; 抄送: @.**@.>; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

@wang-TJ-20 @CherishSmile 问题解决了!是预训练模型加载以及学习率设置不合理造成的。

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

123Vincent2018 commented 2 years ago

这个是根据你自己的数据量来设置的,不能太大0.1,最好是1e-3,同时你加载预训练模型参数时,要在model.eval()模式下加载才可以,我使用的是自己的数据集30w张进行再训练,测试准确率来到了接近95%,还在训练

------------------ 原始邮件 ------------------ 发件人: "sirius-ai/LPRNet_Pytorch" @.>; 发送时间: 2022年3月17日(星期四) 下午4:43 @.>; @.**@.>; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

您指的是训练时学习率设置不对和预训练模型不对吗,那方便分享一下您的设置和预训练模型吗,我当时因为找不到原因都放弃了😂

---原始邮件--- 发件人: @.&gt; 发送时间: 2022年3月17日(周四) 上午9:26 收件人: @.&gt;; 抄送: @.**@.&gt;; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

@wang-TJ-20 @CherishSmile 问题解决了!是预训练模型加载以及学习率设置不合理造成的。

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: @.&gt; — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.>

wang-TJ-20 commented 2 years ago

可以的哦,准确率不错,感谢感谢,让我重拾信心,之后再试试✌🏻

---原始邮件--- 发件人: @.> 发送时间: 2022年3月17日(周四) 下午4:53 收件人: @.>; 抄送: @.**@.>; 主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

这个是根据你自己的数据量来设置的,不能太大0.1,最好是1e-3,同时你加载预训练模型参数时,要在model.eval()模式下加载才可以,我使用的是自己的数据集30w张进行再训练,测试准确率来到了接近95%,还在训练

------------------&nbsp;原始邮件&nbsp;------------------ 发件人: "sirius-ai/LPRNet_Pytorch" @.&gt;; 发送时间:&nbsp;2022年3月17日(星期四) 下午4:43 @.&gt;; @.**@.&gt;; 主题:&nbsp;Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

您指的是训练时学习率设置不对和预训练模型不对吗,那方便分享一下您的设置和预训练模型吗,我当时因为找不到原因都放弃了😂

---原始邮件---
发件人: @.&amp;gt;
发送时间: 2022年3月17日(周四) 上午9:26
收件人:
@.&amp;gt;;
抄送: @.**@.&amp;gt;;
主题: Re: [sirius-ai/LPRNet_Pytorch] 你们测试的正确率都有多少 (#44)

@wang-TJ-20 @CherishSmile 问题解决了!是预训练模型加载以及学习率设置不合理造成的。


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.Message ID: @.&amp;gt;
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID:
@.&gt; — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

123Vincent2018 commented 2 years ago

目前在结合分布式策略进行大批次训练

balancedZhi commented 2 years ago

能太大0.1,最好是1e-3,同 您好,请问一般训练多少epoch呢?model.eval()模式下加载,这个可以再详细一点吗,不是很理解,感谢~

123Vincent2018 commented 2 years ago

这个看你模型的拟合情况,训练精度下降前停就行。 模型加载不了?你遇到的是啥问题?

balancedZhi commented 2 years ago

image 调整了学习率,精度是0.测试的时候,model.eval()模式下加载,是在Greedy_Decode_Eval()中修改吗,非常感谢您的耐心回答~ image

123Vincent2018 commented 2 years ago

训练情况呢?应该是你没把模型参数加载进去

balancedZhi commented 2 years ago

image 这是一部分训练情况,是把test文件中的数据分一部分到train中。

balancedZhi commented 2 years ago

image 也显示加载成功了

123Vincent2018 commented 2 years ago

训练精度呢,可能是数据太少,训练不收敛,这个测试loss这么高

balancedZhi commented 2 years ago

好的我换用大数据集试一试,谢谢。

gubei528 commented 2 years ago

为啥我的加载他的权重之后,测试的ACC是0呢

Vergissmeinnic commented 2 years ago

为啥我的加载他的权重之后,测试的ACC是0呢 Learning_rate调小,我设置的0.001

Vergissmeinnic commented 2 years ago

我用CCPD数据集,训练结果是0.8-0.85之间,测试也是0.8-0.85之间

yangh-zzf-itcast commented 1 year ago

CCPD的数据 [2021-05-03 22:51:18,529][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 45/277|| Totel iter 31900 || Loss: 0. 0347||Batch time: 0.2164 sec. ||LR: 0.00010000 [2021-05-03 22:51:41,751][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9659668508287292 [4371:73:81:4525] [2021-05-03 22:51:41,751][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9807734806629834 [4438/4525] [2021-05-03 22:51:41,753][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00043868047880454803s 1/4544] [2021-05-03 22:51:42,188][train_LPRNet.py][line:311][INFO] Epoch:116 || epochiter: 145/277|| Totel iter 32000 || Loss: 0

[2021-05-03 22:58:56,468][train_LPRNet.py][line:417][INFO] [Info] Test Accuracy: 0.9646408839779006 [4365:76:84:4525] [2021-05-03 22:58:56,469][train_LPRNet.py][line:418][INFO] [Info] 75%+ Accuracy: 0.9812154696132597 [4440/4525] [2021-05-03 22:58:56,471][train_LPRNet.py][line:429][INFO] [Info] Test Speed: 0.00045087188482284546s 1/4544] [2021-05-03 22:58:56,908][train_LPRNet.py][line:311][INFO] Epoch:123 || epochiter: 206/277|| Totel iter 34000 || Loss: .0097||Batch time: 0.2157 sec. ||LR: 0.00010000

参数: parser.add_argument('--learning_rate', default=0.01, help='base value of learning rate.') parser.add_argument('--lr_schedule', default=[20, 95, 135, 142, 148], help='schedule for learning rate.')

您好,你是用了CCPD所有数据集还是用了base子集,其他的没用呢?我是每个子集抽样10%来训练,无法测试达到这么高的准确率

wirsnow commented 8 months ago

您好,你是用了CCPD所有数据集还是用了base子集,其他的没用呢?我是每个子集抽样10%来训练,无法测试达到这么高的准确率

刚学几天,我用的CCPD的base+green,并且和CBLPRD混合起来,一共有305409张,7:1.5:1.5,准确率有0.932。 但是不知道为什么,到第15个epoch之后loss就会突然增大然后准确率降到0 XWIT%KYL QR5O($CRQ13W36