WuJie1010 / Facial-Expression-Recognition.Pytorch

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset
MIT License
1.78k stars 545 forks source link

Problems with testing #86

Closed Yang-YuLin closed 4 years ago

Yang-YuLin commented 4 years ago

Hello, on the CK + data set, I took the model with the highest accuracy (93.556%) of 10% cross-validation and then took a test in each of the CK + facial expression pictures, but none of the facial expressions were correctly identified , May I ask why this happens? Thank you

WuJie1010 commented 4 years ago

Please make sure that all preprocessing is aligned with my code ~ if you test in all CK + data sets, it also includes the validation set. If the accuracy reaches 90%, it is impossible to have the problem that every picture is wrong. Please check your code, including Python and pytorch version

Yang-YuLin commented 4 years ago

I checked the code again,I am sure that all preprocessing is aligned with your code ~ But the result is still the same as before.I am very confused.Can you give me some suggestions on this issue?Thank you ~

WuJie1010 commented 4 years ago

if you test in all CK + data sets, it also includes the validation set. If the accuracy reaches 90%, it is impossible to have the problem that every picture is wrong. I think it must be a bug, please check your code again~

Yang-YuLin commented 4 years ago

您好,非常感谢您的回复,我已经仔细检查了代码,但是现在出现了一个新的问题:在fer2013数据集上,我发现您的代码中已经采取了各种防止过拟合的措施,但是我画了loss-epoch图,发现还是出现了过拟合现象(训练集上loss一直下降,accuracy一直上升,但是测试集上loss先下降后上升),请问怎么解决呢?再次感谢您的回复~祝好

------------------ 原始邮件 ------------------ 发件人: "WuJie"<notifications@github.com>; 发送时间: 2020年5月5日(星期二) 下午3:16 收件人: "WuJie1010/Facial-Expression-Recognition.Pytorch"<Facial-Expression-Recognition.Pytorch@noreply.github.com>; 抄送: "玉纸尘"<2445155412@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [WuJie1010/Facial-Expression-Recognition.Pytorch] Problems with testing (#86)

if you test in all CK + data sets, it also includes the validation set. If the accuracy reaches 90%, it is impossible to have the problem that every picture is wrong. I think it must be a bug, please check your code again~

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

WuJie1010 commented 4 years ago

您好,非常感谢您的回复,我已经仔细检查了代码,但是现在出现了一个新的问题:在fer2013数据集上,我发现您的代码中已经采取了各种防止过拟合的措施,但是我画了loss-epoch图,发现还是出现了过拟合现象(训练集上loss一直下降,accuracy一直上升,但是测试集上loss先下降后上升),请问怎么解决呢?再次感谢您的回复~祝好 ------------------ 原始邮件 ------------------ 发件人: "WuJie"<notifications@github.com>; 发送时间: 2020年5月5日(星期二) 下午3:16 收件人: "WuJie1010/Facial-Expression-Recognition.Pytorch"<Facial-Expression-Recognition.Pytorch@noreply.github.com>; 抄送: "玉纸尘"<2445155412@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [WuJie1010/Facial-Expression-Recognition.Pytorch] Problems with testing (#86) if you test in all CK + data sets, it also includes the validation set. If the accuracy reaches 90%, it is impossible to have the problem that every picture is wrong. I think it must be a bug, please check your code again~ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我虽然采用了过拟合策略,但不能完全避免过拟合~FER一般训练150+ epoch就可以达到最佳的结果~