Hello, I have set up Kinesis Video - Kinesis Data Streams with Rekognition so that a face that is shown in front of my webcam is compared to a picture that I have uploaded into S3.
I can see from the "data preview" within a record in Kinesis data streams that a face is recognized as desired, but I would like to make it so that if a certain face is detected (via faceID), an alert is sent via SNS regarding the payload of the record that is shown in Kinesis data streams.
I believe that this can be done via Eventbridge pipes but I am not sure how to get the correct filter set up.
I would like to set it up so that when a record is found with the FaceID as shown below, then send an email via SNS with the record below:
{
"InputInformation": {
"KinesisVideo": {
"StreamArn": "arn:aws:kinesisvideo:us-east-1:237434669218:stream/kaldi/1695283330882",
"FragmentNumber": "91343852333181620708120838749119373902959965155",
"ServerTimestamp": 1695613363.46,
"ProducerTimestamp": 1695613358.782,
"FrameOffsetInSeconds": 0.9739999771118164
}
},
"StreamProcessorInformation": {
"Status": "RUNNING"
},
"FaceSearchResponse": [
{
"DetectedFace": {
"BoundingBox": {
"Height": 0.24642423,
"Width": 0.15441418,
"Left": 0.4637209,
"Top": 0.3429617
},
"Confidence": 99.99462,
"Landmarks": [
{
"X": 0.5266707,
"Y": 0.44316232,
"Type": "eyeLeft"
},
{
"X": 0.58807695,
"Y": 0.43760425,
"Type": "eyeRight"
},
{
"X": 0.53079176,
"Y": 0.5369772,
"Type": "mouthLeft"
},
{
"X": 0.582353,
"Y": 0.53203446,
"Type": "mouthRight"
},
{
"X": 0.5700108,
"Y": 0.50527626,
"Type": "nose"
}
],
"Pose": {
"Pitch": -24.09738,
"Roll": -4.106561,
"Yaw": 16.596313
},
"Quality": {
"Brightness": 78.15648,
"Sharpness": 20.92731
}
},
"MatchedFaces": [
{
"Similarity": 99.984825,
"Face": {
"BoundingBox": {
"Height": 0.445171,
"Width": 0.419821,
"Left": 0.308388,
"Top": 0.16587
},
"FaceId": "5dbbfa77-98a4-4932-ac91-c0fad800e0c6",
"Confidence": 99.9999,
"ImageId": "fbf8786d-917c-3b9a-aa9c-2b43537d6446"
}
}
]
}
]
}
Hey thank you for responding! I was able to look at that guide and actually get it working but lambda function is not what I thought it would be. If I stay in the frame for like a few minutes it keeps sending me an email continuously and says that it detected 100 matching faces. I guess this is something that I need to look into.
Thank you
I am glad that it worked for you! Regarding the email spam issue, you can modify the logic to detect unique faces within a given timeframe, and avoid sending multiple notifications.