Skip to content

Detect toilet occupancy in real time by processing camera feed

Notifications You must be signed in to change notification settings

mdnajimahmed/ToiletCubicleSystems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem Statement

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.

Solution

  • 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.

Architecture

image

Operation

image

Demo

demo-2.mp4

Code

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

Suggested reading

About

Detect toilet occupancy in real time by processing camera feed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published