Download OpenAPI specification:Download
Luna Human Tracking Analytic is intended for tracking people faces and/or bodies on a video with subsequent
dispatch of tracking results to a luna-handlers handler for event generation according to the handler policies.
The human tracking analytic decodes stream frames (every frame by default) taking into account rate parameter
from analytic parameters and performs the following
actions:
Tracks faces and/or bodies (depending on the tracking.detector_type) and performs estimations according to
the targets from analytic parameters.
Collects face and body samples which satisfy the face_samples and body_samples filters.
Generates events according to the event_policy and sends them to the handler specified by handler_id.
The handler uses raw images (raw_images) with detections or face/body warps (samples) as sources for
event generation. Note that proper targets must be set to provide the handler with the selected source type,
otherwise there will be no data to send and events won't be generated.
For each callback executes it with the generated event.
The schema of data sending by callback
described at callback schema.
In addition, tracking results can be received by subscription to web sockets.
Analytic parameters schema and example. Applicable to use as analytics.parameters of create stream
request in Luna-Video-Manager
| targets | Array of strings non-empty unique Default: ["face_detection"] Items Enum: "overview" "face_detection" "landmarks5" "head_pose" "ags" "warp_quality" "emotions" "mask" "glasses" "eyes" "gaze" "mouth" "aggregated_liveness" "aggregated_deepfake" "aggregated_face_samples" "aggregated_face_thumbnail" "aggregated_face_basic_attributes" "aggregated_face_descriptor" "body_detection" "aggregated_body_samples" "aggregated_body_thumbnail" "aggregated_body_attributes" "aggregated_body_descriptor" Estimations to perform on the video. Face targets ( Body targets (
|
Array of objects <= 10 items Callbacks parameters. | |
object Estimation parameters. |
{- "targets": [
- "face_detection"
], - "callbacks": [
- {
- "type": "string"
}
], - "parameters": {
- "handler_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "source_type": "raw_images",
- "tracking": {
- "tracker_type": "face-tracker",
- "detector_type": "face",
- "body_reid": 0
}, - "face_samples": {
- "count": 1,
- "filters": {
- "droi": null,
- "score": 0.6,
- "head_pitch": 15,
- "head_roll": 15,
- "head_yaw": 15
}
}, - "body_samples": {
- "count": 1,
- "filters": {
- "droi": null,
- "score": 0.3
}
}, - "event_policy": {
- "trigger": "period",
- "interval": 1
}, - "image_retain_policy": {
- "mimetype": "PNG",
- "quality": 1,
- "max_size": 640
}, - "roi": {
- "x": 3327,
- "y": 3327,
- "width": 3327,
- "height": 3327,
- "mode": "abs"
}, - "rate": {
- "period": 1,
- "unit": "frame"
}, - "probe_count": 3
}
}Callback request schema and example.
| account_id | string Account id of event. |
| event_create_time | string Event creation time. |
| event_end_time | string Event end time. |
| event_type required | string Value: "human_tracking" Event type. |
required | object Event generated by the |
{- "account_id": "string",
- "event_create_time": "string",
- "event_end_time": "string",
- "event_type": "human_tracking",
- "event": {
- "stream_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "location": {
- "city": "St. Louis",
- "area": "Central",
- "district": "Downtown",
- "street": "Washington Avenue",
- "house_number": "100 bldg.1",
- "geo_position": {
- "longitude": -90.185,
- "latitude": 38.624
}
}, - "source": "string",
- "meta": { },
- "source_group": "string"
}
}| stream_id required | any Stream ID for events you need to subscribe to. |
| account_id | any Account id of stream owner. |
import asyncio import websockets async def main(): uri = "ws://127.0.0.1:5240/1/ws?stream_id=70c75b04-1ec8-4aa1-930c-ddad9e47b54b" # Note filtering by gender! async with websockets.connect(uri) as websocket: while True: data = await websocket.recv() print(data) asyncio.run(main())
{- "stream_status": "in_progress",
- "error": "decoding error",
- "analytics_results": {
- "human_tracking": {
- "track_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "event_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "event_status": "started",
- "track_status": "started",
- "estimated": {
- "face": {
- "detection": {
- "bbox": {
- "x": 170,
- "y": 198,
- "width": 209,
- "height": 240
}, - "score": 0
}, - "landmarks5": [
- [
- 23,
- 72
], - [
- 82,
- 71
], - [
- 42,
- 114
], - [
- 29,
- 140
], - [
- 79,
- 138
]
], - "head_pose": {
- "yaw": 0,
- "pitch": 0,
- "roll": 0
}, - "ags": 0,
- "warp_quality": { },
- "emotions": { },
- "mask": { },
- "glasses": { },
- "eyes": { },
- "gaze": { },
- "mouth": { }
}, - "body": {
- "detection": {
- "bbox": {
- "x": 170,
- "y": 198,
- "width": 209,
- "height": 240
}, - "score": 0
}
}
}
}
}
}