zengqunzhao / efficientface Goto Github PK
View Code? Open in Web Editor NEW[AAAI'21] Robust Lightweight Facial Expression Recognition Network with Label Distribution Training
License: MIT License
[AAAI'21] Robust Lightweight Facial Expression Recognition Network with Label Distribution Training
License: MIT License
您好!我从您给的谷歌云盘链接去下载预训练模型后,无法解压缩,显示无法打开
Hi, zengqun
Thanks for your nice work. I ran the code with the provided models on RAF-DB (I did not modify anything except the data path), however, I got every low accuracy as below:
Current learning rate: 0.00010000000000000003
Epoch: [99][ 0/96] Loss 0.0743 (0.0743) Accuracy 3.906 ( 3.906)
Epoch: [99][10/96] Loss 0.0642 (0.0640) Accuracy 0.000 ( 1.420)
Epoch: [99][20/96] Loss 0.0661 (0.0641) Accuracy 0.781 ( 1.749)
Epoch: [99][30/96] Loss 0.0552 (0.0627) Accuracy 0.781 ( 1.815)
Epoch: [99][40/96] Loss 0.0636 (0.0624) Accuracy 3.906 ( 1.925)
Epoch: [99][50/96] Loss 0.0739 (0.0627) Accuracy 1.562 ( 1.915)
Epoch: [99][60/96] Loss 0.0604 (0.0622) Accuracy 0.781 ( 1.857)
Epoch: [99][70/96] Loss 0.0473 (0.0615) Accuracy 1.562 ( 1.816)
Epoch: [99][80/96] Loss 0.0638 (0.0612) Accuracy 3.125 ( 1.823)
Epoch: [99][90/96] Loss 0.0632 (0.0610) Accuracy 2.344 ( 1.829)
Test: [ 0/24] Loss 7.5441 (7.5441) Accuracy 6.250 ( 6.250)
Test: [10/24] Loss 16.6608 (14.6800) Accuracy 0.781 ( 2.841)
Test: [20/24] Loss 8.7611 (12.6607) Accuracy 0.000 ( 2.009)
* Accuracy 1.825
Current best accuracy: 4.269882678985596
27.060322523117065
I believe there might have bugs for the pretrained LDG. Thus, I directly validate its performance on RAF-DB, I found that pretrained LDG got extreme low accuracy. The modified validation code and the experiment log are as below:
if args.evaluate:
# validate(val_loader, model_cla, criterion_val, args)
validate(val_loader, model_dis, criterion_val, args)
return
Training time: 06-21 15:24
Test: [ 0/24] Loss 9.1622 (9.1622) Accuracy 5.469 ( 5.469)
Test: [10/24] Loss 20.1950 (17.4116) Accuracy 2.344 ( 3.409)
Test: [20/24] Loss 9.6880 (14.8375) Accuracy 0.781 ( 2.604)
*** Accuracy 2.347 ***
Could you give me help? Thanks very much!
x = self.modulator(self.stage2(x)) + self.local(x)#在这个网络中stage2出来后进入channel-spatial modulator,接着和laocal相加
x = self.stage3(x)
x = self.stage4(x)
x = self.conv5(x)"Your code does not define the functions stage2, stage3, and stage4."
您好,为了验证LDG的作用,我使用了另一个特征提取网络网络与LDG进行训练,但是使用标签分布学习后每轮的训练准确率只有3%左右,如果不使用LDG只使用hard_label训练就正常了,困扰了我许久,希望能够得到您的指导,谢谢!
I need change expression labels, how to train LDG in new dataset
你好,按照步骤训练新的数据集准确率很低,是有忽略的地方吗?
If I want to change the order of the categories, for example, 0 is no longer the neutral, but the expression representing sadness, what should I change in the code
Hi,
I'm looking into a real-time application where speed is more important than accuracy. So I am interested in your opinion. If you had to decrease the size of the model by 10x, 5x and 2x, where would you truncate the model.
E.g. by decreasing the stages and out channels, but by how much? [1]
[1] model = EfficientFace([4, 8, 4], [29, 116, 232, 464, 1024])
EfficientFace/models/EfficientFace.py
Line 198 in 350845c
Thanks,
Rasmus
你好,请问可以提供用来训练PresientFace和LDG以获得预先训练的模型的代码吗?
I'm trying to run the project on my pc, but i keep running into the following error:
Traceback (most recent call last):
File "D:\LEO\2-Estudos\sem8\tcc2\git reconhecimento de expressoes\EfficientFace\main.py", line 383, in <module>
main()
File "D:\LEO\2-Estudos\sem8\tcc2\git reconhecimento de expressoes\EfficientFace\main.py", line 99, in main
train_dataset = datasets.ImageFolder(traindir,
File "C:\Users\leodo\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\datasets\folder.py", line 310, in __init__
super(ImageFolder, self).__init__(root, loader, IMG_EXTENSIONS if is_valid_file is None else None,
File "C:\Users\leodo\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\datasets\folder.py", line 145, in __init__
classes, class_to_idx = self.find_classes(self.root)
File "C:\Users\leodo\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\datasets\folder.py", line 221, in find_classes
return find_classes(directory)
File "C:\Users\leodo\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\datasets\folder.py", line 42, in find_classes
raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
FileNotFoundError: Couldn't find any class folder in D:\LEO\2-Estudos\sem8\tcc2\git reconhecimento de expressoes\EfficientFace\train.
Can you help me?
great work,
when i used the pretrianed weights to show the perfromance ,
this happend when i made a new depite val script to see the result, as is shown in the code ,the val process used only model_cla to get the result ,when i loaded the Pretrained_EfficientFace.tar in model_cla ,an error occured as below:
do you hava any idea?
model_cla.load_state_dict(pre_trained_dict)
File "E:\anaconda3\envs\torch\lib\site-packages\torch\nn\modules\module.py", line 1224, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for EfficientFace:
Missing key(s) in state_dict: "conv1.0.weight", "conv1.1.weight", "conv1.1.bias", "conv1.1.running_mean", "conv1.1.running_var", "stage2.0.branch1.0.weight", "stage2.0.branch1.1.weight", "stage2.0.branch1.1.bias", "stage2.0.branch1.1.running_mean", "stage2.0.branch1.1.running_var", "stage2.0.branch1.2.weight", "stage2.0.branch1.3.weight", "stage2.0.branch1.3.bias", "stage2.0.branch1.3.running_mean", "stage2.0.branch1.3.running_var", "stage2.0.branch2.0.weight", "stage2.0.branch2.1.weight", "stage2.0.branch2.1.bias", "stage2.0.branch2.1.running_mean", "stage2.0.branch2.1.running_var", "stage2.0.branch2.3.weight", "stage2.0.branch2.4.weight", "stage2.0.branch2.4.bias", "stage2.0.branch2.4.running_mean", "stage2.0.branch2.4.running_var", "stage2.0.branch2.5.weight", "stage2.0.branch2.6.weight", "stage2.0.branch2.6.bias", "stage2.0.branch2.6.running_mean", "stage2.0.branch2.6.running_var", "stage2.1.branch2.0.weight", "stage2.1.branch2.1.weight", "stage2.1.branch2.1.bias", "stage2.1.branch2.1.running_mean", "stage2.1.branch2.1.running_var", "stage2.1.branch2.3.weight", "stage2.1.branch2.4.weight", "stage2.1.branch2.4.bias", "stage2.1.branch2.4.running_mean", "stage2.1.branch2.4.running_var", "stage2.1.branch2.5.weight", "stage2.1.branch2.6.weight", "stage2.1.branch2.6.bias", "stage2.1.branch2.6.running_mean", "stage2.1.branch2.6.running_var", "stage2.2.branch2.0.weight", "stage2.2.branch2.1.weight", "stage2.2.branch2.1.bias", "stage2.2.branch2.1.running_mean", "stage2.2.branch2.1.running_var", "stage2.2.branch2.3.weight", "stage2.2.branch2.4.weight", "stage2.2.branch2.4.bias", "stage2.2.branch2.4.running_mean", "stage2.2.branch2.4.running_var", "stage2.2.branch2.5.weight", "stage2.2.branch2.6.weight", "stage2.2.branch2.6.bias", "stage2.2.branch2.6.running_mean", "stage2.2.branch2.6.running_var", "stage2.3.branch2.0.weight", "stage2.3.branch2.1.weight", "stage2.3.branch2.1.bias", "stage2.3.branch2.1.running_mean", "stage2.3.branch2.1.running_var", "stage2.3.branch2.3.weight", "stage2.3.branch2.4.weight", "stage2.3.branch2.4.bias", "stage2.3.branch2.4.running_mean", "stage2.3.branch2.4.running_var", "stage2.3.branch2.5.weight", "stage2.3.branch2.6.weight", "stage2.3.branch2.6.bias", "stage2.3.branch2.6.running_mean", "stage2.3.branch2.6.running_var", "stage3.0.branch1.0.weight", "stage3.0.branch1.1.weight", "stage3.0.branch1.1.bias", "stage3.0.branch1.1.running_mean", "stage3.0.branch1.1.running_var", "stage3.0.branch1.2.weight", "stage3.0.branch1.3.weight", "stage3.0.branch1.3.bias", "stage3.0.branch1.3.running_mean", "stage3.0.branch1.3.running_var", "stage3.0.branch2.0.weight", "stage3.0.branch2.1.weight", "stage3.0.branch2.1.bias", "stage3.0.branch2.1.running_mean", "stage3.0.branch2.1.running_var", "stage3.0.branch2.3.weight", "stage3.0.branch2.4.weight", "stage3.0.branch2.4.bias", "stage3.0.branch2.4.running_mean", "stage3.0.branch2.4.running_var", "stage3.0.branch2.5.weight", "stage3.0.branch2.6.weight", "stage3.0.branch2.6.bias", "stage3.0.branch2.6.running_mean", "stage3.0.branch2.6.running_var", "stage3.1.branch2.0.weight", "stage3.1.branch2.1.weight", "stage3.1.branch2.1.bias", "stage3.1.branch2.1.running_mean", "stage3.1.branch2.1.running_var", "stage3.1.branch2.3.weight", "stage3.1.branch2.4.weight", "stage3.1.branch2.4.bias", "stage3.1.branch2.4.running_mean", "stage3.1.branch2.4.running_var", "stage3.1.branch2.5.weight", "stage3.1.branch2.6.weight", "stage3.1.branch2.6.bias", "stage3.1.branch2.6.running_mean", "stage3.1.branch2.6.running_var", "stage3.2.branch2.0.weight", "stage3.2.branch2.1.weight", "stage3.2.branch2.1.bias", "stage3.2.branch2.1.running_mean", "stage3.2.branch2.1.running_var", "stage3.2.branch2.3.weight", "stage3.2.branch2.4.weight", "stage3.2.branch2.4.bias", "stage3.2.branch2.4.running_mean", "stage3.2.branch2.4.running_var", "stage3.2.branch2.5.weight", "stage3.2.branch2.6.weight", "stage3.2.branch2.6.bias", "stage3.2.branch2.6.running_mean", "stage3.2.branch2.6.running_var", "stage3.3.branch2.0.weight", "stage3.3.branch2.1.weight", "stage3.3.branch2.1.bias", "stage3.3.branch2.1.running_mean", "stage3.3.branch2.1.running_var", "stage3.3.branch2.3.weight", "stage3.3.branch2.4.weight", "stage3.3.branch2.4.bias", "stage3.3.branch2.4.running_mean", "stage3.3.branch2.4.running_var", "stage3.3.branch2.5.weight", "stage3.3.branch2.6.weight", "stage3.3.branch2.6.bias", "stage3.3.branch2.6.running_mean", "stage3.3.branch2.6.running_var", "stage3.4.branch2.0.weight", "stage3.4.branch2.1.weight", "stage3.4.branch2.1.bias", "stage3.4.branch2.1.running_mean", "stage3.4.branch2.1.running_var", "stage3.4.branch2.3.weight", "stage3.4.branch2.4.weight", "stage3.4.branch2.4.bias", "stage3.4.branch2.4.running_mean", "stage3.4.branch2.4.running_var", "stage3.4.branch2.5.weight", "stage3.4.branch2.6.weight", "stage3.4.branch2.6.bias", "stage3.4.branch2.6.running_mean", "stage3.4.branch2.6.running_var", "stage3.5.branch2.0.weight", "stage3.5.branch2.1.weight", "stage3.5.branch2.1.bias", "stage3.5.branch2.1.running_mean", "stage3.5.branch2.1.running_var", "stage3.5.branch2.3.weight", "stage3.5.branch2.4.weight", "stage3.5.branch2.4.bias", "stage3.5.branch2.4.running_mean", "stage3.5.branch2.4.running_var", "stage3.5.branch2.5.weight", "stage3.5.branch2.6.weight", "stage3.5.branch2.6.bias", "stage3.5.branch2.6.running_mean", "stage3.5.branch2.6.running_var", "stage3.6.branch2.0.weight", "stage3.6.branch2.1.weight", "stage3.6.branch2.1.bias", "stage3.6.branch2.1.running_mean", "stage3.6.branch2.1.running_var", "stage3.6.branch2.3.weight", "stage3.6.branch2.4.weight", "stage3.6.branch2.4.bias", "stage3.6.branch2.4.running_mean", "stage3.6.branch2.4.running_var", "stage3.6.branch2.5.weight", "stage3.6.branch2.6.weight", "stage3.6.branch2.6.bias", "stage3.6.branch2.6.running_mean", "stage3.6.branch2.6.running_var", "stage3.7.branch2.0.weight", "stage3.7.branch2.1.weight", "stage3.7.branch2.1.bias", "stage3.7.branch2.1.running_mean", "stage3.7.branch2.1.running_var", "stage3.7.branch2.3.weight", "stage3.7.branch2.4.weight", "stage3.7.branch2.4.bias", "stage3.7.branch2.4.running_mean", "stage3.7.branch2.4.running_var", "stage3.7.branch2.5.weight", "stage3.7.branch2.6.weight", "stage3.7.branch2.6.bias", "stage3.7.branch2.6.running_mean", "stage3.7.branch2.6.running_var", "stage4.0.branch1.0.weight", "stage4.0.branch1.1.weight", "stage4.0.branch1.1.bias", "stage4.0.branch1.1.running_mean", "stage4.0.branch1.1.running_var", "stage4.0.branch1.2.weight", "stage4.0.branch1.3.weight", "stage4.0.branch1.3.bias", "stage4.0.branch1.3.running_mean", "stage4.0.branch1.3.running_var", "stage4.0.branch2.0.weight", "stage4.0.branch2.1.weight", "stage4.0.branch2.1.bias", "stage4.0.branch2.1.running_mean", "stage4.0.branch2.1.running_var", "stage4.0.branch2.3.weight", "stage4.0.branch2.4.weight", "stage4.0.branch2.4.bias", "stage4.0.branch2.4.running_mean", "stage4.0.branch2.4.running_var", "stage4.0.branch2.5.weight", "stage4.0.branch2.6.weight", "stage4.0.branch2.6.bias", "stage4.0.branch2.6.running_mean", "stage4.0.branch2.6.running_var", "stage4.1.branch2.0.weight", "stage4.1.branch2.1.weight", "stage4.1.branch2.1.bias", "stage4.1.branch2.1.running_mean", "stage4.1.branch2.1.running_var", "stage4.1.branch2.3.weight", "stage4.1.branch2.4.weight", "stage4.1.branch2.4.bias", "stage4.1.branch2.4.running_mean", "stage4.1.branch2.4.running_var", "stage4.1.branch2.5.weight", "stage4.1.branch2.6.weight", "stage4.1.branch2.6.bias", "stage4.1.branch2.6.running_mean", "stage4.1.branch2.6.running_var", "stage4.2.branch2.0.weight", "stage4.2.branch2.1.weight", "stage4.2.branch2.1.bias", "stage4.2.branch2.1.running_mean", "stage4.2.branch2.1.running_var", "stage4.2.branch2.3.weight", "stage4.2.branch2.4.weight", "stage4.2.branch2.4.bias", "stage4.2.branch2.4.running_mean", "stage4.2.branch2.4.running_var", "stage4.2.branch2.5.weight", "stage4.2.branch2.6.weight", "stage4.2.branch2.6.bias", "stage4.2.branch2.6.running_mean", "stage4.2.branch2.6.running_var", "stage4.3.branch2.0.weight", "stage4.3.branch2.1.weight", "stage4.3.branch2.1.bias", "stage4.3.branch2.1.running_mean", "stage4.3.branch2.1.running_var", "stage4.3.branch2.3.weight", "stage4.3.branch2.4.weight", "stage4.3.branch2.4.bias", "stage4.3.branch2.4.running_mean", "stage4.3.branch2.4.running_var", "stage4.3.branch2.5.weight", "stage4.3.branch2.6.weight", "stage4.3.branch2.6.bias", "stage4.3.branch2.6.running_mean", "stage4.3.branch2.6.running_var", "local.conv1_1.weight", "local.bn1_1.weight", "local.bn1_1.bias", "local.bn1_1.running_mean", "local.bn1_1.running_var", "local.conv1_2.weight", "local.bn1_2.weight", "local.bn1_2.bias", "local.bn1_2.running_mean", "local.bn1_2.running_var", "local.conv2_1.weight", "local.bn2_1.weight", "local.bn2_1.bias", "local.bn2_1.running_mean", "local.bn2_1.running_var", "local.conv2_2.weight", "local.bn2_2.weight", "local.bn2_2.bias", "local.bn2_2.running_mean", "local.bn2_2.running_var", "local.conv3_1.weight", "local.bn3_1.weight", "local.bn3_1.bias", "local.bn3_1.running_mean", "local.bn3_1.running_var", "local.conv3_2.weight", "local.bn3_2.weight", "local.bn3_2.bias", "local.bn3_2.running_mean", "local.bn3_2.running_var", "local.conv4_1.weight", "local.bn4_1.weight", "local.bn4_1.bias", "local.bn4_1.running_mean", "local.bn4_1.running_var", "local.conv4_2.weight", "local.bn4_2.weight", "local.bn4_2.bias", "local.bn4_2.running_mean", "local.bn4_2.running_var", "modulator.channel_att.gate_c.gate_c_fc_0.weight", "modulator.channel_att.gate_c.gate_c_fc_0.bias", "modulator.channel_att.gate_c.gate_c_bn_1.weight", "modulator.channel_att.gate_c.gate_c_bn_1.bias", "modulator.channel_att.gate_c.gate_c_bn_1.running_mean", "modulator.channel_att.gate_c.gate_c_bn_1.running_var", "modulator.channel_att.gate_c.gate_c_fc_final.weight", "modulator.channel_att.gate_c.gate_c_fc_final.bias", "modulator.spatial_att.gate_s.gate_s_conv_reduce0.weight", "modulator.spatial_att.gate_s.gate_s_conv_reduce0.bias", "modulator.spatial_att.gate_s.gate_s_bn_reduce0.weight", "modulator.spatial_att.gate_s.gate_s_bn_reduce0.bias", "modulator.spatial_att.gate_s.gate_s_bn_reduce0.running_mean", "modulator.spatial_att.gate_s.gate_s_bn_reduce0.running_var", "modulator.spatial_att.gate_s.gate_s_conv_di_0.weight", "modulator.spatial_att.gate_s.gate_s_conv_di_0.bias", "modulator.spatial_att.gate_s.gate_s_bn_di_0.weight", "modulator.spatial_att.gate_s.gate_s_bn_di_0.bias", "modulator.spatial_att.gate_s.gate_s_bn_di_0.running_mean", "modulator.spatial_att.gate_s.gate_s_bn_di_0.running_var", "modulator.spatial_att.gate_s.gate_s_conv_di_1.weight", "modulator.spatial_att.gate_s.gate_s_conv_di_1.bias", "modulator.spatial_att.gate_s.gate_s_bn_di_1.weight", "modulator.spatial_att.gate_s.gate_s_bn_di_1.bias", "modulator.spatial_att.gate_s.gate_s_bn_di_1.running_mean", "modulator.spatial_att.gate_s.gate_s_bn_di_1.running_var", "modulator.spatial_att.gate_s.gate_s_conv_final.weight", "modulator.spatial_att.gate_s.gate_s_conv_final.bias", "conv5.0.weight", "conv5.1.weight", "conv5.1.bias", "conv5.1.running_mean", "conv5.1.running_var", "fc.weight", "fc.bias".
Unexpected key(s) in state_dict: "module.conv1.0.weight", "module.conv1.1.weight", "module.conv1.1.bias", "module.conv1.1.running_mean", "module.conv1.1.running_var", "module.conv1.1.num_batches_tracked", "module.stage2.0.branch1.0.weight", "module.stage2.0.branch1.1.weight", "module.stage2.0.branch1.1.bias", "module.stage2.0.branch1.1.running_mean", "module.stage2.0.branch1.1.running_var", "module.stage2.0.branch1.1.num_batches_tracked", "module.stage2.0.branch1.2.weight", "module.stage2.0.branch1.3.weight", "module.stage2.0.branch1.3.bias", "module.stage2.0.branch1.3.running_mean", "module.stage2.0.branch1.3.running_var", "module.stage2.0.branch1.3.num_batches_tracked", "module.stage2.0.branch2.0.weight", "module.stage2.0.branch2.1.weight", "module.stage2.0.branch2.1.bias", "module.stage2.0.branch2.1.running_mean", "module.stage2.0.branch2.1.running_var", "module.stage2.0.branch2.1.num_batches_tracked", "module.stage2.0.branch2.3.weight", "module.stage2.0.branch2.4.weight", "module.stage2.0.branch2.4.bias", "module.stage2.0.branch2.4.running_mean", "module.stage2.0.branch2.4.running_var", "module.stage2.0.branch2.4.num_batches_tracked", "module.stage2.0.branch2.5.weight", "module.stage2.0.branch2.6.weight", "module.stage2.0.branch2.6.bias", "module.stage2.0.branch2.6.running_mean", "module.stage2.0.branch2.6.running_var", "module.stage2.0.branch2.6.num_batches_tracked", "module.stage2.1.branch2.0.weight", "module.stage2.1.branch2.1.weight", "module.stage2.1.branch2.1.bias", "module.stage2.1.branch2.1.running_mean", "module.stage2.1.branch2.1.running_var", "module.stage2.1.branch2.1.num_batches_tracked", "module.stage2.1.branch2.3.weight", "module.stage2.1.branch2.4.weight", "module.stage2.1.branch2.4.bias", "module.stage2.1.branch2.4.running_mean", "module.stage2.1.branch2.4.running_var", "module.stage2.1.branch2.4.num_batches_tracked", "module.stage2.1.branch2.5.weight", "module.stage2.1.branch2.6.weight", "module.stage2.1.branch2.6.bias", "module.stage2.1.branch2.6.running_mean", "module.stage2.1.branch2.6.running_var", "module.stage2.1.branch2.6.num_batches_tracked", "module.stage2.2.branch2.0.weight", "module.stage2.2.branch2.1.weight", "module.stage2.2.branch2.1.bias", "module.stage2.2.branch2.1.running_mean", "module.stage2.2.branch2.1.running_var", "module.stage2.2.branch2.1.num_batches_tracked", "module.stage2.2.branch2.3.weight", "module.stage2.2.branch2.4.weight", "module.stage2.2.branch2.4.bias", "module.stage2.2.branch2.4.running_mean", "module.stage2.2.branch2.4.running_var", "module.stage2.2.branch2.4.num_batches_tracked", "module.stage2.2.branch2.5.weight", "module.stage2.2.branch2.6.weight", "module.stage2.2.branch2.6.bias", "module.stage2.2.branch2.6.running_mean", "module.stage2.2.branch2.6.running_var", "module.stage2.2.branch2.6.num_batches_tracked", "module.stage2.3.branch2.0.weight", "module.stage2.3.branch2.1.weight", "module.stage2.3.branch2.1.bias", "module.stage2.3.branch2.1.running_mean", "module.stage2.3.branch2.1.running_var", "module.stage2.3.branch2.1.num_batches_tracked", "module.stage2.3.branch2.3.weight", "module.stage2.3.branch2.4.weight", "module.stage2.3.branch2.4.bias", "module.stage2.3.branch2.4.running_mean", "module.stage2.3.branch2.4.running_var", "module.stage2.3.branch2.4.num_batches_tracked", "module.stage2.3.branch2.5.weight", "module.stage2.3.branch2.6.weight", "module.stage2.3.branch2.6.bias", "module.stage2.3.branch2.6.running_mean", "module.stage2.3.branch2.6.running_var", "module.stage2.3.branch2.6.num_batches_tracked", "module.stage3.0.branch1.0.weight", "module.stage3.0.branch1.1.weight", "module.stage3.0.branch1.1.bias", "module.stage3.0.branch1.1.running_mean", "module.stage3.0.branch1.1.running_var", "module.stage3.0.branch1.1.num_batches_tracked", "module.stage3.0.branch1.2.weight", "module.stage3.0.branch1.3.weight", "module.stage3.0.branch1.3.bias", "module.stage3.0.branch1.3.running_mean", "module.stage3.0.branch1.3.running_var", "module.stage3.0.branch1.3.num_batches_tracked", "module.stage3.0.branch2.0.weight", "module.stage3.0.branch2.1.weight", "module.stage3.0.branch2.1.bias", "module.stage3.0.branch2.1.running_mean", "module.stage3.0.branch2.1.running_var", "module.stage3.0.branch2.1.num_batches_tracked", "module.stage3.0.branch2.3.weight", "module.stage3.0.branch2.4.weight", "module.stage3.0.branch2.4.bias", "module.stage3.0.branch2.4.running_mean", "module.stage3.0.branch2.4.running_var", "module.stage3.0.branch2.4.num_batches_tracked", "module.stage3.0.branch2.5.weight", "module.stage3.0.branch2.6.weight", "module.stage3.0.branch2.6.bias", "module.stage3.0.branch2.6.running_mean", "module.stage3.0.branch2.6.running_var", "module.stage3.0.branch2.6.num_batches_tracked", "module.stage3.1.branch2.0.weight", "module.stage3.1.branch2.1.weight", "module.stage3.1.branch2.1.bias", "module.stage3.1.branch2.1.running_mean", "module.stage3.1.branch2.1.running_var", "module.stage3.1.branch2.1.num_batches_tracked", "module.stage3.1.branch2.3.weight", "module.stage3.1.branch2.4.weight", "module.stage3.1.branch2.4.bias", "module.stage3.1.branch2.4.running_mean", "module.stage3.1.branch2.4.running_var", "module.stage3.1.branch2.4.num_batches_tracked", "module.stage3.1.branch2.5.weight", "module.stage3.1.branch2.6.weight", "module.stage3.1.branch2.6.bias", "module.stage3.1.branch2.6.running_mean", "module.stage3.1.branch2.6.running_var", "module.stage3.1.branch2.6.num_batches_tracked", "module.stage3.2.branch2.0.weight", "module.stage3.2.branch2.1.weight", "module.stage3.2.branch2.1.bias", "module.stage3.2.branch2.1.running_mean", "module.stage3.2.branch2.1.running_var", "module.stage3.2.branch2.1.num_batches_tracked", "module.stage3.2.branch2.3.weight", "module.stage3.2.branch2.4.weight", "module.stage3.2.branch2.4.bias", "module.stage3.2.branch2.4.running_mean", "module.stage3.2.branch2.4.running_var", "module.stage3.2.branch2.4.num_batches_tracked", "module.stage3.2.branch2.5.weight", "module.stage3.2.branch2.6.weight", "module.stage3.2.branch2.6.bias", "module.stage3.2.branch2.6.running_mean", "module.stage3.2.branch2.6.running_var", "module.stage3.2.branch2.6.num_batches_tracked", "module.stage3.3.branch2.0.weight", "module.stage3.3.branch2.1.weight", "module.stage3.3.branch2.1.bias", "module.stage3.3.branch2.1.running_mean", "module.stage3.3.branch2.1.running_var", "module.stage3.3.branch2.1.num_batches_tracked", "module.stage3.3.branch2.3.weight", "module.stage3.3.branch2.4.weight", "module.stage3.3.branch2.4.bias", "module.stage3.3.branch2.4.running_mean", "module.stage3.3.branch2.4.running_var", "module.stage3.3.branch2.4.num_batches_tracked", "module.stage3.3.branch2.5.weight", "module.stage3.3.branch2.6.weight", "module.stage3.3.branch2.6.bias", "module.stage3.3.branch2.6.running_mean", "module.stage3.3.branch2.6.running_var", "module.stage3.3.branch2.6.num_batches_tracked", "module.stage3.4.branch2.0.weight", "module.stage3.4.branch2.1.weight", "module.stage3.4.branch2.1.bias", "module.stage3.4.branch2.1.running_mean", "module.stage3.4.branch2.1.running_var", "module.stage3.4.branch2.1.num_batches_tracked", "module.stage3.4.branch2.3.weight", "module.stage3.4.branch2.4.weight", "module.stage3.4.branch2.4.bias", "module.stage3.4.branch2.4.running_mean", "module.stage3.4.branch2.4.running_var", "module.stage3.4.branch2.4.num_batches_tracked", "module.stage3.4.branch2.5.weight", "module.stage3.4.branch2.6.weight", "module.stage3.4.branch2.6.bias", "module.stage3.4.branch2.6.running_mean", "module.stage3.4.branch2.6.running_var", "module.stage3.4.branch2.6.num_batches_tracked", "module.stage3.5.branch2.0.weight", "module.stage3.5.branch2.1.weight", "module.stage3.5.branch2.1.bias", "module.stage3.5.branch2.1.running_mean", "module.stage3.5.branch2.1.running_var", "module.stage3.5.branch2.1.num_batches_tracked", "module.stage3.5.branch2.3.weight", "module.stage3.5.branch2.4.weight", "module.stage3.5.branch2.4.bias", "module.stage3.5.branch2.4.running_mean", "module.stage3.5.branch2.4.running_var", "module.stage3.5.branch2.4.num_batches_tracked", "module.stage3.5.branch2.5.weight", "module.stage3.5.branch2.6.weight", "module.stage3.5.branch2.6.bias", "module.stage3.5.branch2.6.running_mean", "module.stage3.5.branch2.6.running_var", "module.stage3.5.branch2.6.num_batches_tracked", "module.stage3.6.branch2.0.weight", "module.stage3.6.branch2.1.weight", "module.stage3.6.branch2.1.bias", "module.stage3.6.branch2.1.running_mean", "module.stage3.6.branch2.1.running_var", "module.stage3.6.branch2.1.num_batches_tracked", "module.stage3.6.branch2.3.weight", "module.stage3.6.branch2.4.weight", "module.stage3.6.branch2.4.bias", "module.stage3.6.branch2.4.running_mean", "module.stage3.6.branch2.4.running_var", "module.stage3.6.branch2.4.num_batches_tracked", "module.stage3.6.branch2.5.weight", "module.stage3.6.branch2.6.weight", "module.stage3.6.branch2.6.bias", "module.stage3.6.branch2.6.running_mean", "module.stage3.6.branch2.6.running_var", "module.stage3.6.branch2.6.num_batches_tracked", "module.stage3.7.branch2.0.weight", "module.stage3.7.branch2.1.weight", "module.stage3.7.branch2.1.bias", "module.stage3.7.branch2.1.running_mean", "module.stage3.7.branch2.1.running_var", "module.stage3.7.branch2.1.num_batches_tracked", "module.stage3.7.branch2.3.weight", "module.stage3.7.branch2.4.weight", "module.stage3.7.branch2.4.bias", "module.stage3.7.branch2.4.running_mean", "module.stage3.7.branch2.4.running_var", "module.stage3.7.branch2.4.num_batches_tracked", "module.stage3.7.branch2.5.weight", "module.stage3.7.branch2.6.weight", "module.stage3.7.branch2.6.bias", "module.stage3.7.branch2.6.running_mean", "module.stage3.7.branch2.6.running_var", "module.stage3.7.branch2.6.num_batches_tracked", "module.stage4.0.branch1.0.weight", "module.stage4.0.branch1.1.weight", "module.stage4.0.branch1.1.bias", "module.stage4.0.branch1.1.running_mean", "module.stage4.0.branch1.1.running_var", "module.stage4.0.branch1.1.num_batches_tracked", "module.stage4.0.branch1.2.weight", "module.stage4.0.branch1.3.weight", "module.stage4.0.branch1.3.bias", "module.stage4.0.branch1.3.running_mean", "module.stage4.0.branch1.3.running_var", "module.stage4.0.branch1.3.num_batches_tracked", "module.stage4.0.branch2.0.weight", "module.stage4.0.branch2.1.weight", "module.stage4.0.branch2.1.bias", "module.stage4.0.branch2.1.running_mean", "module.stage4.0.branch2.1.running_var", "module.stage4.0.branch2.1.num_batches_tracked", "module.stage4.0.branch2.3.weight", "module.stage4.0.branch2.4.weight", "module.stage4.0.branch2.4.bias", "module.stage4.0.branch2.4.running_mean", "module.stage4.0.branch2.4.running_var", "module.stage4.0.branch2.4.num_batches_tracked", "module.stage4.0.branch2.5.weight", "module.stage4.0.branch2.6.weight", "module.stage4.0.branch2.6.bias", "module.stage4.0.branch2.6.running_mean", "module.stage4.0.branch2.6.running_var", "module.stage4.0.branch2.6.num_batches_tracked", "module.stage4.1.branch2.0.weight", "module.stage4.1.branch2.1.weight", "module.stage4.1.branch2.1.bias", "module.stage4.1.branch2.1.running_mean", "module.stage4.1.branch2.1.running_var", "module.stage4.1.branch2.1.num_batches_tracked", "module.stage4.1.branch2.3.weight", "module.stage4.1.branch2.4.weight", "module.stage4.1.branch2.4.bias", "module.stage4.1.branch2.4.running_mean", "module.stage4.1.branch2.4.running_var", "module.stage4.1.branch2.4.num_batches_tracked", "module.stage4.1.branch2.5.weight", "module.stage4.1.branch2.6.weight", "module.stage4.1.branch2.6.bias", "module.stage4.1.branch2.6.running_mean", "module.stage4.1.branch2.6.running_var", "module.stage4.1.branch2.6.num_batches_tracked", "module.stage4.2.branch2.0.weight", "module.stage4.2.branch2.1.weight", "module.stage4.2.branch2.1.bias", "module.stage4.2.branch2.1.running_mean", "module.stage4.2.branch2.1.running_var", "module.stage4.2.branch2.1.num_batches_tracked", "module.stage4.2.branch2.3.weight", "module.stage4.2.branch2.4.weight", "module.stage4.2.branch2.4.bias", "module.stage4.2.branch2.4.running_mean", "module.stage4.2.branch2.4.running_var", "module.stage4.2.branch2.4.num_batches_tracked", "module.stage4.2.branch2.5.weight", "module.stage4.2.branch2.6.weight", "module.stage4.2.branch2.6.bias", "module.stage4.2.branch2.6.running_mean", "module.stage4.2.branch2.6.running_var", "module.stage4.2.branch2.6.num_batches_tracked", "module.stage4.3.branch2.0.weight", "module.stage4.3.branch2.1.weight", "module.stage4.3.branch2.1.bias", "module.stage4.3.branch2.1.running_mean", "module.stage4.3.branch2.1.running_var", "module.stage4.3.branch2.1.num_batches_tracked", "module.stage4.3.branch2.3.weight", "module.stage4.3.branch2.4.weight", "module.stage4.3.branch2.4.bias", "module.stage4.3.branch2.4.running_mean", "module.stage4.3.branch2.4.running_var", "module.stage4.3.branch2.4.num_batches_tracked", "module.stage4.3.branch2.5.weight", "module.stage4.3.branch2.6.weight", "module.stage4.3.branch2.6.bias", "module.stage4.3.branch2.6.running_mean", "module.stage4.3.branch2.6.running_var", "module.stage4.3.branch2.6.num_batches_tracked", "module.local.conv1_1.weight", "module.local.bn1_1.weight", "module.local.bn1_1.bias", "module.local.bn1_1.running_mean", "module.local.bn1_1.running_var", "module.local.bn1_1.num_batches_tracked", "module.local.conv1_2.weight", "module.local.bn1_2.weight", "module.local.bn1_2.bias", "module.local.bn1_2.running_mean", "module.local.bn1_2.running_var", "module.local.bn1_2.num_batches_tracked", "module.local.conv2_1.weight", "module.local.bn2_1.weight", "module.local.bn2_1.bias", "module.local.bn2_1.running_mean", "module.local.bn2_1.running_var", "module.local.bn2_1.num_batches_tracked", "module.local.conv2_2.weight", "module.local.bn2_2.weight", "module.local.bn2_2.bias", "module.local.bn2_2.running_mean", "module.local.bn2_2.running_var", "module.local.bn2_2.num_batches_tracked", "module.local.conv3_1.weight", "module.local.bn3_1.weight", "module.local.bn3_1.bias", "module.local.bn3_1.running_mean", "module.local.bn3_1.running_var", "module.local.bn3_1.num_batches_tracked", "module.local.conv3_2.weight", "module.local.bn3_2.weight", "module.local.bn3_2.bias", "module.local.bn3_2.running_mean", "module.local.bn3_2.running_var", "module.local.bn3_2.num_batches_tracked", "module.local.conv4_1.weight", "module.local.bn4_1.weight", "module.local.bn4_1.bias", "module.local.bn4_1.running_mean", "module.local.bn4_1.running_var", "module.local.bn4_1.num_batches_tracked", "module.local.conv4_2.weight", "module.local.bn4_2.weight", "module.local.bn4_2.bias", "module.local.bn4_2.running_mean", "module.local.bn4_2.running_var", "module.local.bn4_2.num_batches_tracked", "module.modulator.channel_att.gate_c.gate_c_fc_0.weight", "module.modulator.channel_att.gate_c.gate_c_fc_0.bias", "module.modulator.channel_att.gate_c.gate_c_bn_1.weight", "module.modulator.channel_att.gate_c.gate_c_bn_1.bias", "module.modulator.channel_att.gate_c.gate_c_bn_1.running_mean", "module.modulator.channel_att.gate_c.gate_c_bn_1.running_var", "module.modulator.channel_att.gate_c.gate_c_bn_1.num_batches_tracked", "module.modulator.channel_att.gate_c.gate_c_fc_final.weight", "module.modulator.channel_att.gate_c.gate_c_fc_final.bias", "module.modulator.spatial_att.gate_s.gate_s_conv_reduce0.weight", "module.modulator.spatial_att.gate_s.gate_s_conv_reduce0.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_reduce0.weight", "module.modulator.spatial_att.gate_s.gate_s_bn_reduce0.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_reduce0.running_mean", "module.modulator.spatial_att.gate_s.gate_s_bn_reduce0.running_var", "module.modulator.spatial_att.gate_s.gate_s_bn_reduce0.num_batches_tracked", "module.modulator.spatial_att.gate_s.gate_s_conv_di_0.weight", "module.modulator.spatial_att.gate_s.gate_s_conv_di_0.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_di_0.weight", "module.modulator.spatial_att.gate_s.gate_s_bn_di_0.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_di_0.running_mean", "module.modulator.spatial_att.gate_s.gate_s_bn_di_0.running_var", "module.modulator.spatial_att.gate_s.gate_s_bn_di_0.num_batches_tracked", "module.modulator.spatial_att.gate_s.gate_s_conv_di_1.weight", "module.modulator.spatial_att.gate_s.gate_s_conv_di_1.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_di_1.weight", "module.modulator.spatial_att.gate_s.gate_s_bn_di_1.bias", "module.modulator.spatial_att.gate_s.gate_s_bn_di_1.running_mean", "module.modulator.spatial_att.gate_s.gate_s_bn_di_1.running_var", "module.modulator.spatial_att.gate_s.gate_s_bn_di_1.num_batches_tracked", "module.modulator.spatial_att.gate_s.gate_s_conv_final.weight", "module.modulator.spatial_att.gate_s.gate_s_conv_final.bias", "module.conv5.0.weight", "module.conv5.1.weight", "module.conv5.1.bias", "module.conv5.1.running_mean", "module.conv5.1.running_var", "module.conv5.1.num_batches_tracked", "module.fc.weight", "module.fc.bias".
你好,我最近在跑您这篇论文的代码,可是我在RAF-DB上的精度一直都在79%徘徊,没法跑到论文中说的效果,请问您能给我一些建议吗。
Thanks for sharing the models.
I try to reproduce the results in the paper with CARE-S dataset.
At first, view(-1)
does not work in the accuracy func.
(325 lines in main.py),
so I use reshape(-1)
instaed of view(-1)
.
I might think it does not affect the results.
Nevertheless,
I can`t get the expected result.
The accuracy is quite low even though I use the pre-trained model uploaded in this repo.
The accuracy of test set is not bad at first time, but it becomes worse with epochs.
The progress is shown below.
Training time: 05-31 16:52
Current learning rate: 0.1
Epoch: [0][ 0/157] Loss 0.2979 (0.2979) Accuracy 12.500 (12.500)
Epoch: [0][ 10/157] Loss 0.2384 (0.2485) Accuracy 19.531 (13.707)
Epoch: [0][ 20/157] Loss 0.2250 (0.2420) Accuracy 10.156 (14.174)
Epoch: [0][ 30/157] Loss 0.2187 (0.2359) Accuracy 17.188 (14.793)
Epoch: [0][ 40/157] Loss 0.2107 (0.2317) Accuracy 17.969 (15.377)
Epoch: [0][ 50/157] Loss 0.2052 (0.2272) Accuracy 23.438 (15.395)
Epoch: [0][ 60/157] Loss 0.2063 (0.2236) Accuracy 16.406 (15.151)
Epoch: [0][ 70/157] Loss 0.2074 (0.2214) Accuracy 16.406 (15.119)
Epoch: [0][ 80/157] Loss 0.2119 (0.2199) Accuracy 11.719 (15.239)
Epoch: [0][ 90/157] Loss 0.2050 (0.2181) Accuracy 15.625 (15.393)
Epoch: [0][100/157] Loss 0.2081 (0.2168) Accuracy 14.844 (15.316)
Epoch: [0][110/157] Loss 0.2133 (0.2158) Accuracy 15.625 (15.280)
Epoch: [0][120/157] Loss 0.2068 (0.2151) Accuracy 13.281 (15.283)
Epoch: [0][130/157] Loss 0.2117 (0.2149) Accuracy 15.625 (15.357)
Epoch: [0][140/157] Loss 0.2069 (0.2142) Accuracy 17.188 (15.376)
Epoch: [0][150/157] Loss 0.2092 (0.2137) Accuracy 12.500 (15.444)
Test: [0/7] Loss 1.0344 (1.0344) Accuracy 57.031 (57.031)
*** Accuracy 15.067 ***
Hi, thank you for sharing your pre-trained weights on ms-celeb-1m, but error occurs when I load resnet50 weights using torch.load: AttributeError: Can't get attribute 'RecorderMeter' on <module 'main', do you have any idea about this error?
Hi and congrats on the great work!
Could you add a license for your code so that it can be re-used and extended?
Hi,
great work, and thanks for sharing. I'm trying to train my own version of the model and I have a quick question.
Did you use the aligned versions from the RAF-DB dataset or did you use a custom face detection and alignment method.
The RAF-DB has two folders original
and aligned
. From your README it seems that you used the files from the original
folder, e.g. test_0001.jpg
. In the aligned
folder the naming is as follows test_0001_aligned.jpg
.
Thanks,
Rasmus
Hello,
Thank you for intresting work )
I try to download some pretrained model from you work from Google drive.
These links are working properly:
The Google Driver for ResNet-18 model. The Google Driver for ResNet-50 model.
But when I try to download these models:
The trained EfficientFace model on AffectNet-7, and AffectNet-8 can be downloaded here, and here, respectively. As demonstrated in the paper, the testing accuracy is 63.70%, and 59.89%, respectively.
I get archive files about 5 Mb. I can't unzip them. The program writes that the archive is broken.
I would like to ask you to update the links to these models.
Hi Zengqun
Thanks for you share this nice work!
I want to know which part of the code reflects that you said in your paper that '' the face region is detected and aligned using Retinaface". I carefully looked at the preprocessing part of the code and it seemed that I could not find it.
Sure, I'm just beginning to study facial expression recognition so please forgive me if the problem is too simple.
I am very grateful for any replies from you
Hi, thanks for the nice and clean repo. I am trying to use your code on some in the wild images. I realize the provided pre-trained model_cla doesn't have the weight of the final FC layer (1024 x 7). Could you help me with that? Thanks again
Hi, thank you for sharing your pre-trained weights on ms-celeb-1m, but error occurs when I load resnet18 weights using torch.load: AttributeError: Can't get attribute 'RecorderMeter' on <module 'main', do you have any idea about this error?
Hi! I see that you recently shared several LDG models trained for FER. Do you have a plan to also share the trained EfficientFace models trained on any FER datasets as per paper?
Thanks!
Hello Team,
I am trying to evaluate the model on the Test Set of RAF-DB. But I am getting the low accuracy.
$python main.py --evaluate --data "/home/aitg/Documents/EfficientFace/RAF/" --gpu "0"
Training time: 04-21 14:58
Test: [ 0/24] Loss 2.2484 (2.2484) Accuracy 10.156 (10.156)
Test: [10/24] Loss 2.4601 (2.3581) Accuracy 6.250 ( 8.452)
Test: [20/24] Loss 2.5689 (2.4966) Accuracy 9.375 ( 7.366)
*** Accuracy 9.550 ***
Would you please suggest me some solution on how to evaluate it after training it on the test set?
Hi, Zeng Qun,
Thank you for sharing this great work.
I noticed that in your paper and also in the BAM,
the channel heatmaps Mc(Fstage2) and the spatial heatmaps Ms(Fstage2) were "added" before being passed through sigmoid.
But in your code, they were "multiplied" before being passed through sigmoid.
EfficientFace/models/modulator.py
Line 58 in 328cb99
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.