Wrote a Python Script to detect bad posture using OpenCV and Mediapipe. I used the Mediapipe Pose model to detect the human body and reliably assign landmarks to the body parts. The script detects bad posture by checking the angle between the shoulders, hips, and neck.
I used a Raspberry Pi Micro 2 along with a Camera Module to capture footage of the user. I then streamed the camera footage to my laptop using TCP - the Python script takes in this stream and then processes it.