跳到主要内容

目标识别

接口变更说明​

✓ 提供该接口,— 未提供。未列出的接口 EVO Nest 与 Autel Nest2 一致。

Method功能EVO NestAutel Nest2说明
AI_security_setAI布防设置—✓
area_search区域搜索—✓
start_track开始跟踪—✓
active_zoom_control目标锁定自动变焦—✓
aiservice_illegal_dataAI违停数据服务✓—

Service

目标跟踪流程:intelligent_lock_enter → select_tracking_target → start_track。

开启目标识别​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: target_detect_open

Data:

ColumnNameTypeconstraintDescription
ai_lens_type检测镜头int0:可见光,1:红外,2:夜视AI识别使用的镜头类型
scene_type当前识别场景int0:通用默认传0
target_type_list当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别list<int>见下文“目标类型”定义可以传NULL

Example:

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: target_detect_open

ColumnNameTypeconstraintDescription
result是否打开AI识别int0成功 非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

ColumnNameTypeconstraintDescription
result关闭AI识别操作结果int0成功 非0失败

进入智能跟踪​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: intelligent_lock_enter

Data:

ColumnNameTypeconstraintDescription
ai_lens_type检测镜头int0:可见光,1:红外,2:夜视默认 0
scene_type当前识别场景int0:通用默认传 0
target_type_list当前用户选择的检测类型列表,列表传空,表示当前识别场景下的所有支持检测类型进识别list<int>见下文“目标类型”定义可以传 NULL

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: intelligent_lock_enter

Data:

ColumnNameTypeconstraintDescription
result返回码int0成功 非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:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

选择锁定目标的信息​

锁定目标功能指飞行器将原地调整机身正对着该目标,该目标点将成为镜头视野的中心。

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: select_tracking_target

Data:

ColumnNameTypeconstraintDescription
camera_id镜头IDint0:可见光,1:红外锁定使用的镜头,缺省时沿用进入智能跟踪时的镜头
tracker_id检测目标IDint目标跟踪ID
start_x起始点x坐标double0~1目标框起始点X坐标
start_y起始点y坐标double0~1目标框起始点Y坐标
width目标框宽度double0~1为 0 表示点选
height目标框高度double0~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:

ColumnNameTypeconstraintDescription
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

ColumnNameTypeconstraintDescription
result关闭AI识别操作结果int0成功 非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:

ColumnNameTypeconstraintDescription
track_type跟踪方式int1:简单跟踪,3:盘旋跟踪必填
camera_id镜头IDint0:可见光,1:红外跟踪使用的镜头
tracker_id检测目标IDint目标跟踪ID
start_x起始点x坐标float0~1目标框起始点X坐标
start_y起始点y坐标float0~1目标框起始点Y坐标
width目标框宽度float0~1为 0 表示点选
height目标框高度float0~1为 0 表示点选
locked机头和云台的相对关系是否锁定boolfalse:仅云台转,机身不转, 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:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

目标锁定自动变焦​

锁定目标后自动调整变焦倍率使目标保持合适大小。开关状态通过飞机属性 active_zoom_control 上报。

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: active_zoom_control

Data:

ColumnNameTypeconstraintDescription
enable是否开启自动变焦int0:关闭,1:开启必填

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: active_zoom_control

Data:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

区域搜索​

飞机在指定多边形区域内按航线飞行并识别目标。

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: area_search

Data:

ColumnNameTypeconstraintDescription
target_point_list搜索区域顶点List<Object>至少 3 个点构成搜索多边形
target_type检测类型列表list<int>见下文“目标类型”定义可缺省
is_continue是否继续搜索int0:否,1:是默认 0
is_swing是否摆动搜索int0:否,1:是默认 0
flight_id任务IDstring可缺省
timeout_sec超时时间int单位:秒,默认 600

target_point_list

ColumnNameTypeconstraintDescription
latitude纬度double单位:度
longitude经度double单位:度
altitude高度double单位:米

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: area_search

Data:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

选择违停目标​

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: select_illegal_parking_target

Data:

ColumnNameTypeconstraintDescription
target_id目标车辆IDstring可缺省
start_x起始点x坐标float0~1目标框起始点X坐标
start_y起始点y坐标float0~1目标框起始点Y坐标
width目标框宽度float0~1,须大于 0必填,为 0 时请求失败
height目标框高度float0~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:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

AI布防设置​

设置安防识别的镜头、场景、目标类型与触发动作。

Topic: thing/product/{gateway_sn}/services

Direction: down

Method: AI_security_set

Data:

ColumnNameTypeconstraintDescription
enable是否启用安防识别bool兼容 1/0默认 false
ai_lens_type检测镜头int0:可见光,1:红外,2:夜视默认 0
scene_type识别场景int0:通用,1:安防,2:电网巡检默认 0
target_type_list检测类型列表list<int>见下文“目标类型”定义传空表示该场景下全部类型
action触发动作int0:录像并拍照,3:仅拍照默认 0
max_record_time最大录制时长int5~1800单位:秒,默认 60
state状态int1:开启默认 1
enable_func功能启用int1:启用默认 1
actions动作列表List<Object>透传字段,可缺省
propertys属性列表List<Object>透传字段,可缺省

Topic: thing/product/{gateway_sn}/services_reply

Direction: up

Method: AI_security_set

Data:

ColumnNameTypeconstraintDescription
result返回码int0成功 非0失败

Event

目标识别结果上报(已弃用)​

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: target_detect_result_report

Data:

ColumnNameTypeconstraintDescription
device_id设备IDint上报设备标识
timestamp时间戳long检测时间戳,单位:毫秒
image_url检测帧图片地址string检测帧图片地址
lens_id镜头IDint0:可见光,1:红外检测使用的镜头
objects检测目标数组List<Object>本次检测到的目标列表

Object

ColumnNameTypeconstraintDescription
type检测目标类型int见下文“目标类型”定义目标分类ID
confidence置信度float0~1检测置信度
x目标在屏幕中的X坐标float0~1占屏幕的比例
y目标在屏幕中的Y坐标float0~1占屏幕的比例
width目标框宽度float0~1占屏幕的比例
height目标框高度float0~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:

ColumnNameTypeconstraintDescription
even_id事件IDtext检测事件唯一标识
file_id文件IDtext
path文件的业务路径text
shooting_type拍摄动作类型int
ext文件扩展内容struct
»flight_id任务 IDtext
»waypoint_id航点 IDtext
»drone_model_key飞行器产品枚举值text
»payload_model_key负载产品枚举值text
»is_original是否为原图int0:否,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检测目标IDtext
»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:

任务进度

ColumnNameTypeconstraintDescription
task_id任务IDstring任务唯一标识
status任务状态int0:未开始 1:采集中 2:完成 3:失败
progress进度int0~100
photo_count已拍摄照片数int
required_count需拍摄照片数int
target_plate目标车牌string
error_msg错误信息string失败时出现

单车采集结果

ColumnNameTypeconstraintDescription
mission_name任务名称string
mission_id任务IDint
work_mode工作模式int
status采集状态int0:成功 非0:失败
failure_reason失败原因int
vehicle_id车辆IDint
pos车辆位置坐标List<int>
car_color车身颜色int
license_plate_color车牌颜色int车牌种类
vehicle_num车辆数量int
vehicle_brand车辆品牌int
is_driver_seat_occupied驾驶位是否有人int0:无 1:有
photo_path拍照路径列表List<string>

违停检测信息上报​

Topic: thing/product/{gateway_sn}/events

Direction: up

Method: ai_service_illegal_parking_info

Data:

ColumnNameTypeconstraintDescription
task_id任务IDtext违停检测任务标识
plate_number车牌号text
plate_color车牌颜色text
vehicle_type车辆类型text
vehicle_color车身颜色text
latitude纬度double车辆位置纬度
longitude经度double车辆位置经度
address地址text车辆位置地址
detect_time检测时间long检测时间戳,单位:毫秒
confidence置信度double0~1检测置信度
evidence_urls证据图片地址数组List<text>本次违停的证据图片地址列表