在大规模人脸库中进行1:N识别活体检测:防止照片/视频伪造攻击(需v3.1及以上版本)技术特性:支持JPEG、PNG、GIF、BMP格式图像尺寸范围:36x36 - 4096x4096像素单图最大人脸数:100响应时间...eastus或westeurope(根据用户位置)定价层:建议F0(免费,20调用/分钟)用于测试创建人脸服务获取密钥和终结点:终结点:https://.api.cognitive.microsoft.com...= [ 'age', 'gender', 'headPose', 'smile', 'facialHair', 'glasses', 'emotion', 'hair', 'makeup...= face.face_attributes.emotiondominant_emotion = max(emotion....__dict__.items(), key=lambda x: x[1])[0]print(f"主要情绪:{dominant_emotion} (置信度:{getattr(emotion, dominant_emotion