如何将base64图像发送到卷发的Azure face-api?
正如我的问题提到的那样,我如何需要更改此语句以将base64中的图像发送到Azure?
curl -H "Ocp-Apim-Subscription-Key: ***hidden***" "https://***hidden***.cognitiveservices.azure.com/face/v1.0/detect?detectionModel=detection_03&returnFaceId=true&returnFaceLandmarks=false"
-H "Content-Type: application/json" --data-ascii "{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/c/c3/RH_Louise_Lillian_Gish.jpg\"}"
谢谢你!
as my question mention it, how do i need to change this statement to send an image in base64 to Azure?
curl -H "Ocp-Apim-Subscription-Key: ***hidden***" "https://***hidden***.cognitiveservices.azure.com/face/v1.0/detect?detectionModel=detection_03&returnFaceId=true&returnFaceLandmarks=false"
-H "Content-Type: application/json" --data-ascii "{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/c/c3/RH_Louise_Lillian_Gish.jpg\"}"
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据此
另外,您可以尝试按照 muru :
更新的答案:
按照使用face客户端库:
您可以参考类似问题:无法将/请求base64与python 和 face api需要支持base64字符串或本地文件URL或本机文件URL而不是图像URL
As per this documentation, your curl command seems fine.
Alternatively, you can try as suggested by muru:
Updated answer:
As per Use the Face client library:
You can refer to similar issues: can't send/request base64 to azure face api with python and Face API need support for base64 string or Local File URL or Native File URL instead of Image URL
curl -x帖子“ https:// .cognitiveservices.azure.com/face/face/v1.0/检测“ -h” content -type:application/application/octet -stream“ -h” ocp -apim-subscription-key:27E993 ********* 6AAA2464“ -data-binary @'/home/home/rafael/downloads/person.jpg
'有效的解决方案。据我所知,该文档似乎已经过时了。
curl -X POST "https://.cognitiveservices.azure.com/face/v1.0/detect" -H "Content-Type: application/octet-stream" -H "Ocp-Apim-Subscription-Key: 27e993*********6aaa2464" --data-binary @'/home/rafael/Downloads/person.jpg'
is the solution that works. As far as I can tell, the documentation seems outdated.