Code Monkey home page Code Monkey logo

hexiang10 / facial-expression-recognition Goto Github PK

View Code? Open in Web Editor NEW
166.0 166.0 28.0 137.63 MB

利用Pytorch设计完成的基于卷积神经网络实现的面部表情识别项目 —— A facial expression recognition project based on convolution neural network designed by Pytorch 【Plus版本】:https://github.com/hexiang10/face-recognition-plus

Home Page: https://github.com/hexiang10/face-recognition-plus

Python 1.12% Jupyter Notebook 98.88%
python pytorch

facial-expression-recognition's Issues

模型好像有错误

为什么使用vgg,Resnet模型跑出来的图,检测的时候一直从头到尾显示angry,而不是变化检测

路径问题

作者您好,我在训练vgg模型是为啥为出现FileNotFoundError: Couldn't find any class folder in face_images/vgg_verify_set.的错误
求解答,怎么设置才正确呢

Traceback (most recent call last):
File "F:\deeplearning\facial-expression-recognition\model_ResNet.py", line 32, in
data_vaild = torchvision.datasets.ImageFolder(root=path_vaild,transform=transforms_vaild)
File "F:\anaconda\envs\DL\lib\site-packages\torchvision\datasets\folder.py", line 310, in init
super().init(
File "F:\anaconda\envs\DL\lib\site-packages\torchvision\datasets\folder.py", line 145, in init
classes, class_to_idx = self.find_classes(self.root)
File "F:\anaconda\envs\DL\lib\site-packages\torchvision\datasets\folder.py", line 219, in find_classes
return find_classes(directory)
File "F:\anaconda\envs\DL\lib\site-packages\torchvision\datasets\folder.py", line 43, in find_classes
raise FileNotFoundError(f"Couldn't find any class folder in {directory}.")
FileNotFoundError: Couldn't find any class folder in face_images/vgg_verify_set.

Process finished with exit code 1

路径问题

  1. 在模型对比代码中,关于路径path_train 、path_vaild,在文档中说是放数据集和验证集,请问是train_set 和 verify_set吗?不是的话应该是哪两个路径?
  2. 我在跑模型对比代码时,老是出现错误ValueError: Found input variables with inconsistent numbers of samples: [4709, 9418],请问与问题1有关吗?如果没关系请问是什么问题?

torchvision.datasets.ImageFolder错误

在您的VGG与ResNet代码中,使用了torchvision.datasets.ImageFolder来加载训练和验证集数据。这个函数假设数据按照文件夹进行组织,每个文件夹代表一个类别。然而,根据您的描述,您的数据集中只有一个文件夹,这可能导致了标签错误。如果您有测试过你的模型,可能会出现所有人脸都识别为序号0--即angry的表情,这并不是您所提到的“未训练完成”,而是“未正确训练”。而且训练过程中也会出现acc 100%的异常情况,我观察了你训练过程中的VGG与ResNet的演示图片,的确出现了这种异常。

代码问题

您好,我想问下
①在VGG中是否需要代码原型,参考您的代码最后的运行结果中一直都是angry,这个是什么原因导致的呀
②您的模型对比代码中,是只需要修改训练集和验证集的路径吗

代码问题

文件是不少的,但是VGG和ResNet模型跑出来多次都结果一直是angry,检查多天代码也没找到问题,请问作者当时跑出来了吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.