Algorithm python library linked to vsource platform.
Project description
链接VSOURCE_FACE_PLATFORM ,采用平台里的RESTFUL API提供一套本地能够使用的算法库。
pip install vsource_algorithm -i https://pypi.python.org/simple
目前功能:
人脸识别:输入两张人脸图像判断来自一个人的概率
说话人识别:输入两个音频判断来自一个人的概率
人脸检测:输入一张图像检测出所有的人脸框图
人脸属性:输入一张图像检测人脸并判断人脸的表情和年龄
一个人脸识别的Demo:
import vsource_algorithm
if __name__ == '__main__':
username = {{ secrets.username }}
password = {{ secrets.password }}
vsource_algorithm.login(username, password)
face_path1 = 'examples/0006_01.jpg'
face_path2 = 'examples/0007_01.jpg'
score = vsource_algorithm.face_recognition(face_path1, face_path2)
print(score)
一个说话人识别的Demo:
import vsource_algorithm
if __name__ == '__main__':
username = {{ serects.username }}
password = {{ serects.password }}
vsource_algorithm.login(username, password)
audio_path1 = 'examples/0.wav'
audio_path2 = 'examples/1.wav'
score = vsource_algorithm.speaker_recognition(audio_path1, audio_path2)
print(score)
一个人脸检测的Demo:
import vsource_algorithm
if __name__ == '__main__':
username = {{ serects.username }}
password = {{ serects.password }}
vsource_algorithm.login(username, password)
face_path1 = 'examples/0008_01.jpg'
result = vsource_algorithm.face_detection(face_path1)
print(result)
一个人脸属性的Demo:
import vsource_algorithm
if __name__ == '__main__':
username = {{ serects.username }}
password = {{ serects.password }}
vsource_algorithm.login(username, password)
face_path1 = 'examples/0008_01.jpg'
result = vsource_algorithm.face_attribute(face_path1)
print(result)
# 其他同学实现的版本
result2 = vsource_algorithm.face_attribute(face_path1, version='fsx')
print(result)
TIPS:
关于用户名和密码,防止恶意的请求进入,导致服务器收到大量的请求后排队时间过长进一步让服务都不可用,所以暂时还是需要登录态,关于试用的用户名和密码可以联系我。
持续的更新各种算法中。
算法如果遇到超时,可以设置参数max_interval=x秒,每个算法都带这个参数,比如face_recognition(face_path, max_interval=100)。如果长时间没有结果,说明算法运行时出现了错误。
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
File details
Details for the file vsource_algorithm-1.0.13.tar.gz
.
File metadata
- Download URL: vsource_algorithm-1.0.13.tar.gz
- Upload date:
- Size: 9.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d94a88e981b3372bb2ac829075f2abbbc90e79a04fb743ff22c0147dde6187 |
|
MD5 | 86865aef91343b23c64d27d24a33b710 |
|
BLAKE2b-256 | 28f62039c0bd78ac5811f1e581c8c369eb4f3d95c99b40270b022a1da6745acc |