This is a fun project that powers a dashboard that shows which cuibcle is free to use and which is occupied. This was part of an internal hackathon arrange by PETRONAS in collaboration with AWS. The goal was to solve a personal problem using as much AWS services as posible that has absolutely no product value.
- Install a Camera in the toilet!
- Upload the RTSP stream to the AWS kinesis video stream using a local gateway.
- Take a snapshot every second from the video and upload it in s3
- For each image upload by kinesis trigger a lambda function to process the event using AWS Lambda's integration with S3 event.
- Use Amazon Recognition Service to detect if there is a person in the image(therefore in the video feed).
- Publish the result received from the Amazon Rekognition Service to Kafka(Amazon MSK Serverless)
- Aggregate all the events using Kafka Streams Library to calculate the latest status of toilet usage and push the status to the dashboard via API Gateway WebSocket API.
demo-2.mp4
You will find all the code in this repo with some commands. To see the kafka stream app, please visit https://github.com/mdnajimahmed/aLowLKStream/tree/main