get versions of services
Luna-Request-Id | string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response. |
{- "api": 1,
- "major": 0,
- "minor": 0,
- "patch": 0
}
sources | string Example: sources=cam1,cam2 Comma-separated list of sources. Each event from result will contain one of the given sources. | ||||||||||
matching_candidates_labels | string Example: matching_candidates_labels=matching_label Matching candidates labels. Each event from result will contain one or more given labels. | ||||||||||
object_similarity__gte | number Example: object_similarity__gte=0.5 Similar object similarity lower included bound (boudary for top matching candidate). | ||||||||||
object_similarity__lt | number Example: object_similarity__lt=0.5 Top similar object similarity upper excluded bound (boudary for top matching candidate). | ||||||||||
age__lt | integer Example: age__lt=50 age upper excluded bound. | ||||||||||
age__gte | integer Example: age__gte=50 age lower included bound. | ||||||||||
gender | integer Enum: 0 1 Example: gender=1 Gender. 1 - male, 0 - female. | ||||||||||
ethnic_groups | string <list of integer (1, 2, 3, 4)> Example: ethnic_groups=1,2 comma-separated list of dominant ethnic group. Each event from result will contain one of the given ethnic groups.
| ||||||||||
tags | Array of strings (tag) >= 0 items Example: tags=tag_1,tag_2 A comma-separated list of tags. Each event from result will contain all of the given tags. Each tag can be at most 36 characters. | ||||||||||
cities | string Example: cities=moscow,New-York Comma-separated list of cities. Each event from result will contain one of the given cities in location. | ||||||||||
areas | string Example: areas=CAO,central park Comma-separated list of areas. Each event from result will contain one of the given areas in location. | ||||||||||
districts | string Example: districts=mitino,central park Comma-separated list of districts. Each event from result will contain one of the given districts in location. | ||||||||||
streets | string Example: streets=arbat,schepkina Comma-separated list of streets. Each event from result will contain one of the given streets in location. | ||||||||||
house_numbers | string Example: house_numbers=1,1/2str3 Comma-separated list of house numbers. Each event from result will contain one of the given house numbers in location. | ||||||||||
handler_ids | string <list of uuid.> Example: handler_ids=8950722f-3fd4-4223-b48f-03f95f0e8dfb,346a5645-ec89-4806-820a-dbcb6e0dc38 a list of comma-separated handler ids. |
Luna-Account-Id required | string <uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a account id. Specify an account id to be noticed about events in the account. |
Luna-Request-Id | string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response. |
from luna3.sender.wsclient import LunaWSClient senderAPI = LunaWSClient(origin="http://127.0.0.1:5080", api=2, accountId="8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a") # Note filtering by gender! with senderAPI.connect(gender=1) as ws: for _ in range(3): resp = ws.recv() print(resp)
{- "event": {
- "body_attributes": {
- "score": 0,
- "samples": [
- "a3e8716f-70dc-42ad-8428-7a552e800a37"
]
}, - "face_attributes": {
- "attribute_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "basic_attributes": {
- "age": 50,
- "gender": 0,
- "ethnicities": {
- "estimations": {
- "african_american": 1.92238889737406e-12,
- "asian": 0.954671621322632,
- "caucasian": 0.045328326523304,
- "indian": 7.65100649502415e-10
}, - "predominant_ethnicity": "asian"
}
}, - "score": 0,
- "url": "/0/attributes/24d405ce-bc56-4bf7-98e1-bdc962b4cf34",
- "samples": [
- "a3e8716f-70dc-42ad-8428-7a552e800a37"
]
}, - "source": "3rd Avenue",
- "user_data": "some event",
- "external_id": "external id",
- "tags": [
- "tag1",
- "tag2"
], - "location": {
- "city": "Moscow",
- "area": "CAO",
- "district": "mitino",
- "street": "schepkina",
- "house_number": "1/2str3",
- "geo_position": {
- "longitude": 36.616,
- "latitude": 55.752
}
}, - "face": {
- "external_id": "2xQ2gprbMUePw1s9gw9fvA==",
- "face_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
- "user_data": "fox1991",
- "url": "/2/faces/426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
- "lists": [
- "429b0e78-4616-426a-b57f-02baa72d638d",
- "6d037c33-31ec-4d73-b3b3-ec80b09446c2"
], - "event_id": "f9687459-986b-406d-9c1f-0d6289be5256"
}, - "event_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "url": "/0/events/24d405ce-bc56-4bf7-98e1-bdc962b4cf34",
- "matches": [
- {
- "label": "good guys",
- "candidates": [
- {
- "face": {
- "face_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c6",
- "external_id": "2xQ2gprbMUePw1s9gw9fvA==",
- "user_data": "fox1991",
- "create_time": "2018-08-11T09:11:41.674Z",
- "lists": [
- "429b0e78-4616-426a-b57f-02baa72d638d",
- "6d037c33-31ec-4d73-b3b3-ec80b09446c2"
], - "event_id": "f9687459-986b-406d-9c1f-0d6289be5256"
}, - "similarity": 0.5
}
]
}, - {
- "label": "bad guys",
- "candidates": [
- {
- "event": {
- "event_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7",
- "external_id": "2xQ2gprbMUePw1s9gw9fvA==",
- "user_data": "fox1991",
- "create_time": "2018-08-11T09:11:41.674Z",
- "handler_id": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7",
- "source": "426542d6-5509-4e5b-8a01-e2abd5c0a8c7"
}, - "similarity": 0.3
}
]
}
], - "detections": [
- {
- "filename": "penelope.jpeg",
- "samples": {
- "face": {
- "sample_id": "b668c4a5-2191-476e-a261-3b4f9ce2e25e",
- "detection": {
- "attributes": {
- "mouth_attributes": {
- "occluded": 0,
- "score": 0.999999165534973,
- "smile": 0
}, - "emotions": {
- "estimations": {
- "anger": 0.00894705578684807,
- "disgust": 0.00000965219624049496,
- "fear": 0.00121302821207792,
- "happiness": 0.00129503419157118,
- "neutral": 0.986027479171753,
- "sadness": 0.00187553185969591,
- "surprise": 0.000632198702078313
}, - "predominant_emotion": "neutral"
}, - "mask": {
- "estimations": {
- "medical_mask": 0.7108324766,
- "missing": 0.0700698048,
- "occluded": 0.2190976739
}, - "predominant_mask": "medical_mask"
}, - "head_pose": {
- "pitch": 18.6827487945557,
- "roll": -10.3542232513428,
- "yaw": 15.4102487564087
}, - "gaze": {
- "left_eye": {
- "pitch": 9.26744079589844,
- "yaw": -19.4657287597656
}, - "right_eye": {
- "pitch": 10.7074518203735,
- "yaw": -14.6733160018921
}
}
}, - "quality": {
- "light": 0.87,
- "dark": 0.13,
- "saturation": 0.93,
- "blurriness": 0.2
}, - "rect": {
- "height": 240,
- "width": 209,
- "x": 170,
- "y": 198
}, - "landmarks5": [ ],
- "landmarks68": [ ]
}, - "url": "/0/samples/a16c8b6c-2818-4bae-9fd5-65acc8d4bb5c"
}, - "body": {
- "sample_id": "557d54ec-29ad-4f3c-93b4-c9092ef12515",
- "detection": {
- "rect": {
- "height": 240,
- "width": 209,
- "x": 170,
- "y": 198
}
}, - "url": "/0/samples/a16c8b6c-2818-4bae-9fd5-65acc8d4bb5c"
}
}, - "detect_time": "2018-08-11T09:11:41.674Z",
- "image_origin": "/6/images/b668c4a5-2191-476e-a261-3b4f9ce2e25e"
}
], - "track_id": "useful_track_id_number_1"
}, - "handler_id": "string",
- "event-time": "2019-08-24T14:15:22Z",
- "Luna-Request-id": "1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a"
}
Get service OpenApi documentation. If Accept request header is of type application/x-yaml
,
returns documentation in yaml
format or returns html
documentation, if Accept-Type is text/html
Luna-Request-Id | string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response. |
Accept required | string (accept_docs_handler) Enum: "application/x-yaml" "text/html" acceptable type of receiving data |
{- "error_code": 12024,
- "detail": "Bad/incomplete input data",
- "desc": "Unsupported media type"
}
Get sphinx documentation - Development Manual. After the request you will be redirected to the page /docs/dev/index.html
Luna-Request-Id | string <timestamp,uuid> ^[0-9]{10},[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4... Example: 1536751345,8b8b5937-2e9c-4e8b-a7a7-5caf86621b5a external request id. Helps to uniquely identify messages that correspond to particular requests, in system logs. If it was not set, system will set it in default format ("timestamp,UUID"). It will be returned with response. |
{- "error_code": 1,
- "detail": "internal server error",
- "desc": "internal server error"
}