视觉智能开放平台中,一张图片,经过 JS 的 canvas.toDataURL 转换,转换前和转换后,表情识别结果不一致,这是什么原因呢?
原图文件id:1721896629104857
requestid:1C7AC71A-9590-58FE-BF9F-15383C44335F
识别结果:生气
{"headers":{"access-control-allow-origin":"","date":"Thu, 25 Jul 2024 09:03:51 GMT","content-length":"192","server":"openresty/1.19.3.2","x-acs-request-id":"1C7AC71A-9590-58FE-BF9F-15383C44335F","connection":"keep-alive","content-type":"application/json;charset=utf-8","etag":"1uR5cfFaPLAFJU+Mi5LcTmw2","access-control-expose-headers":"","x-acs-trace-id":"4859532c5647ada367d945ee44cbe775"},"body":{"RequestId":"1C7AC71A-9590-58FE-BF9F-15383C44335F","Data":{"Elements":[{"Expression":"anger","FaceRectangle":{"Left":322,"Top":282,"Height":532,"Width":482},"FaceProbability":0.75683594}]}},"statusCode":200}
转换文件id:1721896629083677
requestid:9912FA0F-2D3E-56F3-9D4D-9BB90FD8ABFC
识别结果:厌恶
{"headers":{"access-control-allow-origin":"","date":"Thu, 25 Jul 2024 09:02:18 GMT","content-length":"194","server":"openresty/1.19.3.2","x-acs-request-id":"9912FA0F-2D3E-56F3-9D4D-9BB90FD8ABFC","connection":"keep-alive","content-type":"application/json;charset=utf-8","etag":"1kf7A2/9r1hysbz+PxK2A5Q4","access-control-expose-headers":"","x-acs-trace-id":"3d3fa7c5318bf4d529beb2048eb55b4d"},"body":{"RequestId":"9912FA0F-2D3E-56F3-9D4D-9BB90FD8ABFC","Data":{"Elements":[{"Expression":"disgust","FaceRectangle":{"Left":322,"Top":282,"Height":533,"Width":482},"FaceProbability":0.75683594}]}},"statusCode":200}
辨率本地看都是 1128*1692
算法这边验证了,您图中的表情本来就在生气和厌恶之间,两个表情的置信度应该非常接近。然后你们转化图片后,颜色空间 和图像大小变化导致识别在置信度临界值微小抖动,才会带来结果差异,因为现在算法模型是根据每个表情的置信度的最高值确定属于哪个表情。建议使用固定规格的图,减低模型识别的抖动,导致相似表情的结果差异。 此回答来自钉群“阿里云视觉智能开放平台咨询1群”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。