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

功能描述

车辆损伤识别能力可检测图像中车辆损伤的位置以及类型。

前提条件

请确保您已开通目标检测服务,若未开通服务请立即开通

输入限制

  • 图像格式:JPEG、JPG。
  • 图像大小:不超过10M。
  • 图像分辨率:建议小于1280×720像素,图像分辨率过高容易导致请求超时。
  • URL地址中不能包含中文字符。

调试

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

请求参数

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

系统规定参数。取值:RecognizeVehicleDamage

ImageURL String http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/objectdet/RecognizeVehicleDamage/RecognizeVehicleDamage1.jpg

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

返回数据

名称 类型 示例值 描述
RequestId String 91FCB447-807D-4839-A5F0-E0A79D6B33C6

请求ID。

Data Object

返回的结果数据内容。

Elements Array of Element

各个子元素的识别结果。

Type String 1

损伤类型ID。具体类型如下所示。

  • 1:轻微刮擦
  • 2:重度刮擦
  • 3:轻度变形
  • 4:中度变形
  • 5:重度变形
  • 6:crack破损孔洞
  • 7:翼子板和大灯缝隙
  • 8:翼子板保险杠缝隙
  • 9:大灯轻微刮擦
  • 10:大灯重度刮擦
  • 11:大灯破损
  • 12:后视镜轻微刮擦
  • 13:后视镜玻璃破损
  • 14:后视镜脱落
  • 15:挡风玻璃破损
Scores Array of Float 0.683465

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

Boxes Array of Integer [173,178,277,259]

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

Score Float 0.683465

损伤类型对应的概率值。

示例

请求示例

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

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<RecognizeVehicleDamageResponse>
    <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>
</RecognizeVehicleDamageResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/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 ]
    } ]
  }
}

错误码

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

SDK参考

阿里云视觉AI能力支持使用SDK调用,具体可参见SDK总览下载安装。

安全声明

  • 请确保上传的图片或文件来源符合相应的法律法规。
  • 通过体验调试上传的临时文件有效期为1小时,在24小时后会被系统自动清理删除。