#!/usr/bin/env python
# -*- coding:utf-8 -*-
#美男子
import json
from aip import AipImageClassify
""" 你的 APPID AK SK """
APP_ID = '16118'
API_KEY = 'Gaexgn'
SECRET_KEY = 'ugbTx '
client = AipImageClassify(APP_ID, API_KEY, SECRET_KEY)
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('C:/Users/Desktop/5/8.jpg')
""" 调用人脸检测 """
client.detect(image);
""" 如果有可选参数 """
options = {}
# options["max_face_num"] = 2
options["face_fields"] = "age"
""" 带参数调用人脸检测 """
client.detect(image, options)
收藏
点赞
0
个赞
请登录后评论
TOP
切换版块