(3)特征选择:Tags(标签)
csp-billing-usage: CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Tags=1,CognitiveServices.ComputerVision.Transaction=1 x-envoy-upstream-service-time: 8701 apim-request-id: 3e22d834-63f6-4a6f-9faa-550d6c5e8b69 Strict-Transport-Security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff Date: Fri, 22 Oct 2021 16:44:33 GMT Content-Length: 825 Content-Type: application/json; charset=utf-8 { "categories": [{ "name": "建筑_街道", "score": 0.40234375, "detail": { "landmarks": [] } }, { "name": "户外_", "score": 0.00390625, "detail": { "landmarks": [] } }], "tags": [{ "name": "天空", "confidence": 0.9999513626098633 }, { "name": "户外", "confidence": 0.9900293350219727 }, { "name": "草", "confidence": 0.9896734952926636 }, { "name": "云", "confidence": 0.9334161281585693 }, { "name": "摩天楼", "confidence": 0.8285492658615112 }, { "name": "建筑", "confidence": 0.8191744089126587 }, { "name": "运动场/游乐场", "confidence": 0.7252355217933655 }, { "name": "运动", "confidence": 0.6510032415390015 }, { "name": "树", "confidence": 0.5010823011398315 }, { "name": "体育场", "confidence": 0.20338237285614014 }, { "name": "天", "confidence": 0.11071398854255676 }], "requestId": "3e22d834-63f6-4a6f-9faa-550d6c5e8b69", "metadata": { "height": 4224, "width": 5632, "format": "Jpeg" } }
(4)特征选择:Color(颜色)
csp-billing-usage: CognitiveServices.ComputerVision.Color=1,CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Transaction=1 x-envoy-upstream-service-time: 3890 apim-request-id: 8e5edb4f-fa4e-4dba-a12e-990a8b903f0c Strict-Transport-Security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff Date: Fri, 22 Oct 2021 16:54:09 GMT Content-Length: 420 Content-Type: application/json; charset=utf-8 { "categories": [{ "name": "building_street", "score": 0.40234375, "detail": { "landmarks": [] } }, { "name": "outdoor_", "score": 0.00390625, "detail": { "landmarks": [] } }], "color": { "dominantColorForeground": "Brown", "dominantColorBackground": "White", "dominantColors": ["White"], "accentColor": "753830", "isBwImg": false, "isBWImg": false }, "requestId": "8e5edb4f-fa4e-4dba-a12e-990a8b903f0c", "metadata": { "height": 4224, "width": 5632, "format": "Jpeg" } }
通过上述测试,图像中的基本事物情况已被分析出来。
17、使用Postman调用HTTP请求
Request URL
https://picture-analysis.cognitiveservices.azure.cn/vision/v1.0/analyze?visualFeatures=Description&details=Landmarks&language=en
HTTP request
POST https://picture-analysis.cognitiveservices.azure.cn/vision/v1.0/analyze?visualFeatures=Color&details=Landmarks&language=en HTTP/1.1 Host: picture-analysis.cognitiveservices.azure.cn Content-Type: application/json Ocp-Apim-Subscription-Key: •••••••••••••••••••••••••••••••• {"url":"https://i.loli.net/2021/10/23/qwEFXz163lh9duN.jpg"}
{ "categories": [ { "name": "建筑_街道", "score": 0.40234375, "detail": { "landmarks": [] } }, { "name": "户外_", "score": 0.00390625, "detail": { "landmarks": [] } } ], "tags": [ { "name": "天空", "confidence": 0.9999513626098633 }, { "name": "户外", "confidence": 0.9900293350219727 }, { "name": "草", "confidence": 0.9896734952926636 }, { "name": "云", "confidence": 0.9334161281585693 }, { "name": "摩天楼", "confidence": 0.8285492658615112 }, { "name": "建筑", "confidence": 0.8191744089126587 }, { "name": "运动场/游乐场", "confidence": 0.7252355217933655 }, { "name": "运动", "confidence": 0.6510032415390015 }, { "name": "树", "confidence": 0.5010823011398315 }, { "name": "体育场", "confidence": 0.20338237285614014 }, { "name": "天", "confidence": 0.11071398854255676 } ], "description": { "tags": [ "户外", "草", "城市", "大", "体育", "田地", "男人", "站", "球", "绿色", "播放器", "橙子", "公园", "阴天", "空气", "飞行", "轨道", "骑", "飞机", "水", "火车", "街道", "人们", "播放", "院子", "风筝", "蓝色", "巴士" ], "captions": [ { "text": "城市的风景", "confidence": 0.6212207840873964 } ] }, "requestId": "d622f155-d1ff-48b0-8c83-d99efc3d737a", "metadata": { "height": 4224, "width": 5632, "format": "Jpeg" } }
Ⅱ 人脸API
检测和识别图像中的人和情感。
将面部识别嵌入应用中,以实现高度安全的无缝用户体验。不需要掌握机器学习专业知识。功能包括: 人脸检测,可感知图像中的人脸和特性; 人员识别,可以与最多包含 1,000,000 人的专用存储库中的个人进行匹配; 情感识别,可感知各种反应(如快乐、蔑视、中立和恐惧等); 以及对图像中的相似人脸进行识别和分组
参考链接:快速入门:使用人脸客户端库
1、创建人脸API。
2、填写基本信息。
3、点击“查看+创建”。
4、验证已通过,点击“创建”。
5、部署完成。点击“转到资源”。
6、查看face-api服务概述。
7、检测和分析人脸。
在线测试链接:[Face API - v1.0](Microsoft Cognitive Services (azure.cn))
[ { "faceId": "e3aeb060-a895-4687-ace2-117223e4c045", "faceRectangle": { "top": 62, "left": 63, "width": 57, "height": 76 } } ]