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

How to get the benchmark performance on FER2013? #30

Open
rrryan2016 opened this issue Jun 15, 2021 · 14 comments
Open

How to get the benchmark performance on FER2013? #30

rrryan2016 opened this issue Jun 15, 2021 · 14 comments

Comments

@rrryan2016
Copy link

Thanks for your great job and kind sharing.

I am doing some work on FER, and intend to get the performance of some classic network (including Resnet34, Resnet152, etc.) as described in https://github.com/phamquiluan/ResidualMaskingNetwork#benchmarking-on-fer2013.

But I cannot get the accuracy of 70%+, but only around 60%, though I tried to refer to parameters in https://github.com/phamquiluan/ResidualMaskingNetwork/blob/master/configs/fer2013_config.json.

Any recommendation and suggestion please?

@phamquiluan
Copy link
Owner

@rrryan2016 use Imagenet pre-trained weights

@rrryan2016
Copy link
Author

@rrryan2016 use Imagenet pre-trained weights

Yep, I used the pretrained model. :P

@phamquiluan
Copy link
Owner

exp1: no pre-trained
exp2: pre-trained

@rrryan2016 try to conduct two exp above, show me the results.

@rrryan2016
Copy link
Author

exp1: no pre-trained
exp2: pre-trained

@rrryan2016 try to conduct two exp above, show me the results.

Thanks for your reply and patience.

Taking the accuracy on Public testset as example,

Densenet121 Resnet152 VGG19_bn
Unpretrained 0.462803 0.373084 0.529117
Pretrained 0.622458 0.615770 0.651714

Envs: Python 3.7, CUDA 11.0, 3090Ti

@phamquiluan
Copy link
Owner

@rrryan2016 run pip list command and show me the results

@rrryan2016
Copy link
Author

Package           Version
----------------- -------------------
backcall          0.2.0
cached-property   1.5.2
certifi           2020.12.5
cmake             3.20.2
cycler            0.10.0
decorator         4.4.2
h5py              3.2.1
imageio           2.9.0
intel-openmp      2021.2.0
ipython           7.24.1
ipython-genutils  0.2.0
jedi              0.18.0
kiwisolver        1.3.1
matplotlib        3.4.2
matplotlib-inline 0.1.2
mkl               2021.2.0
mkl-include       2021.2.0
networkx          2.5.1
ninja             1.10.0.post2
numpy             1.20.3
opencv-python     4.5.2.54
pandas            1.2.4
parso             0.8.2
pexpect           4.8.0
pickleshare       0.7.5
Pillow            8.2.0
pip               21.1.1
prompt-toolkit    3.0.18
protobuf          3.17.3
ptyprocess        0.7.0
Pygments          2.9.0
pyparsing         2.4.7
python-dateutil   2.8.1
pytz              2021.1
PyWavelets        1.1.1
PyYAML            5.4.1
scikit-image      0.18.1
scipy             1.6.3
setuptools        52.0.0.post20210125
six               1.16.0
tbb               2021.2.0
tensorboardX      2.2
tifffile          2021.6.6
torch             1.8.0+cu111
torchaudio        0.8.0
torchvision       0.9.0+cu111
traitlets         5.0.5
typing-extensions 3.10.0.0
wcwidth           0.2.5
wheel             0.36.2

@phamquiluan
Copy link
Owner

@rrryan2016 hmm, please try to degrade torch and torchvision version

v1: pip install torch==1.3.1 torchvision==0.4.0
v2: pip install torch==1.4.0 torchvision==0.5.0

@phamquiluan
Copy link
Owner

@rrryan2016 And run again the experiments 🙏

@phamquiluan
Copy link
Owner

@rrryan2016 any progress, sir?

@rrryan2016
Copy link
Author

Thanks for the concerns. But sorry, I intend to give up the version switch.

  1. I guess the torch version makes little difference to the accuracy.

  2. The torch version may not be compatible with CUDA 11.0 that I am using. It can be very time-consuming if I focus on the switch.

@phamquiluan
Copy link
Owner

@rrryan2016
In this notebook, I show you how to get 73% with resnet34 only.

https://colab.research.google.com/drive/1LbDiAs5xOmhwaoKtJepaK_oVU_IkgLM8?usp=sharing

@rrryan2016
Copy link
Author

@rrryan2016
In this notebook, I show you how to get 73% with resnet34 only.

https://colab.research.google.com/drive/1LbDiAs5xOmhwaoKtJepaK_oVU_IkgLM8?usp=sharing

Grateful, it is helpful!

@ranjiewwen
Copy link

FER2013 resolution is 48*48, why input model resize to (224, 224), this operate will get blur or damage image quality?

@Sarah-em
Copy link

@rrryan2016 In this notebook, I show you how to get 73% with resnet34 only.

https://colab.research.google.com/drive/1LbDiAs5xOmhwaoKtJepaK_oVU_IkgLM8?usp=sharing

the link is not working ...can you please reshare it again...thank you

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

No branches or pull requests

4 participants