
# 检测智能对象（标准）（API名称：detect）
#### 功能介绍
标准智能对象检测服务，标准智能对象只判断目标有无，请求体中只需要传入图片的base64编码和object_id。
#### 相关接口
| **接口名称**                                                             | **调用说明**                                                     |
|:---|:---|
| [获取Token](https://support.huaweicloud.com/api-isdp/api_01_0019.html) | 调用该接口获取到Token，再调用其他接口时，需要在请求消息头中添加"Authorization"，其值即为Token。 |
   
#### URL
| 请求方式 | HTTPS地址                                          | 服务架构    | 消息体类型            |
|:---|:---|:---|:---|
| POST | https://***isdp+域名***/openapi/v1/aiObject/detect | OpenAPI | application/json |
   
#### 请求头
| **KEY**       | VALUE                  | 是否必填 | **描述**                                                                                           |
|:---|:---|:---|:---|
| Content-Type  | application/json       | 是    | 无                                                                                                |
| Authorization | bearer ${access_token} | 是    | bearer +" "+[5.2.1](https://support.huaweicloud.com/api-isdp/api_01_0019.html)中获取的access_token的值 |
   
#### 请求参数
| 参数           | 类型     | 是否必填 | 描述                |
|:---|:---|:---|:---|
| image_base64 | String | 是    | 待识别的图片转成的base64串。 |
| object_list  | List   | 是    | 智能对象列表，以及智能对象的入参。 |
   
object_list说明：
| 参数        | 类型     | 是否必填 | 描述                                                                                   |
|:---|:---|:---|:---|
| object_id | String | 是    | 智能对象ID。详情请参见[智能对象标识]。 |
   
#### 响应参数
| 参数          | 类型     | 描述                                                                                                                                                                                                                                                                                                                                    |
|:---|:---|:---|
| result      | String | 响应结果。图片是否通过。 - Y：通过  - N：不通过   |
| object_list | Object | 响应数据。                                                                                                                                                                                                                                                                                                                                 |
   
object_list说明：
| 参数          | 类型     | 描述                                                                                                                                                                                                                                                                                                                                                                                                  |
|:---|:---|:---|
| object_id   | String | 条目ID。                                                                                                                                                                                                                                                                                                                                                                                               |
| result      | String | 条目是否通过。 - Y：通过  - N：不通过   |
| num         | String | 检测到的目标数量。                                                                                                                                                                                                                                                                                                                                                                                           |
| remark_no   | String | 备注编号。                                                                                                                                                                                                                                                                                                                                                                                               |
| remark_en   | String | 评审通过/不通过时对应说明。                                                                                                                                                                                                                                                                                                                                                                                      |
| remark_cn   | String | 备注信息。                                                                                                                                                                                                                                                                                                                                                                                               |
| detect_list | List   | 条目检测结果信息。                                                                                                                                                                                                                                                                                                                                                                                           |
   
detect_list 属性列表：
| 参数            | 类型     | 描述       |
|:---|:---|:---|
| similarity    | String | 置信度。     |
| lt_x          | String | 左上角点横坐标。 |
| lt_y          | String | 左上角点纵坐标。 |
| rb_x          | String | 右下角点横坐标。 |
| rb_y          | String | 右下角点纵坐标。 |
| category_name | String | 条目名称。    |
   
#### 请求示例
```
{
    "image_base64": "str(b64)",
    "object_list": [
        {
            "object_id": "Tesla_safety_suit"
        },
        {
            "object_id": "Tesla_03010101"
        }
    ]
}
```
#### 响应示例
```
[{'result': 'N',
  'object_list': [
      {'object_id': 'Tesla_safety_suit',
       'result': 'N',
       'num': None,
       'remark_no': '',
       'remark_en': '[reason2]有人未穿安全服。',
       'remark_cn': '',
       'detect_list': [{'similarity': '0.913723349571228', 'category_name': 'clothes', 'category_type': '', 'lt_x': '8.0', 'lt_y': '254.0', 'rb_x': '549.0', 'rb_y': '661.0'}]},
      {'object_id': 'Tesla_03010101',
       'result': 'N', 
       'num': None,
       'remark_no': '',
       'remark_en': '[reason2]有人未戴安全帽。',
       'remark_cn': '',
       'detect_list': [{'similarity': '0.8882275819778442', 'category_name': 'naked_head', 'category_type': '', 'lt_x': '760.0', 'lt_y': '6.0', 'rb_x': '963.0', 'rb_y': '271.0'}]}
  ]}]
```
 #### 智能对象标识
| 智能对象ID                     | 描述            |
|:---|:---|
| Tesla_03010101             | 佩戴安全帽         |
| Tesla_03010102             | 国家电网工作服       |
| Tesla_03010105             | 国家电网安全手套      |
| Tesla_03010106             | 国家电网安全鞋       |
| Tesla_03010107             | 国家电网登高安全带     |
| Tesla_03020101             | 电表箱走线规范       |
| Tesla_stable_ladder        | 人员扶梯          |
| Tesla_rust_recognition     | 除锈检测          |
| Tesla_helmet_SG_logo       | 安全帽国家电网logo检查 |
| Tesla_working_suit_SG_logo | 工作服国家电网logo检查 |
| Tesla_02010001             | 螺丝检查          |
| Tesla_02010002             | 接地端子漏铜检测      |
| Tesla_02010003             | 直供电(南方电网)标志检测 |
| Tesla_02010004             | 空调遮挡识别        |
| Tesla_02011101             | GPS天线安装位置检测   |
| Tesla_spanner              | 扳手            |
| Tesla_screwdriver          | 螺丝刀           |
| Tesla_pliers               | 钳子            |
| Tesla_work_fence           | 工作围栏          |
| Tesla_03020102             | 电能表铅封         |
| Tesla_calling              | 打电话           |
| Tesla_personnel_gathering  | 人员聚集          |
| Tesla_04010101             | 安全面盾          |
| Tesla_04010102             | 防冻手套          |
| Tesla_safety_suit          | 安全服           |
| Tesla_03020202             | 设备端低压接地检测     |
| Tesla_03020203             | 设备端高压接地检测     |
| Tesla_03020204             | 地端接地检测        |
| Tesla_03010003             | 绝缘毯           |
| Tesla_03010002             | 绝缘斗臂车         |
| Tesla_smoking_recognition  | 吸烟检测          |
| Tesla_fall_detection       | 人员倒地          |
| Tesla_fire_recognition     | 明火识别          |
| Tesla_02010006             | PV管识别         |
| Tesla_02010007             | 尾纤套管识别        |
| Tesla_03010103             | 绝缘手套检查        |
| Tesla_03010104             | 绝缘胶鞋检查        |
   
