Visionaire Documentation
ENG
Search
⌃K
Comment on page

APIs

POSTMAN

Click the link below to access Postman Collection

STREAMS

Streams is a video channel from an RTSP link or a video directory inside docker volume. Each stream has a unique id used to assign analytics.

GET - List of All Streams in All Nodes

Request
Respond
GET /streams HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"stream_number": 1,
"streams": [
{
"active": false,
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": -28820325.098328322,
"stream_longitude": -62037672.49939318,
"stream_name": "camera 1",
"stream_node_num": 0
},
{
"active": true,
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": 11794186.693521708,
"stream_longitude": 85811803.1103701,
"stream_name": "camera 1",
"stream_node_num": 0
}
]
}

GET - Get All Streams in a Node

Request
Response
GET /streams/{node_number} HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"stream_number": 1,
"streams": [
{
"active": true,
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": -28820325.098328322,
"stream_longitude": -62037672.49939318,
"stream_name": "camera 1",
"stream_node_num": 0
},
{
"active": false,
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": 11794186.693521708,
"stream_longitude": 85811803.1103701,
"stream_name": "camera 1",
"stream_node_num": 0
}
]
}

GET - Get Stream Detail

Request
Active Stream
Disabled Stream
GET /streams/{node_number}/{stream_id} HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": -6.261376228442297,
"stream_longitude": 106.82364878415257,
"stream_name": "camera 1",
"stream_node_num": 0,
"pipelines": [
"NFV4-FR",
"NFV4-FR"
],
"seats": [
{
"analytic_id": "NFV4-FR",
"serial_number": "NFV4-FR6K-XXXX-YYYY"
},
{
"analytic_id": "NFV4-FR",
"serial_number": "NFV4-FR6K-XXXX-YYYY"
}
],
"status": {
"pipelines": [
{
"active": true,
"analytic_id": "NFV4-VC",
"message": "Running",
"restart_num": 0,
"state": "RUNNING"
}
],
"services": []
},
"stream_stats": {
"fps": 30,
"frame_height": 720,
"frame_width": 1280,
"last_error_msg": "Stream is running..",
"state": "RUNNING"
}
}
{
"stream_address": "/workspaces/visionaire4/face_video.mp4",
"stream_custom_data": {},
"stream_id": "5136c6c0916cd30c",
"stream_latitude": -6.261376228442297,
"stream_longitude": 106.82364878415257,
"stream_name": "camera 1",
"stream_node_num": 0,
"pipelines": [
"NFV4-FR",
"NFV4-FR"
],
"seats": [
{
"analytic_id": "NFV4-FR",
"serial_number": "NFV4-FR6K-XXXX-YYYY"
},
{
"analytic_id": "NFV4-FR",
"serial_number": "NFV4-FR6K-XXXX-YYYY"
}
],
"status": {
"pipelines": [
{
"active": false,
"analytic_id": "NFV4-VC",
"message": "Pipeline is disabled",
"restart_num": 0,
"state": "DISABLED"
},
...
],
"services": []
},
"stream_stats": {
"fps": -1,
"frame_height": -1,
"frame_width": -1,
"last_error_msg": "Stream is disabled",
"state": "DISABLED"
}
}

POST - Create a Stream in a Node

Request
Response
POST /streams/{node_number} HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 101
​
{
"stream_address": "rtsp://10.7.2.50:554/VOD/command.mp4",
"stream_name": "command center",
"active": true
}
{
"code": 200,
"active": true,
"message": "stream successfully created",
"node_num": 0,
"stream_address": "rtsp://10.7.2.50:554/VOD/command.mp4",
"stream_id": "5136c6c0916cd30c",
"stream_name": "command center"
}

PUT - Update Stream in One Node

Request
Response
PUT /streams/{node_number}/{stream_id} HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 218
​
{
"stream_address": "rtsp://10.7.2.50:554/VOD/command.mp4",
"stream_name": "command center",
"stream_latitude": -6.261376228442297,
"stream_longitude": 106.82364878415257,
"stream_custom_data": {},
"active": true / false,
}
{
"code": 200,
"message": "stream successfully updated",
"node_num": 0,
"stream_address": "rtsp://10.7.2.50:554/VOD/command.mp4",
"stream_id": "5136c6c0916cd30c",
"stream_name": "command center"
}

DELETE - Delete Stream in a Node

Request
Response
DELETE /streams/{node_number}/{stream_id} HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"code": 200,
"message": "stream successfully deleted",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

PIPELINE

Pipeline is a process where we assign specific analytic(s) to a stream.

Analytic Codification

Analytic
Code
Face Recognition
NFV4-FR
License Plate Recognition (Deprecated)
NFV4-LPR
License Plate Recognition
NFV4-LPR2
License Plate Recognition Special Case (APH)
NFV4-LPRS
People Counting
NFV4-PC
Vehicle Counting
NFV4-VC
Crowd Estimation
NFV4-CE
Crowd Estimation Low Density
NFV4-CELD
Vehicle Dwelling
NFV4-VD
PPE Detection
NFV4-PPE

POST - Create a Face Recognition Pipeline

Request
Response
POST /pipeline/{node_number}/{stream_id}/NFV4-FR HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 70
​
{
"areas": [
{
"name": "Blacklist Area 1",
"points": [
{
"x": 0.0,
"y": 0.5
},
{
"x": 1.0,
"y": 0.5
}
],
}
],
"dumping_interval": 0,
"dumping_confidence_threshold" : 0.0,
"fr_primary_threshold": 0.4,
"fr_secondary_threshold": 0.4,
"sampling_time_ms": 50,
"frontal_only": true,
"matching_iou_threshold": 0.7
"bbox_filter_active": true,
"bbox_filter_threshold": 3.0
}
Key
Description
dumping_interval
minimum time interval for dumping, increasing this value reduces dumping intensity.
dumping_confidence_threshold
minimum threshold for dumping a certain identity, increasing the value will improve precision but reduce sensitivity.
fr_primary_threshold
Primary face detection threshold. You can customize for your own need.
fr_secondary_threshold
Secondary face detection threshold. You can customize for your own need.
sampling_time_ms
time interval for passing detected faces in primary to secondary face detector, parameter for face sampling, decreasing this value will increase intensity in secondary model
frontal_only
passing the frontal only face to secondary face detector and FR, turn off improve sensitivity on non-frontal cameras/views but may reduce accuracy during performing FR.
matching_iou_threshold
minimum value of intersection between primary and secondary to be defined as true detection, reducing IOU may improve sensitivity.
bbox_filter_active
flag for either activating or deactivating face filtering based on bbox, set to True activates the filter
bbox_filter_threshold
minimum threshold for categorizing an object as outlier based on z-score, set to 3.0 means any bbox/object with z-score > 3.0 detected as outlier or excluding from detections.
areas
Unique blacklist area per frame. You can draw more than one line.
points
Blacklist line points.
{
"analytic_id": "NFV4-FR",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - Create Vehicle Counting and People Counting Pipeline

Request
Response
POST /pipeline/{node_number}/{stream_id}/NFV4-VC HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 219
​
{
"areas": [
{
"name": "Area 1",
"points": [
{
"x": 0.0,
"y": 0.5
},
{
"x": 1.0,
"y": 0.5
}
],
"bidirection": true,
"in": true
}
],
"object_confidence_threshold" : 0.7
}
Key
Type
Description
points
Array of object
Counting line points.
areas
Array of object
Unique line per frame. You can draw more than one line.
name
String
Name of the counter line
bidirection
Binary
IF set to true THEN line will care about IN or OUT direction.
IF set to false THEN line will count both direction as IN.
in
Binary
If true THEN the L-rules apply.
If false, THEN the L-rules must be inverted top to bottom.
object_confidence_threshold
Float
New parameter for counting analytics family (VC/VC-HW/LPR/PC/PD/VAS) that control the dump information and visualisation based on object detection confidence
{
"analytic_id": "NFV4-VC",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - Create Head Counting Pipeline

Request
Response
POST http://127.0.0.1:4004/pipeline/0/04d66cbdb871ae10/NFV4-HC HTTP/1.1
Content-Type: application/json
​
{
"score_threshold": 0.5,
"areas": [
{
"name": "Area 1",
"points": [
{
"x": 0.0,
"y": 0.5
},
{
"x": 1.0,
"y": 0.5
}
],
"bidirection": true,
"in": true
}
],
"object_confidence_threshold" : 0.7
}
Key
Type
Description
areas
Array of object
Unique line per frame. You can draw more than one line.
points
Array of object
Counting line points.
bidirection
Boolean
IF set to true THEN line will care about IN or OUT direction. IF set to false THEN line will count both direction as IN.
in
Boolean
If true THEN the L-rules apply. If false, THEN the L-rules must be inverted top to bottom.
object_confidence_threshold
Float
Parameter for counting analytics family that control the dump information and visualisation based on object detection confidence
{
"analytic_id": "NFV4-HC",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - Create Crowd Estimation Pipeline

Request
Response
POST /pipeline/{node_number}/{stream_id}/NFV4-CE HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 143
​
{
"areas": [
{
"name": "Area 1",
"points": [
{
"x": 0.05,
"y": 0.05
},
{
"x": 0.05,
"y": 0.95
},
{
"x": 0.48,
"y": 0.95
},
{
"x": 0.48,
"y": 0.05
}
]
}
],
"interval": 10
}
Key
Type
Description
areas
Array of object
Drawn area in frame to estimate crowd.
name
String
Name of the area.
points
Array of object
The coordinate of all points of the area.
x & y
Float
The coordinate of each point of the area.
interval
Integer
Dumping interval (second)
{
"analytic_id": "NFV4-CE",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - Create Water Level Monitoring Pipeline

Response
Request
POST /pipeline/{node_number}/{stream_id}/NFV4-WLM HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 733
​
{
"areas": [
{
"value": 900,
"points": [
{
"x": 0.27075520833333333,
"y": 0.1832950367647059
},
{
"x": 0.5707552083333334,
"y": 0.1856479779411765
}
]
},
{
"value": 600,
"points": [
{
"x": 0.27075520833333333,
"y": 0.6832950367647059
},
{
"x": 0.5707552083333334,
"y": 0.6856479779411765
}
]
}
],
"interval": 10,
"level": 5,
"predict_interval": 5
}
Key
Type
Description
areas
Array of object
Drawn the area in a frame to estimate the level of water.
value
Integer
The first value is the top level in real condition.
The second value is the bottom level in real condition. Calculated in centimeters.
points
Array of object
The points of the line.
interval
Integer
Interval of data dumping
level
Integer
Number of level to separate top value and bottom value equally.
predict_interval
Integer
Inference Sampling time (default 5 seconds)
{
"analytic_id": "NFV4-WLM",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - Vehicle Dwelling

Request
Response
POST /pipeline/{node_number}/{stream_id}/NFV4-VD HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 70
{
"areas": [
{
"name": "Area 0",
"points": [
{"x": 0.0, "y": 0.0},
{"x": 1.0, "y": 0.0},
{"x": 1.0, "y": 1.0},
{"x": 0.0, "y": 1.0}
]
}
],
"score_threshold": 0.3
}
{
"analytic_id": "NFV4-VD",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "1909ed2165133534"
}

POST - PPE

Request
Response
POST /pipeline/{node_number}/{stream_id}/NFV4-PPE HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
Content-Length: 70
​
{
"helmet_iou_threshold": 0.85,
"vest_iou_threshold" : 0.85,
"interval_ms" : 5,
"minimal_count" : 10,
"person_score_threshold": 0.6
}
Key
Type
Description
helmet_iou_threshold
float
IoU threshold for helmet detection
vest_iou_threshold
float
IoU threshold for vest detection
interval_ms
integer
interval for data dumping
minimal_count
integer
minimum id detected before dump. Please tune this parameter to avoid False Positive
person_score_threshold
float
Confidence threshold for person detection
{
"analytic_id": "NFV4-PPE",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

POST - General Object Counting

Request
Second Tab
### Create pipeline GOC
POST http://127.0.0.1:4004/pipeline/0/b0ee056b6a444e70/NFV4-GOC HTTP/1.1
Content-Type: application/json
​
{
"score_threshold": 0.5,
"class_map": {
"truck": "truck",
"train": "truck"
}
"areas": [
{
"name": "Area 1",
"points": [
{
"x": 0.0,
"y": 0.5
},
{
"x": 1.0,
"y": 0.5
}
],
"bidirection": true,
"in": true
}
],
"object_confidence_threshold" : 0.3
}
Key
Type
Description
score_threshold
Float
IoU threshold
class_map
Dictionary
Mapper for Listed Class
object_confidence_threshold
Float
Confidence threshold for Object detection
{
"analytic_id": "NFV4-GOC",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "5b0ee056b6a444e70"
}

POST - LPR2

Request
Response
POST http://127.0.0.1:4004/pipeline/0/d575b1759d4639b1/NFV4-LPR2 HTTP/1.1
Content-Type: application/json
{
"similarity_score_threshold": 0.7,
"no_input_period_threshold": 20,
"min_group_member": 2,
"max_group_member": 20,
"plate_cache_lifetime" : 5,
"plate_confidence_threshold" : 0.7,
"vehicle_confidence_threshold" : 0.7,
"roi_as_blacklist" : false,
"areas": [
{
"name": "kiri",
"points": [
{"x": 0.05, "y": 0.05},
{"x": 0.05, "y": 0.95},
{"x": 0.48, "y": 0.95},
{"x": 0.48, "y": 0.05}
]
}
]
}
Key
Type
Description
similarity_score_threshold
Float
IoU threshold
no_input_period_threshold
Integer
Time to detect plate
min_group_member
Integer
Candidates for correct plates (min)
max_group_member
Integer
Candidates for correct plate (max)
plate_cache_lifetime
Integer
Time required for plate to be detected
plate_confidence_threshold
Float
Confidence threshold for plate detection
vehicle_confidence_threshold
Float
Confidence threshold for Vehicle detection
roi_as_blacklist
Boolean
If false the ROI become Whitelist
areas
Dictionary
ROI area description
bbox_offset
Float
Configurable image offset from bounding box to enlarge the image dumping (default 0.1)
{
"analytic_id": "NFV4-LPR2",
"code": 200,
"message": "pipeline successfully created",
"node_num": 0,
"stream_id": "d575b1759d4639b1"
}

DELETE - Delete a Pipeline

Request
Response
DELETE /pipeline/{node_number}/{stream_id}/NFV4-FR HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"analytic_id": "NFV4-FR",
"code": 200,
"message": "pipeline successfully deleted",
"node_num": 0,
"stream_id": "5136c6c0916cd30c"
}

ANALYTIC LIST

GET - Analytic List

Request
Response
GET /analytic_list HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"code": 200,
"message": "success",
"analytic_num": 2,
"deployment_key": "xxxx-xxxxx-xxxxx-xxxxx",
"version": {
"major": 4,
"minor": 11,
"patch": 1
},
"analytics": [
{
"id": "NFV4-FR",
"name": "Face Recognition",
"major_version": 1,
"minor_version": 2,
"publisher": "Nodeflux",
"description": "Realtime face detection and face recognition",
"type": "full_frame",
"seats": [
{
"active_status": true,
"serial_number": "NFV4-FR12-XXXX-XXXX"
},
{
"active_status": false,
"serial_number": "NFV4-FR12-YYYY-YYYY"
},
{
"active_status": true,
"serial_number": "NFV4-FR12-ZZZZ-ZZZZ"
}
]
},
{
"id": "NFV4-FR",
"name": "Face Recognition",
"major_version": 1,
"minor_version": 2,
"publisher": "Nodeflux",
"description": "Realtime face detection and face recognition",
"type": "full_frame",
"seats": [
{
"active_status": true,
"serial_number": "NFV4-FR12-XXXX-XXXX"
},
{
"active_status": false,
"serial_number": "NFV4-FR12-YYYY-YYYY"
},
{
"active_status": true,
"serial_number": "NFV4-FR12-ZZZZ-ZZZZ"
}
]
}
]
}

RESOURCE STATISTICS

GET - Resource Statistics

Request
Response
GET /resource_stats HTTP/1.1
Host: {ip}:{port}
Access-Control-Allow-Origin: *
{
"devices": [
{
"node_num": 0,
"data": {
"cpu_percent": 12.439340591430664,
"ram_percent": 27.455795288085938,
"swap_memory_percent": 0,
"gpus": [
{
"gpu_id": 0,
"gpu_memory_free": 2530672640,
"gpu_memory_total": 7981694976,
"gpu_memory_used": 5451022336,
"gpu_name": "Tesla P4",
"gpu_temperature": 84,
"gpu_utilization": 100,
"services": [
{
"service_name": "visionaire::face_extraction",
"service_number": 1
},
{
"service_name": "visionaire::face_object_detection<visionaire::primary_face_detection>",
"service_number": 2
},
{
"service_name": "visionaire::face_object_detection<visionaire::secondary_face_detection>",
"service_number": 1
},
{
"service_name": "visionaire::object_detection<visionaire::people_detection>",
"service_number": 2