Skip to main content

Rectif.ai

Project description

Rectif.ai

Making the world a better place one posture at a time.

Running the system

  • Create and activate a Virtual Environment (preferably Python 3.7)
  • Install dependencies using the requirements.txt file or with setup.py as pip install -e .
  • If you have git-lfs installed, models should be automatically downloaded. If it isn't (i.e the sizes aren't ~13MB:posenet and 296KB:posturenet), explicitly download the models from this drive link to data/raw/ folder.
  • Run python -m rectifai.predictors.demo_webcam to see the demo with realtime pose preview.
    or
    Run python -m rectifai.predictors.demo_webcam --no-preview to see the notifications only when you need to. :)

Inspiration

In today’s world, our work requires us to be sitting for a lot of the time. Failing to maintain good posture can thus, cause a variety of health problems related to our lungs, digestion, bones, and so on and so forth. Furthermore, bad posture habits are pretty common and it can be difficult breaking away from them without much deliberate effort.

What it does

The app helps develop good posture habits by making people mindful about their postures when they are in front of the screen.

How We built it

We used a Pytorch implementation of PoseNet to detect key-points. The points are then passed onto another network that classifies it into good or bad posture. Because of the unavailability of the posture(good/bad) dataset, We had to create our own data. By sitting in both good and bad postures and generating annotated keypoints co-ordinate dataset with pose estimation model, we were able to collect 150,000 different pose Coordinates. Details on the train-val-test splits is given below. The main benefit of this type of custom dataset is it's ease of data collection. Also because of it's simplicity any simple ML model can give good results with it unlike any expensive - image based dataset.

Datasets

  • MPII Human Pose Dataset

  • Custom Generated Posture Data (Each pose has 17 keypoint Coordinates for each Human landmarks/Joints)

    Dataset type # of pose (Keypoint Co-ordinates)
    Train 100,000
    Validation 30,000
    Test 20,000

Tools

  • Pytorch, Torchvision
  • Opencv
  • Numpy
  • TorchSummary

Challenges we ran into

  • No proper posture detection dataset anywhere, Really expensive to create image based dataset for it. so we tried a different domain problem and hacked it to work for our use case.
  • Infrastructure needed for best results. Didn't have good machines so used mobilenet for the posenet and Linear neuron networks for detection because of its speed and accuracy compared to size of models and infrastructure required.

What's next for Rectif.ai

  • Training on more data for more accurate results
  • Addition of feature to get analytics for posture over a period of time
  • Monitoring from different angles
  • Add temporal models for posture detection

Acknowledgements

  1. AllenNLP
  2. Posenet-Pytorch

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rectif-ai-0.1.tar.gz (25.2 kB view details)

Uploaded Source

File details

Details for the file rectif-ai-0.1.tar.gz.

File metadata

  • Download URL: rectif-ai-0.1.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.3

File hashes

Hashes for rectif-ai-0.1.tar.gz
Algorithm Hash digest
SHA256 07969fa2cc19a6e291a261976ce7ea537d83c7cd3c0f6acf559a907a66079eb2
MD5 9b5a7f66a2a31aee2ff254421a2b3f5d
BLAKE2b-256 e21bd5ab299eff98a02df03830f2c462958588f908840dda4334c619893715a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page