91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

識別結果大概是這樣 {'result': {'face_num': 1, 'face_list': [{'quality': {'occlusion': {'right_eye': 0, 'left_cheek': 0.1459853947, 'right_cheek': 0.05144193396, 'left_eye': 0.465408802, 'mouth': 0.02919708006, 'chin_contour': 0.01420217194, 'nose': 0}, 'illumination': 116, 'blur': 7.266304692e-06, 'completeness': 1}, 'age': 22, 'face_token': 'dc6f8f9df5d977ea476e2d04acdf5063', 'race': {'type': 'white', 'probability': 0.6173604727}, 'glasses': {'type': 'common', 'probability': 0.9834988713}, 'gender': {'type': 'male', 'probability': 0.655915916}, 'face_probability': 0.9185044169, 'beauty': 51.21487427, 'angle': {'roll': -2.750922441, 'yaw': 28.97134399, 'pitch': 5.202290535}, 'location': {'height': 65, 'top': 112.0704803, 'width': 76, 'left': 76.20765686, 'rotation': -4}, 'face_type': {'type': 'human', 'probability': 0.9992217422}, 'face_shape': {'type': 'oval', 'probability': 0.4419156313}, 'expression': {'type': 'none', 'probability': 0.9999142885}}]}, 'error_msg': 'SUCCESS', 'timestamp': 1537413754, 'cached': 0, 'error_code': 0, 'log_id': 9465840013520} 年齡:22 顏值:51.21487427 表情-type(none:不笑;smile:微笑;laugh:大笑):none 表情-probability(表情置信度,范圍【0~1】,0最小、1最大):0.9999142885 臉型-type(square: 正方形 triangle:三角形 oval: 橢圓 heart: 心形 round: 圓形):oval 臉型-probability(置信度,范圍【0~1】,代表這是人臉形狀判斷正確的概率,0最小、1最大):0.4419156313 性別-type(male:男性 female:女性):male 性別-probability(性別置信度,范圍【0~1】,0代表概率最小、1代表最大。):0.655915916 是否帶眼鏡-type(none:無眼鏡,common:普通眼鏡,sun:墨鏡):common 是否帶眼鏡-probability(眼鏡置信度,范圍【0~1】,0代表概率最小、1代表最大。):0.9834988713 人種-type(yellow: 黃種人 white: 白種人 black:黑種人 arabs: 阿拉伯人):white 人種-probability(人種置信度,范圍【0~1】,0代表概率最小、1代表最大。):0.6173604727 真實人臉/卡通人臉 -type(human: 真實人臉 cartoon: 卡通人臉):human 真實人臉/卡通人臉 -probability(人臉類型判斷正確的置信度,范圍【0~1】,0代表概率最小、1代表最大。):0.9992217422

資源截圖

代碼片段和文件信息

#?coding=gbk
import?cv2
from?aip?import?AipFace
import?base64
import?os
import?configparser

APP_ID?=?‘14238489‘
API_KEY?=?‘d23L4HoX0VVCp4R4lFXp9YWS‘
SECRET_KEY?=?‘rKG2F87IfEMcpmGZmtApgnQqZxSpTAC7‘

#?初始化AipFace對象
aipFace?=?AipFace(APP_ID?API_KEY?SECRET_KEY)

#?讀取圖片
#filePath?=?“E:/D_Temp/Python/ai/mztu/1610219949.jpg“
#1879401170

def?get_file_content(filePath):
????with?open(filePath?‘rb‘)?as?fp:
????????return?fp.read()

#?定義參數變量
options?=?{
????‘max_face_num‘:?10
????‘face_field‘:?“agebeautyexpressionfaceshapegenderglassesracequalityfacetype“?#landmark
}

def?result_show(filename?filepathnewpathresult):
????data?=?open(conf.get(“conf“?“filepath“)?‘a+‘)
????print(“\r\n“?file=data)
????print(filename?file=data)??#?.decode(‘gbk‘)是解決中文顯示亂碼問題
????print(result?file=data)
????if?result[‘error_code‘]?????????img?=?cv2.imread(filename)
????????face_num?=?result[‘result‘][‘face_num‘]
????????for?i?in?range(face_num):
????????????location?=?result[‘result‘][‘face_list‘][i][‘location‘]
????????????left_top?=?(int(location[‘left‘])?int(location[‘top‘]))
????????????right_bottom?=?(left_top[0]?+?location[‘width‘]?left_top[1]?+?location[‘height‘])
????????????draw_0?=?cv2.rectangle(img?left_top?right_bottom?(255?0?0)?2)
????????????#cv2.imwrite(“E:/D_Temp/Python/ai/origin.jpg“?draw_0)
????????????cv2.imwrite(“{}{}“.format(newpathfilename.split(“/“)[-1])?draw_0)
????????????print(“年齡:{}“.format(result[‘result‘][‘face_list‘][i][‘age‘])?file=data)
????????????print(“顏值:{}“.format(result[‘result‘][‘face_list‘][i][‘beauty‘])?file=data)
????????????print(“表情-type(none:不笑;smile:微笑;laugh:大笑):{}“.format(result[‘result‘][‘face_list‘][i][‘expression‘][‘type‘])?file=data)
????????????print(“表情-probability(表情置信度,范圍【0~1】,0最小、1最大):{}“.format(result[‘result‘][‘face_list‘][i][‘expression‘][‘probability‘])?file=data)
????????????print(“臉型-type(square:?正方形?triangle:三角形?oval:?橢圓?heart:?心形?round:?圓形):{}“.format(result[‘result‘][‘face_list‘][i][‘face_shape‘][‘type‘])?file=data)
????????????print(“臉型-probability(置信度,范圍【0~1】,代表這是人臉形狀判斷正確的概率,0最小、1最大):{}“.format(result[‘result‘][‘face_list‘][i][‘face_shape‘][‘probability‘])?file=data)
????????????print(“性別-type(male:男性?female:女性):{}“.format(
????????????????result[‘result‘][‘face_list‘][i][‘gender‘][‘type‘])?file=data)
????????????print(“性別-probability(性別置信度,范圍【0~1】,0代表概率最小、1代表最大。):{}“.format(
????????????????result[‘result‘][‘face_list‘][i][‘gender‘][‘probability‘])?file=data)

????????????print(“是否帶眼鏡-type(none:無眼鏡,common:普通眼鏡,sun:墨鏡):{}“.format(
????????????????result[‘result‘][‘face_list‘][i][‘glasses‘][‘type‘])?file=data)
????????????print(“是否帶眼鏡-probability(眼鏡置信度,范圍【0~1】,0代表概率最小、1代表最大。):{}“.format(
????????????????result[‘result‘][‘face_list‘][i][‘glasses‘][‘probability‘])?file=data)

????????????print(“人種-type(yellow:?黃種人?white:?白種人?black:黑種人?arabs:?阿拉伯人):{}“.format(
????????????????result[‘result‘][‘face_list‘][i][‘race

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????6185??2018-09-20?11:23??百度人臉\BdFace.py

?????文件????????122??2018-09-20?10:57??百度人臉\config.ini

?????目錄??????????0??2018-09-20?11:23??百度人臉

-----------?---------??----------?-----??----

?????????????????6307????????????????????3


評論

共有 條評論