没有项目描述
access-client的Python项目详细描述
访问客户端
python客户端与acessai的各种应用程序/服务(如access face vision)交互
安装
pip install access-cleint
使用量
fromaccess_client.face_vision.clientimportAFV#instantiate by giving the host and port of the access-face-vision serverafv=AFV("http://localhost:5001")
现在我们需要创建一个面组。这将是我们的面部指数。
afv.create_face_group(face_group_name="celebrities")#Pass in the directory and face group nameafv.add_faces_to_face_group(dir="./samples/celebrities",face_group="celebrities")# Directory structure# **/Images/# A/# A_K_01.jpg# A_K_02.jpg# B/# B_S_01.jpg# B_S_02.jpg
一旦人脸被索引,我们就可以对其进行推理。
afv.parse(img_path="./samples/celebrities/Bill Gates/Bill_Gates.jpg",face_group="celebrities")