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

Stargazers

hubs avatar  avatar 天飞 avatar zzhang22 avatar kamisato zhang avatar  avatar cuncaojin avatar tiankong avatar 荷鹤鹤 avatar  avatar huanyu.xu avatar 淡漠 avatar Huang Yujing avatar 孙羽 avatar 风沐白 avatar guitarhua avatar  avatar  avatar  avatar  avatar uedzen avatar  avatar GaoLijing avatar 温业广 avatar  avatar  avatar YuanZhaoyi avatar Zar Lee avatar  avatar  avatar FanKeFan avatar jasm718 avatar  avatar  avatar  avatar Hanks avatar devzhi avatar 孙浩 avatar yAngel avatar hamster avatar  avatar Chen, Shifeng avatar  avatar Gavin avatar  avatar Alicia avatar terry zhao avatar  avatar Tom avatar junble avatar Jacob Kiehn avatar jie zeng avatar berry avatar  avatar  avatar WangDeer avatar simpman avatar ifroot avatar ghostviper avatar  avatar  avatar heropoo avatar c16zxd avatar 智浪淘沙 avatar 何凌枫 avatar  avatar Haoyu Bai avatar Sn0wHeart avatar  avatar Streamlet avatar  avatar  avatar Distant_visitor avatar  avatar  avatar niko avatar  avatar sheng huan avatar

Watchers

Qi avatar

face_gui's Issues

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.