Application used to aid computer users to maintain good posture.
It uses live camera feed to check if the position of your head is within the defined boundary. If your head is outside the boundary, then warning sound is played. The sound is stopped only after your head is brought inside the boundary.
-
Launch the application. You should be able to see the live camera feed.
-
Sit upright and position you head in proper posture. Press the Start button to start the monitoring function.
-
On pressing the Start button, the boundary position set to the boundary position at that instant. Now, the boundary stops moving.
-
If your head moves outside the boundary, warning sound is played and it won't stop until you bring your head within the boundary.
-
Height and width of the boundary can be increased/decreased in the Settings menu.
-
The monitoring can be stopped by pressing the Stop option.
- python3.8
- tkinter
- numpy
- opencv
- pytorch
- Live webcam feed is taken and passes through PoseNet model. More information can be obtained here.
- Posenet model returns the coordinates of eyes, nose and ears.
- These coordinates are are used to get the position of the face and establish boundaries for correct posture.
- If the head moves out of the established boundary an alarm sound is played until the head is brought back within the boundary.
- The size of the boundary can be adjusted in the settings menu.
-
Create a python virtual environment and activate it.
python3 -m venv env
source env/bin/activate
-
Install tkinter if not yet installed.
-
Clone the repository and navigate inside
posture-aid
folder. -
Install required python packages.
pip3 install -r requirements.txt
-
Launch the application
python3 app.py
-
The original PoseNet model, weights, code, etc. was created by Google and can be found at posenet.
-
The port of model was created by Ross Wightman (@rwightman) is in no way related to Google and it can be found at posenet-pytorch.
-
The PostureAid application was created by myself and Sampan S Nayak (@saoalo) using the port of PoseNet model by Ross Wightman (@rwightman) present at posenet-pytorch.
All contributions are welcome.