Send raw tracking data
Supported protocols:
- MQTT
- Data will be sent to MQTT topic
<default_mqtt_topic>
\
<raw data type>
. For example,events\body_tracking
Raw data specification
Body detection and tracking (body_tracking)
{
// information about videostream source
"stream_name":"rtsp://user:password@your/stream/path",
"stream_title":"your_title",
"stream_uuid":"3325d094-2e01-4199-931d-876200ed5b68",
"__positional_camera_index":0,
"camera_status":2,
"camera_status_msg":"CAMERA_OK",
"camera_type":"native",
// frame information
"timestamp_millisec":1720777422166,
"camera_frame_data": {
"frame_index":5457,
"timestamp_microsec":1720777422166462,
"timestamp_millisec":1720777422166
},
"image": {
"color_space":"BGR",
"dtype":"uint8_t",
"format":"NDARRAY",
"shape":[1080,1920,3]
},
"is_benchmark_frame":false,
// information on tracked objects in the frame
"objects":[
{
"bbox": [0.3569, 0.5603, 0.5064, 1.0],
"class":"body",
"confidence":0.6813,
"id":2,
"object_id":"4165cad2-49b6-40ce-a4f5-44eb363a4080"
}
]
}
Body loss (body_lost)
{
// information about videostream source
"stream_name":"rtsp://user:password@your/stream/path",
"stream_title":"your_title",
"stream_uuid":"3325d094-2e01-4199-931d-876200ed5b68",
"__positional_camera_index":0,
"camera_status":2,
"camera_status_msg":"CAMERA_OK",
"camera_type":"native",
// frame information
"timestamp_millisec":1720777422166,
"camera_frame_data": {
"frame_index":5457,
"timestamp_microsec":1720777422166462,
"timestamp_millisec":1720777422166
},
"image": {
"color_space":"BGR",
"dtype":"uint8_t",
"format":"NDARRAY",
"shape":[1080,1920,3]
},
"is_benchmark_frame":false,
// information on lost objects
"objects":[
{
"class":"body",
"id":9,
"object_id":"1299150a-3927-4474-8ffb-fde7b36a5eb1"
}
]
}
Face detection and tracking (face_tracking)
{
// information about videostream source
"stream_name":"rtsp://user:password@your/stream/path",
"stream_title":"your_title",
"stream_uuid":"3325d094-2e01-4199-931d-876200ed5b68",
// frame information
"timestamp_millisec":1720777422166,
"camera_frame_data": {
"frame_index":5457,
"timestamp_millisec":1720777422166
},
"image": {
"color_space":"BGR",
"dtype":"uint8_t",
"format":"NDARRAY",
"shape":[1080,1920,3]
},
"is_benchmark_frame":false,
// information on tracked objects in the frame
"objects":[
{
"__full_frame_bbox":[0.5796875,0.436111,0.615625,0.511111],
"__index":0,
"angles":{
"pitch":-56.2355,
"roll":4.3686,
"yaw":36.3418
},
"bbox":[0.5796875,0.436111,0.615625,0.511111],
"class":"face",
"confidence":1.0,
"detection_meta": {
"confirmed":1,
"good_face_size":1,
"good_light_and_blur":-1
},
"id":16175631120106950574,
"is_weak":true,
"quality":-1292.4166,
"visibility_score":0.9879
}
]
}
Face loss (face_lost)
{
// information about videostream source
"stream_name":"rtsp://user:password@your/stream/path",
"stream_title":"your_title",
"stream_uuid":"3325d094-2e01-4199-931d-876200ed5b68",
// frame information
"timestamp_millisec":1720779397441,
"camera_frame_data": {
"frame_index":64664,
"timestamp_millisec":1720779397441
},
"image": {
"color_space":"BGR",
"dtype":"uint8_t",
"format":"NDARRAY",
"shape":[1080,1920,3]
},
"is_benchmark_frame":false,
// information on lost objects
"hashed_face_id":12542825825967542253,
"objects":[
{
"__full_frame_bbox":[0.9140625,0.5453703,0.9401041,0.58518518],
"angles":{
"pitch":-12.0049,
"roll":84.8848,
"yaw":27.7249
},
"bbox":[0.9140625,0.5453703,0.9401041,0.58518518],
"class":"face",
"confidence":1.0,
"id":12542825825967542253,
"quality":-1480.1163,
"visibility_score":0.8565
}
]
}
Setting up MQTT sending
- Set up sending processes via MQTT as described in Processes and Events.
- In the config/run_params.json file, in the
mqtt_settings
object, add theenable_task_types
array listing the desired raw data types.
The following types are available:
- body_tracking - body detecting and tracking;
- body_lost - losing a previously tracked body;
- face_tracking - face detecting and tracking;
- face_lost - losing a previously tracked face.
Example configuration for sending face_tracking and face_lost
:
"mqtt_settings": {
"enable_task_types": [
"face_tracking", "face_lost"
],
// other fields
}