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":{"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"}}},"ImageMainObjectDetectionInstance":{"properties":{"confidence":{"description":"主体框的置信度,将Float型置信度转为String类型返回,Float取值范围(0~100)。","type":"string"},"label":{"description":"主体的类别,现阶段分为:bounding_box和main_object_box","type":"string"},"location":{"description":"目标检测框位置信息,包括4个值:\n\nwidth:检测框区域宽度\n\nheight:检测框区域高度\n\ntop_left_x:检测框左上角到垂直轴距离\n\ntop_left_y:检测框左上角到水平轴距离\nproperties:\nwidth:\ntype: string\ndescription: 检测框区域高度\nexample: 139.58\nheight:\ntype: string\ndescription: 检测框区域高度\nexample: 261.32\ntop_left_x:\ntype: string\ndescription: 检测框左上角到垂直轴距离\nexample: 256.13\ntop_left_y:\ntype: string\ndescription: 检测框左上角到水平轴距离\nexample: 85.2","type":"object"}}},"ImageMainObjectDetectionReq":{"description":"This is a auto create Body Object","properties":{"image":{"description":"与url二选一\n\n图像数据,base64编码,要求base64编码后大小不超过10M,最短边至少1px,最长边最大10000px,支持JPG/PNG/BMP格式。","example":"/9j/4AAQSkZJRgABAgEASABIAAD/4RFZRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAA...\n","type":"string"},"threshold":{"default":0,"description":"置信度的阈值(0~100),低于此置信数的检测结果,将不会返回。\n\n默认值:30。\n\n最小值:0。\n\n最大值:100。","format":"float","maximum":100,"minimum":0,"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> - 接口响应时间依赖于图片的下载时间,如果图片下载时间过长,会返回接口调用失败。\n> - 请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。","example":"","type":"string"}}},"ImageMainObjectDetectionResponse":{"description":"This is a auto create Response Object","properties":{"result":{"description":"主体列表集合。","items":{"$ref":"#/definitions/ImageMainObjectDetectionInstance"},"type":"array"}}}},"description":null,"group_id":"66f04006a9454cefb7b97c9f940bbc9c","host":"image.cn-north-4.myhuaweicloud.com","id":"71301fa79c40447d99b61d02789f2921","info_version":"v2","method":"post","name":"RunImageMainObjectDetection","parameters":{},"paths":{"/v3/{project_id}/image/main-object-detection":{"post":{"consumes":[],"description":"检测图像中的主要内容,返回主要内容的坐标信息,这里的主要内容包括两方面:bounding_box和main_object_box","operationId":"RunImageMainObjectDetection","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":"RunImageMainObjectDetectionRequestBody","required":true,"schema":{"$ref":"#/definitions/ImageMainObjectDetectionReq"}}],"produces":[],"responses":{"200":{"description":"成功响应结果","examples":{"application/json":{"result":[{"confidence":92.38,"label":"bounding_box,","location":{"height":133.32,"top_left_x":53.13,"top_left_y":254.21,"width":117.58}},{"confidence":66.38,"label":"main_object_box,","location":{"height":261.32,"top_left_x":256.13,"top_left_y":85.21,"width":139.58}}]}},"schema":{"$ref":"#/definitions/ImageMainObjectDetectionResponse"}},"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.0,"url":""},"x-request-examples-2":{"image":"","language":"zh","limit":5,"threshold":70.0,"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}/v3/{project_id}image/main-object-detection","x-request-examples-url-2":"POST https://{endpoint}/v3/{project_id}image/main-object-detection","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"}