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 548 forks source link

how to switch to CK+ in visualize.py #72

Closed Lee-N closed 4 years ago

Lee-N commented 4 years ago

I trained a CK+_VGG19 model by python mainpro_CK+.py --model VGG19 --bs 128 --lr 0.01 --fold 1 and the confusion matrix shows that the accuracy is 93.939%. Then I changed visualize.py checkpoint=torch.load(os.path.join('FER2013_VGG19','PrivateTest_model.t7'),map_location=torch.device('cpu')) net.load_state_dict(checkpoint['net']) to checkpoint=torch.load(os.path.join('CK+_VGG19','Test_model.t7'),map_location=torch.device('cpu')) net.load_state_dict(checkpoint['net'].state_dict()) Then I put my own image into images fold to test It run successfuly but the result is quite inaccurate I dont konw where the problem is Please help me....

WuJie1010 commented 4 years ago

please train ('CK+_VGG19','Test_model.t7') by yourself, and put in this dir.