Facial Cosine Similarity,Face Golden Ratio Calculation And Facial Landmark Detecting/Drawing Library
Project description
Welcome To GoldenFace
An Image Processing Library About Calculating Face Golden Ratio, Facial Cosine Similarity and More
please visit for manual => Manual Page
Github => Manual Page
Ümit Aksoylu 2021 © M.I.T License Please check example.py for practical usage.
Installing Library:
pip install GoldenFace
Required Libraries (Dependencies)
opencv-python
Core Functions
Reading a face image as goldenFace object:
umitFace = GoldenFace.goldenFace("umit.png")
Printing face vectors:
print(umitFace.face2Vec())
Printing Geometric Facial Golden Ratio (Between 0-100):
print(umitFace.geometricRatio())
Printing Facial Cosine Similarity With A Golden Face (Between 1.0-0):
print(umitFace.similarityRatio())
Saving a goldenFace objects vectors as json file:
umitFace.saveFaceVec("umitFaceVectors.json")
Reading a face as vectors from json file:
loadedFace = functions.loadFaceVec("face.json")
Calculating face similarity between two face:
print(umitFace.faceSimilarity(loadedFace))
Get Info From GoldenFace Object
Get all facial landmark points
print(umitFace.getLandmarks())
Get all facial important points
print(umitFace.getFacialPoints())
Get face borders
print(umitFace.getFaceBorder())
Calculating Functions
Calculate Trichion-Glabella-Subnazale-Menton Deflection on face
print(umitFace.calculateTGSM())
Calculate Column Parsed line Deflection on face
print(umitFace.calculateVFM())
Calculate Trichion-Zygoma-Menton Deflection
print(umitFace.calculateVFM())
Calculate Trichion-Subnazale-Menton Deflection
print(umitFace.calculateTSM())
Calculate Lateral cantus-Chelion Deflection
print(umitFace.calculateLC())
Drawing Functions
These functions allow you to draw landmarks/ border lines on face
color = (255,255,0)
Draw a cover on face
umitFace.drawFaceCover(color)
Draw border lines on face
umitFace.drawLandmark(color)
Draw Trichion-Zygoma-Menton line on face
umitFace.drawTZM(color)
Draw Trichion-Glabella-Subnazale-Menton line on face
umitFace.drawTGSM(color)
Draw Column Parsed line on face
umitFace.drawVFM(color)
Draw Trichion-Subnazale-Menton line on face
umitFace.drawTSM(color)
Draw Lateral cantus-Chelion
umitFace.drawLC(color)
Draw facial golden ratio mask on face
umitFace.drawMask(color)
Draw facial important points on face
umitFace.drawFacialPoints(color)
Draw all landmark points on face
umitFace.drawLandmarks(color)
Write processed goldenFace object as image:
umitFace.writeImage("umit_analyzed.jpeg")
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file GoldenFace-1.1-py3-none-any.whl.
File metadata
- Download URL: GoldenFace-1.1-py3-none-any.whl
- Upload date:
- Size: 37.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.5rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5be0fde476ab874fc4408a6d92f7a9aa0d0255379b09ecca236bbeef1c3d8c2a
|
|
| MD5 |
a459919825e7c0434d3f59c1a76e06b5
|
|
| BLAKE2b-256 |
b16ccab38583efddc51704954ecf84a30db567fa010e86212c554aa13453a8d7
|