Skip to content

naik-amey/PostureDetJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is javascript based browser application with uses p5.js and ml5js to detect the posture and analyze. This could be used for ergonomic assessment.

System Requirements

This code can be downloaded locally and can run on any browser like safari or chrome.
Alternatively, you can launch this here.

System

Inputs : Webcam input
Outputs : Detects if posture is incorrect, alerts you with a buzz and provides ergonomic stats.

Details

System takes webcam input, uses posenet model to determine eyes and nose. The co-ordinates of eyes, nose and triangular area formed with these is fed to a neural network to train and classify the posture.

The idea behind using triangle area is to comprehend depth (distance between plane formed with face and the camera).

How to Use:

  1. Once the page is opened, click on "start" button. At this point you should be able to see yourself with markers around eyes and nose.
  2. (Training) Press "SPACE BAR" everytime you are in a ergonomically correct posture, you can turn your head sideways etc. Collect atleast 10 samples for better training.
  3. (Training) Press "down arrow key" everytime you are in a ergonomically wrong posture, you can hunch or take any other wrong posture. Collect atleast 10 samples for better training.
  • You can repeat step 2 & 3 any number of times you like, but make sure you don't take too many as this might slow down the training time.
  1. Press "t" key to start the training. At this point you might have to wait for 200 epochs to be completed.
  2. (Classification) That's it! Once, the training is complete, you will be notified with a sound, everytime you hunch. Also, a timer is displayed to indicate the time you are infront of the computer and the time you were in wrong posture.

Sources:

  1. https://gist.github.com/mohdsanadzakirizvi/ce95bcb560eeae899ff6852fda8757a6

Issues:

  1. Shoulder points are not detected in the front view of the camera.

Pending work

About

Java Script based Posture Detection model using PosNet model. Detects if you are slouching at desk using front camera

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published