Coder Social home page Coder Social logo

face_gui's Introduction

face_gui

项目介绍

该项目能够从给定的正面照片中,自动识别脸部区域,并对图像前景进行提取分割,然后替换背景,并按照证件照的规格进行规范化处理。一共由5个模块组成:

1. 头部局部照识别与截取模块设计

利用Vahid Kazemi 和 Josephine Sullivan提出的基于gradient boosting的回归树算法检测面部的68个关键点位置.
论文:One Millisecond Face Alignment with an Ensemble of Regression Trees

2. 图像前景分割

利用opencv中的grabcut方法对人脸周围区域进行分割,将人头和衣服等前景分离出来.
论文:GrabCut” — Interactive Foreground Extraction using Iterated Graph Cuts

3. 证件照规范化

按照规格进行图片处理:分辨率:361×381,分辨率96dpi,位深度24,大小30k左右.

4. 背景替换

根据图片的背景颜色特征进行替换背景(蓝-红-白),如蓝背景变为红背景:将BGR图像转为HSV图像,蓝颜色H通道在78和110之间,然后转换通道将这些像素替换为(0,0,255)即可。

5. 界面设计

利用pyqt5进行界面设计.

项目配置

环境平台

python3

模块安装

  pip install opencv-python 
  pip install pyqt5 
  pip install dlib 

文件下载

shape_predictor_68_face_landmarks.dat.bz2下载后放入data目录中

脚本运行

python head.py

项目展示

image

face_gui's People

Contributors

kailaisun avatar

Watchers

 avatar

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.