Can according to the image links to identify first, qualified the download again?
Image recognition, at present only men and women, respectively, the age, beautiful score quite unreliable,
Have a better way?
Now my method is as follows:
The from aip import AipFace
APP_ID="XXX"
API_KEY="XXX"
SECRET_KEY="XXX"
ImageType="BASE64"
The options={}
The options/" face_field "=" gender, beauty "
Options (" face_type ")="LIVE"
AipFace=aipFace (APP_ID, API_KEY and SECRET_KEY)
Result=aipFace. Detect (get_file_content (OS) path) join (file_path file_list)), imageType, options)
Error_code=result [' error_code]
If error_code==222202:
# no face
The continue
If error_code==223110:
# face too much
The continue
If error_code==223114:
# face fuzzy
The continue
Try:
Sex_type=result [' result '] [' face_list] [1] [' gender '] [' type ']
# as long as the beautiful pictures
If sex_type=='male' :
The continue
Beauty=result [' result '] [' face_list] [1] [' beauty ']
New_beauty=round (beauty/10, 1)
If new_beauty & gt;=0, 6
Download this is to determine, directly with links don't know how,
For your guidance!
CodePudding user response:
Well, it seems that tough!