AIFacedetect - Event configuration incl. "unmasked" and "masked" faces

In this article we would like to describe how to configure event profiles in the camera to match our AIFacedetect App using the examples “Unmasked Face” and “Masked Face”.

The corresponding config section is “Setup Menu / Event Control / Event Overview / Message Events”

1) Auto-created generic event profile

2) Examples for custom event profiles / input for AIFacedetect App

2.1) Event / Alarm “Unmasked Face” detected

2.2) Event / Alarm “Masked Face” detected

3) Corresponding Meta Data Filter (for copy/paste)

Message Name:
AIFacedetect.face.type

JSON Filter Value “Masked Face”:
“1”

JSON Filter Value “Unmasked Face”:
“2”

NOTE: Correction - By using the command CameraIP/api/json/messages you can see the last sent message from the camera -

{
“AIFacedetect” :
{
“description” : “Face”,
“event_id” : 670,
“event_type” : “Face”,
“face” :
{
“height” : 0.1805555555555556,
“top_left_x” : 0.6109375,
“top_left_y” : 0.3222222222222222,
“type” : 2,
“width” : 0.075
},
“frame_timestamp” : 1620824351291101,
“gmtoff” : 10800,
“id_source” : “local”,
“mac_address” : “abc123”,
“message” : “Face”,
“sensor_id” : 1,
“sensor_name” : “Face sensor”,
“timestamp” : “1620824351”,
“timezone” : “CET”
}
}

In the example above, the screenshot shows the Filter value is “2” (with quotation marks) but, the value for AIFacedetect.face.type is 2 (without quotation marks). The Filter Value needs to be exactly as seen in the json message, in this case only 2 .