面部表情识别(Pytorch):人脸检测模型+面部表情识别分类模型

0 相关资料

面部表情识别2:Pytorch实现表情识别(含表情识别数据集和训练代码):https://blog.csdn.net/guyuealian/article/details/129505205

b站视频:https://www.bilibili.com/video/BV1xm4y1p7H3

1 基于人脸检测+面部表情分类识别方法

项目源码:https://github.com/Whiffe/PyTorch-Facial-Expression-Recognition

面部表情识别由两部分组成:人脸检测与表情识别分类

人脸检测:https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB

表情识别分类: resnet18,resnet34,resnet50, mobilenet_v2以及googlenet等常见的深度学习模型

2 项目安装

2.1 平台与镜像

我是实用的AutoDL平台

镜像选择:
PyTorch 1.7.0
Python 3.8(ubuntu18.04)
Cuda 11.0
在这里插入图片描述

2.2 项目下载

项目下载:

git clone https://github.com/Whiffe/PyTorch-Facial-Expression-Recognition.git

如果网速问题无法下载,我已经同步到码云上(推荐)

git clone https://gitee.com/YFwinston/PyTorch-Facial-Expression-Recognition.git

2.3 模型下载

模型权重下载(latest-model-099-94.7200.pth):https://download.csdn.net/download/WhiffeYF/88196455
将下载的模型放在:
PyTorch-Facial-Expression-Recognition/data/pretrained/mobilenet_v2_1.0_CrossEntropyLoss_20230313090258/model
在这里插入图片描述

模型权重下载(rfb-face-mask.pth): https://download.csdn.net/download/WhiffeYF/88196487
将下载的模型放在:
PyTorch-Facial-Expression-Recognition/libs/light_detector/data/pretrained/pth
在这里插入图片描述

2.4 上传待测试图片

在该目录下,上传待检测图片:
PyTorch-Facial-Expression-Recognition/data/test_image

在这里插入图片描述

2.5 项目安装

在 PyTorch-Facial-Expression-Recognition 目录下执行:

pip install -r requirements.txt 

3 demo测试

python demo.py --image_dir data/test_image --model_file data/pretrained/mobilenet_v2_1.0_CrossEntropyLoss_20230313090258/model/latest_model_099_94.7200.pth --out_dir output/

在这里插入图片描述

在这里插入图片描述
检测结果如下:
在这里插入图片描述
在这里插入图片描述

v
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

  • 8
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值