Skip to main content

Algorithm python library linked to vsource platform.

Project description

链接VSOURCE_FACE_PLATFORM ,采用平台里的RESTFUL API提供一套本地能够使用的算法库。

pip install vsource -i https://pypi.python.org/simple

目前功能:

  1. 人脸识别:输入两张人脸图像判断来自一个人的概率

  2. 说话人识别:输入两个音频判断来自一个人的概率

  3. 人脸检测:输入一张图像检测出所有的人脸框图

  4. 人脸属性:输入一张图像检测人脸并判断人脸的表情和年龄

一个人脸识别的Demo:

import vsource

if __name__ == '__main__':
    username = {{ secrets.username }}
    password = {{ secrets.password }}
    vsource.login(username, password)

    face_path1 = 'examples/0006_01.jpg'
    face_path2 = 'examples/0007_01.jpg'
    score = vsource.face_recognition(face_path1, face_path2)
    print(score)

一个说话人识别的Demo:

import vsource

if __name__ == '__main__':
    username = {{ serects.username }}
    password = {{ serects.password }}
    vsource.login(username, password)

    audio_path1 = 'examples/0.wav'
    audio_path2 = 'examples/1.wav'
    score = vsource.speaker_recognition(audio_path1, audio_path2)
    print(score)

一个人脸检测的Demo:

import vsource

if __name__ == '__main__':
    username = {{ serects.username }}
    password = {{ serects.password }}
    vsource.login(username, password)

    face_path1 = 'examples/0008_01.jpg'
    result = vsource.face_detection(face_path1)
    print(result)

一个人脸属性的Demo:

import vsource

if __name__ == '__main__':
    username = {{ serects.username }}
    password = {{ serects.password }}
    vsource.login(username, password)

    face_path1 = 'examples/0008_01.jpg'
    result = vsource.face_attribute(face_path1)
    print(result)
    # 其他同学实现的版本
    result2 = vsource.face_attribute(face_path1, version='fsx')
    print(result)

TIPS:

  1. 关于用户名和密码,防止恶意的请求进入,导致服务器收到大量的请求后排队时间过长进一步让服务都不可用,所以暂时还是需要登录态,关于试用的用户名和密码可以联系我。

  2. 持续的更新各种算法中。

  3. 算法如果遇到超时,可以设置参数max_interval=x秒,每个算法都带这个参数,比如face_recognition(face_path, max_interval=100)。如果长时间没有结果,说明算法运行时出现了错误。

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

vsource-1.1.7.tar.gz (15.9 kB view details)

Uploaded Source

File details

Details for the file vsource-1.1.7.tar.gz.

File metadata

  • Download URL: vsource-1.1.7.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.13

File hashes

Hashes for vsource-1.1.7.tar.gz
Algorithm Hash digest
SHA256 878f8f4b88ebb67db62467d2f6cac888b275b8a5449bca46bb4e8e10ebbb606f
MD5 0c928e8df564968c7d7fef6d052d0568
BLAKE2b-256 73b6a4d7f806d9105bdff87f0bfe12c11a42ac3fecaa788560666939bf00a284

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