{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"BoundingBox":{"description":"目标检测框位置信息","properties":{"height":{"description":"检测框区域高度","example":453,"format":"int32","type":"integer"},"top_left_x":{"description":"检测框左上角到垂直轴距离","example":513,"format":"int32","type":"integer"},"top_left_y":{"description":"检测框左上角到水平轴距离","example":764,"format":"int32","type":"integer"},"width":{"description":"检测框区域宽度","example":123,"format":"int32","type":"integer"}},"type":"object"},"CommonErrorResponse":{"description":"","properties":{"error_code":{"description":"调用失败时的错误码,具体请参见错误码。\n\n调用成功时无此字段。","example":"AIS.0005","type":"string"},"error_msg":{"description":"调用失败时的错误信息。\n\n调用成功时无此字段。","example":"The service does not exist.","type":"string"}}},"ImageMediaTaggingDetInstance":{"properties":{"bounding_box":{"$ref":"#/definitions/BoundingBox","description":"目标检测框位置信息\n\nwidth:检测框区域宽度\n\nheight:检测框区域高度\n\ntop_left_x:检测框左上角到垂直轴距离\n\ntop_left_y:检测框左上角到水平轴距离","type":"object"},"confidence":{"description":"检测标签的置信度,将Float型置信度转为String类型返回,Float取值范围(0~100)。","type":"string"}}},"ImageMediaTaggingDetItemBody":{"description":"","properties":{"confidence":{"description":"置信度,将Float型置信度转为String类型返回,取值范围:0-100。","example":"38.51","format":"string","type":"string"},"i18n_tag":{"description":"标签的多种语言输出。","properties":{"en":{"description":"英文标签。","example":"suv","type":"string"},"zh":{"description":"中文标签。","example":"越野车","type":"string"}},"type":"object"},"instances":{"description":"目标检测框信息,为空则表示没有目标检测框。","items":{"$ref":"#/definitions/ImageMediaTaggingDetInstance"},"type":"array"},"tag":{"description":"标签名称。","example":"person","type":"string"},"type":{"description":"标签的类别。返回的标签类型,包含二十种大类,具体可以参考[图像标签](http://support.huaweicloud.com/image_faq/image_01_0037.html)","example":"scene","format":"string","type":"string"}}},"ImageMediaTaggingDetReq":{"description":"This is a auto create Body Object","properties":{"image":{"description":"与url二选一\n\n图像数据,base64编码,要求base64编码后大小不超过10M,最短边至少1px,最长边最大10000px,支持JPG、PNG、BMP、WEBP格式。","example":"/9j/4AAQSkZJRgABAgEASABIAAD/4RFZRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAA...\n","type":"string"},"language":{"description":"zh:返回标签的语言类型为中文。\n\nen:返回标签的语言类型为英文。\n\n默认值为zh。","example":"zh","type":"string"},"limit":{"description":"最多返回的tag数(取值范围:1~50),默认值: 10","example":5,"type":"integer"},"threshold":{"description":"置信度的阈值(0~100),低于此置信数的标签,将不会返回。\n\n默认值:20。\n\n最小值:0。\n\n最大值:100。","example":20,"format":"float","type":"number"},"url":{"description":"与image二选一\n\n图片的URL路径,目前支持:\n\n- 公网HTTP/HTTPS URL\n\n- 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见[配置OBS服务的访问权限](https://support.huaweicloud.com/api-moderation/moderation_03_0020.html)。\n\n> - 接口响应时间依赖于图片的下载时间,如果图片下载时间过长,会返回接口调用失败。 > - 请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 > - lmage不支持跨区域OBS,OBS的区域需要和服务保持一致。","example":"","type":"string"}}},"ImageMediaTaggingDetResponse":{"description":"This is a auto create Response Object","properties":{"result":{"description":"调用成功时为图片标签内容。\n\n调用失败时无此字段。","properties":{"tags":{"description":"标签列表集合。","items":{"$ref":"#/definitions/ImageMediaTaggingDetItemBody"},"type":"array"}}}}}},"description":null,"group_id":"66f04006a9454cefb7b97c9f940bbc9c","host":"image.cn-north-4.myhuaweicloud.com","id":"4b50927020e044b7976030abecb59826","info_version":"v2","method":"post","name":"RunImageMediaTaggingDet","parameters":{},"paths":{"/v2/{project_id}/image/media-tagging-det":{"post":{"consumes":[],"description":"自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应的位置坐标。","operationId":"RunImageMediaTaggingDet","parameters":[{"description":"用户的project_id\n\n登陆华为云 -> 用户中心 -> 我的凭证 -> api凭证 即可查看对应区域的项目ID。","in":"path","name":"project_id","required":true,"type":"string"},{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-order":1},{"description":"媒资图像标签检测版接口请求体","in":"body","name":"RunImageMediaTaggingDetRequestBody","required":true,"schema":{"$ref":"#/definitions/ImageMediaTaggingDetReq"}}],"produces":[],"responses":{"200":{"description":"成功响应结果","examples":{"application/json":{"result":{"tags":[{"confidence":"75.74","i18n_tag":{"en":"tie","zh":"领带"},"instance":[{"bounding_box":{"height":453,"top_left_x":513,"top_left_y":764,"width":123},"confidence":"75.74"}],"tag":"领带","type":"服饰穿戴类"}]}}},"schema":{"$ref":"#/definitions/ImageMediaTaggingDetResponse"}},"400":{"description":"失败响应结果","examples":{"application/json":{"error_code":"AIS.0005","error_msg":"The service does not exist."}},"schema":{"$ref":"#/definitions/CommonErrorResponse"}}},"summary":"媒资图像标签检测","tags":["媒资图像标签(检测)"],"x-apiexplorer-hide":"N","x-apigateway-request-type":"public","x-internal":"close","x-is-registered":"Y","x-order":1,"x-request-examples-1":{"image":"/9j/4AAQSkZJRgABAgEASABIAAD/4RFZRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAA...","language":"zh","limit":10,"threshold":30,"url":""},"x-request-examples-2":{"image":"","language":"en","limit":5,"threshold":40,"url":"https://BucketName.obs.myhuaweicloud.com/ObjectName"},"x-request-examples-description-1":"方式一:使用图片的BASE64编码","x-request-examples-description-2":"方式二:使用图片URL","x-request-examples-url-1":"POST https://{endpoint}/v2/{project_id}/image/media-tagging-det","x-request-examples-url-2":"POST https://{endpoint}/v2/{project_id}/image/media-tagging-det","x-scope":"Commercial","x-support-sdk":"Y","x-timeout":"60s"}}},"product_short":"Image","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"媒资图像标签检测","tags":"媒资图像标签(检测)","uri":null,"version":"2.0"}