目标识别
接口变更说明
✓ 提供该接口,— 未提供。未列出的接口 EVO Nest 与 Autel Nest2 一致。
| Method | 功能 | EVO Nest | Autel Nest2 | 说明 |
|---|---|---|---|---|
AI_security_set | AI布防设置 | — | ✓ | |
area_search | 区域搜索 | — | ✓ | |
start_track | 开始跟踪 | — | ✓ | |
active_zoom_control | 目标锁定自动变焦 | — | ✓ | |
aiservice_illegal_data | AI违停数据服务 | ✓ | — |
Service
目标跟踪流程:intelligent_lock_enter → select_tracking_target → start_track。
开启目标识别
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_detect_open
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| ai_lens_type | 检测镜头 | int | 0:可见光,1:红外,2:夜视 | AI识别使用的镜头类型 |
| scene_type | 当前识别场景 | int | 0:通用 | 默认传0 |
| target_type_list | 当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别 | list<int> | 见下文“目标类型”定义 | 可以传NULL |
Example:
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_detect_open
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 是否打开AI识别 | int | 0成功 非0失败 |
关闭目标识别
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_detect_close
Data:
Example:
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_detect_close
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 关闭AI识别操作结果 | int | 0成功 非0失败 |
进入智能跟踪
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: intelligent_lock_enter
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| ai_lens_type | 检测镜头 | int | 0:可见光,1:红外,2:夜视 | 默认 0 |
| scene_type | 当前识别场景 | int | 0:通用 | 默认传 0 |
| target_type_list | 当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别 | list<int> | 见下文“目标类型”定义 | 可以传 NULL |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: intelligent_lock_enter
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
退出智能跟踪
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: intelligent_lock_exit
Data:
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: intelligent_lock_exit
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
选择锁定目标的信息
锁定目标功能指飞行器将原地调整机身正对着该目标,该目标点将成为镜头视野的中心。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: select_tracking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| camera_id | 镜头ID | int | 0:可见光,1:红外 | 锁定使用的镜头,缺省时沿用进入智能跟踪时的镜头 |
| tracker_id | 检测目标ID | int | 目标跟踪ID | |
| start_x | 起始点x坐标 | double | 0~1 | 目标框起始点X坐标 |
| start_y | 起始点y坐标 | double | 0~1 | 目标框起始点Y坐标 |
| width | 目标框宽度 | double | 0~1 | 为 0 表示点选 |
| height | 目标框高度 | double | 0~1 | 为 0 表示点选 |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"camera_id": 0,
"tracker_id": 6,
"start_x": 0.24,
"start_y": 0.64,
"width": 0.0,
"height": 0.0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "select_tracking_target"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: select_tracking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 非 0 代表错误 |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "select_tracking_target"
}
退出目标锁定
退出目标锁定,还会继续目标检测,关闭目标识别才会不再检测目标。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: target_tracking_close
Data:
Example:
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: target_tracking_close
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 关闭AI识别操作结果 | int | 0成功 非0失败 |
开始跟踪
在 select_tracking_target 锁定目标后下发,飞机须已在空中。目标框 6 项(camera_id、tracker_id、start_x、start_y、width、height)须全部下发或全部缺省,全部缺省时跟踪已锁定的目标。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: start_track
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| track_type | 跟踪方式 | int | 1:简单跟踪,3:盘旋跟踪 | 必填 |
| camera_id | 镜头ID | int | 0:可见光,1:红外 | 跟踪使用的镜头 |
| tracker_id | 检测目标ID | int | 目标跟踪ID | |
| start_x | 起始点x坐标 | float | 0~1 | 目标框起始点X坐标 |
| start_y | 起始点y坐标 | float | 0~1 | 目标框起始点Y坐标 |
| width | 目标框宽度 | float | 0~1 | 为 0 表示点选 |
| height | 目标框高度 | float | 0~1 | 为 0 表示点选 |
| locked | 机头和云台的相对关系是否锁定 | bool | false:仅云台转,机身不转, true:锁定机头,云台和机身一起转 | 可缺省 |
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"track_type": 3
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "start_track"
}
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: start_track
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
目标锁定自动变焦
锁定目标后自动调整变焦倍率使目标保持合适大小。开关状态通过飞机属性 active_zoom_control 上报。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: active_zoom_control
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| enable | 是否开启自动变焦 | int | 0:关闭,1:开启 | 必填 |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: active_zoom_control
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
区域搜索
飞机在指定多边形区域内按航线飞行并识别目标。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: area_search
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| target_point_list | 搜索区域顶点 | List<Object> | 至少 3 个点 | 构成搜索多边形 |
| target_type | 检测类型列表 | list<int> | 见下文“目标类型”定义 | 可缺省 |
| is_continue | 是否继续搜索 | int | 0:否,1:是 | 默认 0 |
| is_swing | 是否摆动搜索 | int | 0:否,1:是 | 默认 0 |
| flight_id | 任务ID | string | 可缺省 | |
| timeout_sec | 超时时间 | int | 单位:秒,默认 600 |
target_point_list
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| latitude | 纬度 | double | 单位:度 | |
| longitude | 经度 | double | 单位:度 | |
| altitude | 高度 | double | 单位:米 |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: area_search
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
选择违停目标
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: select_illegal_parking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| target_id | 目标车辆ID | string | 可缺省 | |
| start_x | 起始点x坐标 | float | 0~1 | 目标框起始点X坐标 |
| start_y | 起始点y坐标 | float | 0~1 | 目标框起始点Y坐标 |
| width | 目标框宽度 | float | 0~1,须大于 0 | 必填,为 0 时请求失败 |
| height | 目标框高度 | float | 0~1,须大于 0 | 必填,为 0 时请求失败 |
| vehicle_type | 车辆类型 | int | 默认 0 | |
| license_plate | 车牌号 | string | 可缺省 |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: select_illegal_parking_target
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
AI布防设置
设置安防识别的镜头、场景、目标类型与触发动作。
Topic: thing/product/{gateway_sn}/services
Direction: down
Method: AI_security_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| enable | 是否启用安防识别 | bool | 兼容 1/0 | 默认 false |
| ai_lens_type | 检测镜头 | int | 0:可见光,1:红外,2:夜视 | 默认 0 |
| scene_type | 识别场景 | int | 0:通用,1:安防,2:电网巡检 | 默认 0 |
| target_type_list | 检测类型列表 | list<int> | 见下文“目标类型”定义 | 传空表示该场景下全部类型 |
| action | 触发动作 | int | 0:录像并拍照,3:仅拍照 | 默认 0 |
| max_record_time | 最大录制时长 | int | 5~1800 | 单位:秒,默认 60 |
| state | 状态 | int | 1:开启 | 默认 1 |
| enable_func | 功能启用 | int | 1:启用 | 默认 1 |
| actions | 动作列表 | List<Object> | 透传字段,可缺省 | |
| propertys | 属性列表 | List<Object> | 透传字段,可缺省 |
Topic: thing/product/{gateway_sn}/services_reply
Direction: up
Method: AI_security_set
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| result | 返回码 | int | 0成功 非0失败 |
Event
目标识别结果上报(已弃用)
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: target_detect_result_report
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| device_id | 设备ID | int | 上报设备标识 | |
| timestamp | 时间戳 | long | 检测时间戳,单位:毫秒 | |
| image_url | 检测帧图片地址 | string | 检测帧图片地址 | |
| lens_id | 镜头ID | int | 0:可见光,1:红外 | 检测使用的镜头 |
| objects | 检测目标数组 | List<Object> | 本次检测到的目标列表 |
Object
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| type | 检测目标类型 | int | 见下文“目标类型”定义 | 目标分类ID |
| confidence | 置信度 | float | 0~1 | 检测置信度 |
| x | 目标在屏幕中的X坐标 | float | 0~1 | 占屏幕的比例 |
| y | 目标在屏幕中的Y坐标 | float | 0~1 | 占屏幕的比例 |
| width | 目标框宽度 | float | 0~1 | 占屏幕的比例 |
| height | 目标框高度 | float | 0~1 | 占屏幕的比例 |
目标类型:
| 目标类型ID | 目标名称 |
|---|---|
| 0 | 背景(暂不支持) |
| 1 | 动物(暂不支持) |
| 2 | 船 |
| 3 | 小车 |
| 4 | 行人 |
| 5 | 骑行者 |
| 6 | 大车 |
| 34 | 无人机 |
| 35 | 烟雾 |
| 36 | 火 |
| 99 | 未检测到目标 |
AI识别拍摄结果上报
该接口已弃用,AI 识别拍摄结果通过视频流 SEI 上报,SEI 的解析方式与字段说明可参见AI 目标识别。
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: AI_detect_shoot_notify
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| even_id | 事件ID | text | 检测事件唯一标识 | |
| file_id | 文件ID | text | ||
| path | 文件的业务路径 | text | ||
| shooting_type | 拍摄动作类型 | int | ||
| ext | 文件扩展内容 | struct | ||
| »flight_id | 任务 ID | text | ||
| »waypoint_id | 航点 ID | text | ||
| »drone_model_key | 飞行器产品枚举值 | text | ||
| »payload_model_key | 负载产品枚举值 | text | ||
| »is_original | 是否为原图 | int | 0:否,1:是 | |
| metadata | 媒体元数据 | struct | ||
| »gimbal_yaw_degree | 云台偏航角 | float | ||
| »absolute_altitude | 拍摄绝对高度 | float | ||
| »relative_altitude | 拍摄相对高度 | float | ||
| »create_time | 媒体拍摄时间 | date | "format":"iso8601" | |
| »shoot_position | 拍摄位置 | struct | ||
| »»lat | 拍摄位置纬度 | double | ||
| »»lng | 拍摄位置经度 | double | ||
| obj_num | 一帧中检测目标个数 | int | ||
| obj_info | 检测目标数组 | struct | ||
| »tracker_id | 检测目标ID | text | ||
| »cls_id | 检测目标类型 | int | 见“目标类型”定义 | |
| »timestamp | 时间戳 | long | 单位:毫秒 | |
| »object_position | 目标经纬度 | struct | ||
| »»object_lat | 纬度 | double | ||
| »»object_lng | 经度 | double | ||
| »»object_altitude | 海拔高度 | double | ||
| »bbox | 目标检测框 | struct | ||
| »»x | 目标在屏幕中的X坐标 | float | 占屏幕的比例 | |
| »»y | 目标在屏幕中的Y坐标 | float | 占屏幕的比例 | |
| »»w | 目标在屏幕中的宽 | float | 占屏幕的比例 | |
| »»h | 目标在屏幕中的高 | float | 占屏幕的比例 |
证据采集状态上报
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: evidence_collection_status
Data:
任务进度
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| task_id | 任务ID | string | 任务唯一标识 | |
| status | 任务状态 | int | 0:未开始 1:采集中 2:完成 3:失败 | |
| progress | 进度 | int | 0~100 | |
| photo_count | 已拍摄照片数 | int | ||
| required_count | 需拍摄照片数 | int | ||
| target_plate | 目标车牌 | string | ||
| error_msg | 错误信息 | string | 失败时出现 |
单车采集结果
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| mission_name | 任务名称 | string | ||
| mission_id | 任务ID | int | ||
| work_mode | 工作模式 | int | ||
| status | 采集状态 | int | 0:成功 非0:失败 | |
| failure_reason | 失败原因 | int | ||
| vehicle_id | 车辆ID | int | ||
| pos | 车辆位置坐标 | List<int> | ||
| car_color | 车身颜色 | int | ||
| license_plate_color | 车牌颜色 | int | 车牌种类 | |
| vehicle_num | 车辆数量 | int | ||
| vehicle_brand | 车辆品牌 | int | ||
| is_driver_seat_occupied | 驾驶位是否有人 | int | 0:无 1:有 | |
| photo_path | 拍照路径列表 | List<string> |
违停检测信息上报
Topic: thing/product/{gateway_sn}/events
Direction: up
Method: ai_service_illegal_parking_info
Data:
| Column | Name | Type | constraint | Description |
|---|---|---|---|---|
| task_id | 任务ID | text | 违停检测任务标识 | |
| plate_number | 车牌号 | text | ||
| plate_color | 车牌颜色 | text | ||
| vehicle_type | 车辆类型 | text | ||
| vehicle_color | 车身颜色 | text | ||
| latitude | 纬度 | double | 车辆位置纬度 | |
| longitude | 经度 | double | 车辆位置经度 | |
| address | 地址 | text | 车辆位置地址 | |
| detect_time | 检测时间 | long | 检测时间戳,单位:毫秒 | |
| confidence | 置信度 | double | 0~1 | 检测置信度 |
| evidence_urls | 证据图片地址数组 | List<text> | 本次违停的证据图片地址列表 |