登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于opencv的面部表情识别模型的设计与实现

 2022-12-04 10:12  

论文总字数:18519字

摘 要

表情是人类表达情绪的一种基本方式,是非语言交流的一种有效手段,丰富的表情是对语言进行良好的补充,能够更加完整的向对方传递感情信息,人不仅可以通过表情表达出情感,还可以辨别出交流者的态度与心理。本次设计主要是对人脸(高兴、生气、悲伤)等表情进行识别,通过识别让表情得到了更加充分的应用。比如在娱乐游戏(主要根据人脸变化做出对应的反应,提高自身判断能力交流能力),治疗抑郁症患者(对患者表情进行判断,更好的了解患者心理,进行相应的治疗)等方面最为突出,所以人脸表情识别研究具有重要的社会研究意义。本论文主要工作内容如下:

(1)利用模型训练来进行表情识别,首先需要打开摄像头检测到人脸,对人脸进行识别。

(2)成功识别人脸后,进行预处理(灰度化,可视化等),以便输入到卷积神经网络中。

(3)模型训练,使用keras训练,数据来自 kaggle比赛数据集fer2013。

(4)训练好模型后,对其进行视频检测。

(5)测试成功后,运行程序,打开摄像头,可直接捕获到人脸以及相应表情。

本论文通过MTCNN对人脸进行检测,利用卷积神经网络训练模型,最终得到一个webcam识别人脸情绪分类系统。通过测试,系统准确率一般,所以仍然需要进一步改进提高准确率。

关键词:OpenCV;卷积神经网络;人脸检测;模型训练;表情识别

Research and Design of Facial Expression Recognition based on OpenCV

Abstract

Facial expression is a basic way of human expression of emotions, and an effective means of non-verbal communication. Rich facial expression is a good complement to language and can convey emotional information to each other more completely, people can not only express their emotions through facial expressions, but also recognize the attitude and psychology of the communicator. The design is mainly on the human face (happy, angry, sad) and other expressions recognition, through the recognition of the expression has been more fully applied. For example, in entertainment games (mainly based on the changes in the face to make corresponding responses, improve their ability to communicate their own judgment) , the treatment of patients with depression (to judge the expression of patients, better understand the psychology of patients, the corresponding treatment) is the most prominent, so facial expression recognition research has important social research significance. The major areas of work are as follows:

  1. to use model training to recognize facial expression, first of all, we need to open the camera to detect the face and recognize the face.
  2. after successful face recognition, the face is preprocessed (Grayscale, visualization, etc.) for input into the convolutional neural network.
  3. model training, using Keras training, data from the Kaggle tournament data set fer2013.
  4. after training the model, it is tested by video.
  5. After successful testing, run the program, open the camera, can directly capture the face and the corresponding expression.

In this paper, MTCNN is used to detect human face, and a face emotion classification system based on Webcam is obtained by using the convolutional neural network training model. After testing, the accuracy of the system is average, so further improvement is still needed to improve the accuracy.

Keywords: OpenCV , convolutional neural network, face detection, model training, Facial expression recognition

目录

摘 要 Ⅰ

Abstract Ⅱ

第一章 绪论 1

1.1 研究背景及意义 1

1.2 研究历史与发展现状 1

1.3 主要工作内容 2

1.4 论文组织结构 2

第二章 相关技术基础 4

2.1 OpenCV 4

2.2 python 4

2.3 TensorFlow 4

2.4 MTCNN 4

2.5 Keras 5

2.6 本章小结 5

第三章 需求分析 6

3.1 系统功能需求分析 6

3.2 系统非功能需求分析 6

3.2.1 操作可行性 6

3.2.2 技术可行性 6

3.2.3 社会可行性 7

3.3 本章小结.....................................................................................................................7

第四章 系统设计 8

4.1 系统总体设计 8

4.1.1 系统分层结构设计 8

4.1.2 系统功能模块结构设计 8

4.1.3 系统总体工作流程设计 9

4.2 详细设计 9

4.2.1 样本采集和处理 9

4.2.2 卷积神经网络模型训练—keras 10

4.2.3 表情分类 11

4.3 核心算法设计 12

4.4本章小结....................................................................................................................13

第五章 系统实现与测试 14

5.1 系统实现工具与环境 14

5.2 核心代码分析 14

5.3 系统主要运行界面 15

5.4 系统测试 19

5.4.1 系统测试环境与工具 19

5.4.2 系统功能测试 19

5.4.3 系统非功能测试 19

5.5 本章小结 19

第六章 总结与展望 20

6.1 总结 20

6.2 展望 20

致谢 21

参考文献..................................................................................................................................22

绪论

1.1 研究背景及意义

人做出的表情有效的传达了自己的情绪,并充分解释了自己的语言,让与之交流者可以快速理解自己所要传递的信息。在日常人际交往中,充分的利用表情交流,传达自己的情绪起到了一个至关重要的作用。通过表情交流不仅情感可以快速得到传递,与之交流者的态度和心思也能有一个大体的了解。除此之外,我们还可以通过对人脸的表情识别抓拍到一些美好的瞬间,留下难忘的回忆。因此,从以上这些方面来看,人脸表情的识别研究就十分具有研讨价值,对社会有着很重要的研究意义。就目前而言,我们常接触的识别方法有模拟识别,机器视觉识别,后者在工程技术上有非常大的应用价值[1]。虽然我们凭借自己的肉眼就可以很快的辨别出不同的表情,但是在机器视觉领域,要想实现快速识别表情,还是相当复杂的。但也有很多研究者经过不断的尝试,让人脸面部情绪识别技术在友好的人机交互中逐渐的发展起来,他们还提出了一系列相关的算法,对今后人脸表情识别的研究做出了极大的贡献。近几年来,在人脸识别技术研究领域,涌现了一大批对其感兴趣的研究方向,让我们对这项研究工作有了更大的研究信心,相信通过我们不断的研究、努力,人脸表情识别技术会得到更好的完善,在计算机领域中也会得到更好的应用。

剩余内容已隐藏,请支付后下载全文,论文总字数:18519字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图