本文档介绍车辆损伤识别RecognizeVehicleDamage的语法及示例。

功能描述

RecognizeVehicleDamage检测图片中车辆损伤的位置以及类型。

前提条件

请确保您已开通目标检测服务,详情请参见服务开通

输入限制

  • 图片格式:JPEG、JPG。
  • 图片分辨率:不限制图片分辨率,但图片分辨率太高可能会导致API识别超时,超时时间为5秒。
  • 图片大小:图片大小不超过10M。
  • 图片URL地址中不能包含中文字符。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String RecognizeVehicleDamage

要执行的操作。取值:RecognizeVehicleDamage。

ImageURL String https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/ant_ai/damage_rfcn/ZZAzQ6e50swAAAAAAAAAAABjARcnAQ.jpg

图片URL地址。当前仅支持上海地域的OSS链接,如何生成URL请参见生成URL

返回数据

名称 类型 示例值 描述
Data Struct

返回的结果数据内容。

Elements Array

各个子元素的识别结果。

Boxes List 173,178,277,259

部件位置框信息,形式为【左上角点x坐标,右下角点y坐标,右上角点x坐标,左下角点y坐标】。

Score Float 0.683465

损伤类型对应的概率值。

Scores List 0.683465

对应所有15种损伤类型的损伤概率。

Type String 1

损伤类型id。具体Type类型如下所示。

  • 1:轻微刮擦
  • 2:重度刮擦
  • 3:轻度变形
  • 4:中度变形
  • 5:重度变形
  • 6:crack破损孔洞
  • 7:翼子板和大灯缝隙
  • 8:翼子板保险杠缝隙
  • 9:大灯轻微刮擦
  • 10:大灯重度刮擦
  • 11:大灯破损
  • 12:后视镜轻微刮擦
  • 13:后视镜玻璃破损
  • 14:后视镜脱落
  • 15:挡风玻璃破损
RequestId String 91FCB447-807D-4839-A5F0-E0A79D6B33C6

请求ID。

示例

请求示例

http(s)://objectdet.cn-shanghai.aliyuncs.com/?Action=RecognizeVehicleDamage
&ImageURL=https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/ant_ai/damage_rfcn/ZZAzQ6e50swAAAAAAAAAAABjARcnAQ.jpg
&<公共请求参数>

正常返回示例

XML 格式

<RequestId>91FCB447-807D-4839-A5F0-E0A79D6B33C6</RequestId>
<Data>
    <Elements>
        <Score>0.683465</Score>
        <Type>1</Type>
        <Scores>0.683465</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>173</Boxes>
        <Boxes>178</Boxes>
        <Boxes>277</Boxes>
        <Boxes>259</Boxes>
    </Elements>
    <Elements>
        <Score>0.672104</Score>
        <Type>1</Type>
        <Scores>0.672104</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>269</Boxes>
        <Boxes>137</Boxes>
        <Boxes>432</Boxes>
        <Boxes>206</Boxes>
    </Elements>
    <Elements>
        <Score>0.559934</Score>
        <Type>1</Type>
        <Scores>0.559934</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>788</Boxes>
        <Boxes>158</Boxes>
        <Boxes>884</Boxes>
        <Boxes>189</Boxes>
    </Elements>
    <Elements>
        <Score>0.549272</Score>
        <Type>1</Type>
        <Scores>0.549272</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>667</Boxes>
        <Boxes>213</Boxes>
        <Boxes>846</Boxes>
        <Boxes>242</Boxes>
    </Elements>
    <Elements>
        <Score>0.52864</Score>
        <Type>1</Type>
        <Scores>0.52864</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>487</Boxes>
        <Boxes>143</Boxes>
        <Boxes>670</Boxes>
        <Boxes>222</Boxes>
    </Elements>
    <Elements>
        <Score>0.509307</Score>
        <Type>1</Type>
        <Scores>0.509307</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>692</Boxes>
        <Boxes>256</Boxes>
        <Boxes>761</Boxes>
        <Boxes>285</Boxes>
    </Elements>
    <Elements>
        <Score>0.323798</Score>
        <Type>1</Type>
        <Scores>0.323798</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>684</Boxes>
        <Boxes>221</Boxes>
        <Boxes>827</Boxes>
        <Boxes>296</Boxes>
    </Elements>
    <Elements>
        <Score>0.634771</Score>
        <Type>2</Type>
        <Scores>0</Scores>
        <Scores>0.634771</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>305</Boxes>
        <Boxes>351</Boxes>
        <Boxes>375</Boxes>
        <Boxes>391</Boxes>
    </Elements>
    <Elements>
        <Score>0.61175</Score>
        <Type>2</Type>
        <Scores>0</Scores>
        <Scores>0.61175</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>562</Boxes>
        <Boxes>364</Boxes>
        <Boxes>621</Boxes>
        <Boxes>409</Boxes>
    </Elements>
    <Elements>
        <Score>0.603638</Score>
        <Type>2</Type>
        <Scores>0</Scores>
        <Scores>0.603638</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>379</Boxes>
        <Boxes>302</Boxes>
        <Boxes>462</Boxes>
        <Boxes>352</Boxes>
    </Elements>
    <Elements>
        <Score>0.578584</Score>
        <Type>2</Type>
        <Scores>0</Scores>
        <Scores>0.578584</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Scores>0</Scores>
        <Boxes>481</Boxes>
        <Boxes>310</Boxes>
        <Boxes>546</Boxes>
        <Boxes>367</Boxes>
    </Elements>
</Data>

JSON 格式

{
  "RequestId": "91FCB447-807D-4839-A5F0-E0A79D6B33C6",
  "Data": {
    "Elements": [
      {
        "Score": 0.683465,
        "Type": "1",
        "Scores": [
          0.683465,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          173,
          178,
          277,
          259
        ]
      },
      {
        "Score": 0.672104,
        "Type": "1",
        "Scores": [
          0.672104,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          269,
          137,
          432,
          206
        ]
      },
      {
        "Score": 0.559934,
        "Type": "1",
        "Scores": [
          0.559934,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          788,
          158,
          884,
          189
        ]
      },
      {
        "Score": 0.549272,
        "Type": "1",
        "Scores": [
          0.549272,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          667,
          213,
          846,
          242
        ]
      },
      {
        "Score": 0.52864,
        "Type": "1",
        "Scores": [
          0.52864,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          487,
          143,
          670,
          222
        ]
      },
      {
        "Score": 0.509307,
        "Type": "1",
        "Scores": [
          0.509307,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          692,
          256,
          761,
          285
        ]
      },
      {
        "Score": 0.323798,
        "Type": "1",
        "Scores": [
          0.323798,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          684,
          221,
          827,
          296
        ]
      },
      {
        "Score": 0.634771,
        "Type": "2",
        "Scores": [
          0,
          0.634771,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          305,
          351,
          375,
          391
        ]
      },
      {
        "Score": 0.61175,
        "Type": "2",
        "Scores": [
          0,
          0.61175,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          562,
          364,
          621,
          409
        ]
      },
      {
        "Score": 0.603638,
        "Type": "2",
        "Scores": [
          0,
          0.603638,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          379,
          302,
          462,
          352
        ]
      },
      {
        "Score": 0.578584,
        "Type": "2",
        "Scores": [
          0,
          0.578584,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "Boxes": [
          481,
          310,
          546,
          367
        ]
      }
    ]
  }
}

错误码

关于车辆损伤识别的错误码,详情请参见常见错误码