get the facepose
Project description
Info
face_pose.py 2018-05-25
Author: Zhao Mingming <471106585@qq.com>
Copyright: This module has been placed in the public domain.
version:0.0.1 - add get_image_pose
Functions:
face_pose: get face pose
How To Use This Module
example code:
imagepath="closed_eye/9.jfif"
img=io.imread(imagepath)
img1=img
imagepath="closed_eye/14.jfif"
img2=io.imread(imagepath)
ldmer=ldm.LDM()
print img.shape[0]
ldl,facel,txt=ldmer.landmarks(img)
print txt
for ld in ldl:
print 10*'-'
print 'nose:'
print ld['nose']
for face in facel:
print 10*'-'
print 'face:'
print face.top()
print face.left()
print face.width()
print face.height()
print face.bottom()
print face.right()
x,y,w,h=[face.top(),face.left(),face.width(),face.height()]
print x,y,w,h
print "feature:"
ffl=ldmer.face_feature(img,facel)
for ff in ffl:
print help(ff)
print 'ff='+str(ff)
print 'len(ff)='+str(len(ff))
print 'ff[0]='+str(ff[0])
print 'ff[127]='+str(ff[127])
print "face compare:"
print ldmer.face_rec(img1,img2)
print ldmer.has_same_person(img1,img2)
print ldmer.has_same_person(img2,img2)
print "face number:"
print ldmer.face_number(img,facel)
Refresh
add a function : ldmer.imread(imgpath) modify the return value number to: has_flag,max_score=ldmer.has_same_person(img1,img2)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
face_pose-0.0.1.tar.gz
(1.7 kB
view hashes)
Built Distributions
face_pose-0.0.1-py2.7.egg
(1.6 kB
view hashes)
Close
Hashes for face_pose-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a2cdf8410dc9f81265f3873de3f3c8e418d84e36f6ef0e3da3a242eb6fd414 |
|
MD5 | a08c65848eb74228378f2ec52f58abf0 |
|
BLAKE2b-256 | d2c2c4173f965e8c7d9a31a75ee70110fcb382d20c7c151a51c6bf46ea42c5b3 |