Skip to main content
https://img.shields.io/pypi/v/xface.svg

安装与升级

为了简化安装过程,推荐使用 pip 进行安装

pip install xface

升级 Django Cool 到新版本:

pip install -U xface

如果需要安装 GitHub 上的最新代码:

pip install https://github.com/007gzs/xface/archive/master.zip

快速使用

注册+识别:

import xface
import cv2

face_analysis = xface.FaceAnalysis()
face_analysis.load()
for i in range(5):
    image = cv2.imread("label%d.jpg" % i)
    faces = face_analysis.get_faces(image, max_num=1)
    if faces:
        face_analysis.register_face("label%d" % i, faces[0].feature)
faces = face_analysis.get_faces(image)
res = [
    {
        'bbox': face.bbox,
        'det_score': face.det_score,
        'landmark': face.landmark,
        'landmark_106': face.landmark_106,
        'sim_face_ids': [{'face_id': face_id, 'sim': float(sim)} for face_id, sim in face.sim_face_ids or []]
    }
    for face in faces
]
print(res)

Download files

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

Source Distribution

xface-0.1.0.tar.gz (23.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xface-0.1.0-py3-none-any.whl (23.4 MB view details)

Uploaded Python 3

File details

Details for the file xface-0.1.0.tar.gz.

File metadata

  • Download URL: xface-0.1.0.tar.gz
  • Upload date:
  • Size: 23.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for xface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95fc4ce0d53b1df59f61ac8f69f1e995f4d07e89c19d01647ffc700e11526d73
MD5 2c1883631883ae69efa64390a368152e
BLAKE2b-256 8e4f2ea04847230655410ffa8cd7287510209aaf7690ac01c6e3a7681caf1934

See more details on using hashes here.

File details

Details for the file xface-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xface-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for xface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8101f3387553795adc8e3cf291bf857ac4cfa7ddb9277c311a1fabbbb87a284
MD5 e210c4c2b6f8a2d3741337f8806a152b
BLAKE2b-256 9c364e682566401f5f6708101f29712e7302ae83a753e2dd1ebc83a0b649ead1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.2

2 files

0.0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page