Facial-Expression-Recognition.Pytorch 项目使用教程

Facial-Expression-Recognition.Pytorch 项目使用教程

Facial-Expression-Recognition.PytorchA 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项目地址:https://gitcode.com/gh_mirrors/fa/Facial-Expression-Recognition.Pytorch

1. 项目的目录结构及介绍

Facial-Expression-Recognition.Pytorch/
├── FER2013_VGG19/
│   └── pre-trained-model.pth
├── images/
│   └── 1.jpg
├── pypreprocess_CK+
├── pypreprocess_fer2013
├── pyutils
├── pyvisualize
├── mainpro_CK+.py
├── k_fold_train.py
├── plot_CK+_confusion_matrix.py
├── README.md
└── MIT-LICENSE
  • FER2013_VGG19/: 存放预训练模型的文件夹。
  • images/: 存放测试图像的文件夹。
  • pypreprocess_CK+: 用于CK+数据集的预处理脚本。
  • pypreprocess_fer2013: 用于FER2013数据集的预处理脚本。
  • pyutils: 包含项目中使用的实用工具脚本。
  • pyvisualize: 包含可视化工具脚本。
  • mainpro_CK+.py: 用于训练和评估CK+数据集的主脚本。
  • k_fold_train.py: 用于10折交叉验证的训练脚本。
  • plot_CK+_confusion_matrix.py: 用于绘制CK+数据集混淆矩阵的脚本。
  • README.md: 项目说明文档。
  • MIT-LICENSE: 项目许可证文件。

2. 项目的启动文件介绍

mainpro_CK+.py

该文件是用于训练和评估CK+数据集的主脚本。使用方法如下:

python mainpro_CK+.py --model VGG19 --bs 128 --lr 0.01 --fold 1
  • --model: 指定使用的模型,如VGG19。
  • --bs: 批量大小。
  • --lr: 学习率。
  • --fold: 指定交叉验证的折数。

k_fold_train.py

该文件用于10折交叉验证的训练。使用方法如下:

python k_fold_train.py

plot_CK+_confusion_matrix.py

该文件用于绘制CK+数据集的混淆矩阵。使用方法如下:

python plot_CK+_confusion_matrix.py --model VGG19
  • --model: 指定使用的模型,如VGG19。

3. 项目的配置文件介绍

项目中没有显式的配置文件,但可以通过命令行参数在启动文件中进行配置。例如:

  • 模型选择: 通过--model参数选择不同的模型,如VGG19或Resnet18。
  • 批量大小: 通过--bs参数设置批量大小。
  • 学习率: 通过--lr参数设置学习率。
  • 交叉验证折数: 通过--fold参数设置交叉验证的折数。

通过这些参数,可以在启动训练和评估脚本时灵活配置项目。

Facial-Expression-Recognition.PytorchA 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项目地址:https://gitcode.com/gh_mirrors/fa/Facial-Expression-Recognition.Pytorch

  • 19
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
根据你提供的引用内容,"FileNotFoundError: [Errno 2 No such file or directory"的错误通常是由于文件路径不正确或文件不存在导致的。 如果你在运行程序时遇到这个错误,可能是由于文件路径不正确或文件不存在。请确保你提供的文件路径正确并且文件确实存在于指定的位置。如果你是在PyCharm中运行程序,并且使用的是复制的路径,那么可能是因为你的当前工作目录不是文件的根目录,而是根目录的子目录,这会导致无法找到文件。在这种情况下,你可以尝试在文件的根目录下重新打开一个命令行窗口,并运行程序。这样应该可以解决该错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [FileNotFoundError: [Errno 2] No such file or directory:XXXX](https://blog.csdn.net/weixin_43135178/article/details/128354305)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *2* [Python之FileNotFoundError: [Errno 2] No such file or directory问题处理](https://blog.csdn.net/qq_41845402/article/details/128974839)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

薛珑佳

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值