Code Monkey home page Code Monkey logo

cnn-face-expression-recognition's Introduction

TensorFlow CNN 表情识别模块

介绍传送门

https://zijiaw.github.io/2018/05/04/Tensorflow/Tensorflow实现CNN表情识别方案/#more

文件

FER.py

模型训练,测试的全部内容,运行后将在同目录下生成保存好的表情识别模型,即saved_model.xxx文件。

CNN_MODEL.py

调用表情识别模块的API,使用方法:

import CNN_MODEL as cnn
sess = cnn.Initialize()
cnn.Predict(image_pixels, sess)
sess.close()

其中image_pixels为48*48的灰度像素值组成的numpy数组,模型文件必须在同目录下。

face.py

可以直接运行,调用opencv打开笔记本摄像头,使用同目录下的haarcascade_frontalface_default.xml文件保存的Haar人脸检测器进行人脸定位,处理成48*48像素后调用CNN_MODEL进行人脸识别,从而在控制台显示目前的表情。

cnn-face-expression-recognition's People

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.