huawei-cloud-api-definitions-Image 0.1.20240524

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"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"}}},"ImageMediaTaggingInstance":{"properties":{"bounding_box":{"$ref":"#/definitions/BoundingBox","description":"目标检测框位置信息,包括4个值:\n\nwidth:检测框区域宽度\n\nheight:检测框区域高度\n\ntop_left_x:检测框左上角到垂直轴距离\n\ntop_left_y:检测框左上角到水平轴距离","type":"object"},"confidence":{"description":"检测标签置信度,将Float型置信度转为String类型返回,Float取值范围(0~100)。","type":"string"}}},"ImageMediaTaggingItemBody":{"description":"","properties":{"confidence":{"description":"置信度,将Float型置信度转为String类型返回,取值范围:0-100。","example":"38.51","format":"string","type":"string"},"i18n_tag":{"description":"标签的多种语言输出。","properties":{"en":{"description":"英文标签。","example":"Hot air balloon","type":"string"},"zh":{"description":"中文标签。","example":"热气球","type":"string"}},"type":"object"},"i18n_type":{"description":"标签类别的多种语言输出。","properties":{"en":{"description":"英文标签类别。","example":"Human","type":"string"},"zh":{"description":"中文标签类别。","example":"人类","type":"string"}},"type":"object"},"instances":{"description":"目标检测框信息,为空则表示没有目标检测框。","items":{"$ref":"#/definitions/ImageMediaTaggingInstance"},"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"}}},"ImageMediaTaggingReq":{"description":"This is a auto create Body Object","properties":{"image":{"description":"与url二选一\n\n图像数据,base64编码,要求base64编码后大小不超过10M,最短边至少15px,最长边最大4096px,支持JPG/PNG/BMP格式。","example":"/9j/4AAQSkZJRgABAgEASABIAAD/4RFZRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAA...\n","type":"string"},"language":{"description":"zh:返回标签的语言类型为中文。\n\nen:返回标签的语言类型为英文。\n\n默认值为zh。","example":"zh","type":"string"},"limit":{"description":"最多返回的tag数(取值范围:1~150),默认值: 10。","example":5,"type":"integer"},"threshold":{"description":"置信度的阈值(0~100),低于此置信数的标签,将不会返回。\n\n默认值:60。\n\n最小值:0。\n\n最大值:100。\n\n默认值:0。","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-image/image_03_0037.html)。\n\n> - 接口响应时间依赖于图片的下载时间,如果图片下载时间过长,会返回接口调用失败。 > - 请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 > - lmage不支持跨区域OBS,OBS的区域需要和服务保持一致。","example":"","type":"string"}}},"ImageMediaTaggingResponse":{"description":"This is a auto create Response Object","properties":{"result":{"description":"调用成功时为图片标签内容。\n\n调用失败时无此字段。","properties":{"tags":{"description":"标签列表集合。","items":{"$ref":"#/definitions/ImageMediaTaggingItemBody"},"type":"array"}}}}}},"description":null,"group_id":"66f04006a9454cefb7b97c9f940bbc9c","host":"image.cn-north-4.myhuaweicloud.com","id":"f94664837ab64dd98a9ed3d89946bb30","info_version":"v2","method":"post","name":"RunImageMediaTagging","parameters":{},"paths":{"/v2/{project_id}/image/media-tagging":{"post":{"consumes":[],"description":"自然图像的语义内容非常丰富,一个图像包含多个标签内容,图像标签服务准确识别自然图片中数百种场景、上千种通用物体及其属性,让智能相册管理、照片检索和分类、基于场景内容或者物体的广告推荐等功能更加直观。使用时用户发送待处理图片,返回图片标签内容及相应置信度。","operationId":"RunImageMediaTagging","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":"RunImageMediaTaggingRequestBody","required":true,"schema":{"$ref":"#/definitions/ImageMediaTaggingReq"}}],"produces":[],"responses":{"200":{"description":"成功响应结果","examples":{"application/json":{"result":{"tags":[{"confidence":"37.51","i18n_tag":{"en":"person","zh":"人"},"i18n_type":{"en":"Human","zh":"人类"},"instances":[{"bounding_box":{"height":133.32496056189905,"top_left_x":53.134917332575874,"top_left_y":254.2134798490084,"width":117.5866567171537},"confidence":"92.38"}],"tag":"人","type":"人类"}]}}},"schema":{"$ref":"#/definitions/ImageMediaTaggingResponse"}},"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":5,"threshold":70,"url":""},"x-request-examples-2":{"image":"","language":"zh","limit":5,"threshold":70,"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","x-request-examples-url-2":"POST https://{endpoint}/v2/{project_id}/image/media-tagging","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"}