System to automatically track the number of people inside a closed space. Optionally also detect (missing) masks.
- The REST API is located at
http://127.0.0.1:9000/api/xxx
{
"current_customer_count": 10,
"maximal_customer_count": 50
}
{
"success": true,
"new_maximal_customer_count": 11
}
Override the customers inside, will also trigger the websocket broadcast.
{
"success": true,
"new_customer_count": 0
}
[image stream, use as value for src attribute of img tag, NOT video!]
<img src="/api/video_stream" />
[jpg image of the camera without any annotations, used as the background for the barrier selection]
<img src="/api/camera_image" />
{
"p1_x": 0,
"p1_y": 1,
"p2_x": 1,
"p2_y": 1,
"side_switched": false
}
{
"success": true,
"p1_x": 0,
"p1_y": 1,
"p2_x": 1,
"p2_y": 1,
"side_switched": false
}
Check if mask detection is enabled.
{
"enabled": true
}
Enable/Disable mask detection.
{
"success": true,
"enabled": true
}
Amount of time users spent inside (in seconds).
{
"average": 749.0221,
"history": [
123.1023,
923.9201,
...
]
}
- The websocket can be accessed via
ws://127.0.0.1:9001
The websocket does not require any special initialization, it will simply broadcast all messages to any connected client.
Types of messages:
{
"message_type": "customer_count_change",
"content": {
"current_customer_count": 11,
"maximal_customer_count": 50
}
}
Notify the frontend that a missing mask was detected so a reminder can be displayed for a short moment.
{
"message_type": "missing_mask_detected",
"content": {}
}