Skip to main content

easy Face Recognition for python

Project description

Author:KuoYuan Li

N|Solid
本程式簡單地結合dlib,opencv
讓不懂機器學習的朋友可以軟簡單地操作人臉辨識,
程式需另外安裝 dlib
搜尋關鍵字:whl dlib cp*** ***代表python版本 ex:cp310代表 python 3.10
dlib whl 安裝包下載網站: (https://github.com/datamagic2020/Install-dlib)

  • 本套工具主要針對windows使用者設計,相依之 package 及相容性問題需自行排除
  • dlib whl 安裝包下載後必需由檔案離線安裝 pip install ...
  • opencv whl 下載點:請下載合適的opencv版本
    (https://pypi.tuna.tsinghua.edu.cn/simple/opencv-contrib-python/)
    ※PS:
    2022/11/24 使用 python3.10 搭配
    dlib-19.22.99-cp310-cp310-win_amd64.whl
    試用成功
Download the samples to 'train' folder(下載各種照片樣本至train資料夾)
import pyFaceTrace as ft  
ft.downloadImageSamples()  

Demo with webcam

import pyFaceTrace as ft
ft.loadDB(folder='train')
ft.predictCam()
比對目前webcam擷取到的人臉和指定影像檔案並計算它們之間的距離
import pyFaceTrace as ft  
im = ft.captureImageFromCam()
VTest = ft.getFeatureVector(im)
Vtrain = ft.loadFeatureFromPic('train\\李國源.jpg')
D=ft.dist(VTest,Vtrain)
print('距離=',D)
載入train資料夾中所有jpg檔之特徵及tag並直接預測目前webcam擷取到的人臉對應的TAG
import pyFaceTrace as ft
ft.loadDB(folder='train')
im = ft.captureImageFromCam()
VTest = ft.getFeatureVector(im)
result = ft.predictFromDB(VTest)
print(result)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyFaceTrace-4.5.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file pyFaceTrace-4.5.1.tar.gz.

File metadata

  • Download URL: pyFaceTrace-4.5.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for pyFaceTrace-4.5.1.tar.gz
Algorithm Hash digest
SHA256 4bf1bdc8855b7935dbb1b11d958de1f3c764e7686344259fa4fca38cfa1c1ed0
MD5 92ac0d9b20211bd6ec956871db605c0a
BLAKE2b-256 f40b5f335d25575d44d13c93766219c355e850903288b02b6c754f4be8da268d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page