Giter Site home page Giter Site logo

faceaverage's Introduction

FaceAverage

人脸合成加68点计算

效果展示

error

引用库

import os
import cv2
import numpy as np
import math
import sys
import dlib
import tqdm

有何优势

 1.无需face++ api联网计算特征点,特征合成合二为一使用简单

有何劣势

 1.墙内不好下载shape_predictor_68_face_landmarks.dat训练文件

2.dlib库文件不好安装(大坑)

为何做此项目

 1.偶然间发现了学校教务系统的API有漏洞,手头多出上千张一寸照不知如何处理,遂想到我还可以这样玩!

核心代码来自average-face-opencv-c-python-tutorial,在人脸特征68点识别上调用的dlib的方法,以及需要训练好的shape_predictor_68_face_landmarks.dat,训练文件未在代码内贴出,使用时请网络下载此文件放进源码根目录即可(大约100MB)

文件说明

face68point.py 计算脸部68个特征点

faceAverage.py 脸部合成

/rawimage/存放照片以及特征点文件,已给出22张实例图片

使用说明

 只需启动faceAverage.py,并把图片放入/rawimage中

if __name__ == '__main__' :
  face68point.point68('rawimage/') #图片路径
  average('rawimage/','.bmp') #图片路径+格式

以上操作即可自动计算脸部特征和合成了

faceaverage's People

Contributors

xjkj123 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

yudataguy ahatree

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.