GithubHelp home page GithubHelp logo

ba1ry / posture-aid Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 18.38 MB

Application used to aid computer users to maintain good posture using feed from webcam and alert the user when they are slouching.

License: Apache License 2.0

Python 100.00%
python3 opencv opencv-python tkinter posture posture-monitor posture-correcter pytorch posenet

posture-aid's Introduction

PostureAid

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.

Instructions for use

  1. Launch the application. You should be able to see the live camera feed.

  2. Sit upright and position you head in proper posture. Press the Start button to start the monitoring function.

  3. On pressing the Start button, the boundary position set to the boundary position at that instant. Now, the boundary stops moving.

  4. If your head moves outside the boundary, warning sound is played and it won't stop until you bring your head within the boundary.

  5. Height and width of the boundary can be increased/decreased in the Settings menu.

  6. The monitoring can be stopped by pressing the Stop option.

Video Demo

PostureAid Demo

Tech Stack

  • python3.8
  • tkinter
  • numpy
  • opencv
  • pytorch

Working

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

Setting up locally

  1. Create a python virtual environment and activate it.

    python3 -m venv env

    source env/bin/activate

  2. Install tkinter if not yet installed.

  3. Clone the repository and navigate inside posture-aid folder.

  4. Install required python packages.

    pip3 install -r requirements.txt

  5. Launch the application

    python3 app.py

Credits

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

Contributing

All contributions are welcome.

posture-aid's People

Contributors

shashank-bairy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.