![]() it is cheap to get enough training data: I wrote some code to take pictures of myself sitting/standing in front of the desk once every few minutes.My diverse and totally not weird sitting postures It is so designed that the work break reminder will not create a hazard when the user is absolutely busy or in the middle of something important.) (Of course you can always unlock the screen manually. Once the screen is unlocked, a new cycle starts. In the next stage, I will need to do some self-defined stretches in front of the webcam for a certain amount of time to unlock the screen. Only when enough CONTINUOUS off-screen time passes can the program enter the next stage. The pictures are still passed to OpenPose to see if I am indeed off screen to take a break: if any of the 18 key points is detected, it will think that I am still in front of the screen and thus restart the counting. When screen is locked, the webcam continues taking pictures. For instance, if I have been sitting there working for 30 min without moving, the program will then lock the screen. The sitting or standing status, and the 18 points coordinates are stored into a database.Įvery time the database is updated, another process would access the database and count for how many minutes I have been sitting in the current cycle. ![]() If my posture is bad, say a forward head posture which causes neck and shoulder pains, an alarm will go off. Next, two processes take in the 18 key points as inputs: a neural network to classify whether I am sitting or standing, and a rule-based test to see whether my posture is wrong. When I start working on the desk, the webcam starts to take pictures every T seconds (default T=2), the image is passed to the OpenPose model, which predicts 18 key points of human bodies. The webcam is connected to a PC with RTX 2080 Ti which runs the whole program. In terms of the equipment used, I am using a 1080p webcam (lower resolution is also OK) to periodically take pictures of myself working on the desk. The illustration below shows the complete workflow of the program. Get some stretch: after enough off-screen time, the user can unlock the screen with self-defined stretch poses (e.g.Posture correction: during work, if the user has bad or non-ergonomic postures, program will notify the user (alarm sound).Work break reminder: the program will lock the PC if the user has been sitting for too long.Happy New Year! Functionality & High Level Design ![]() Now we can add “be more active” to that 2021 New Year Resolution with greater confidence. Language and packages: python, pytorch, opencv, sqlite3 It is a proof of concept and certainly has lots of room for improvement, so as always, comments and suggestions are welcome. In order to remind myself to take breaks, get up and get some stretch, I made this deep learning based work break reminder called “Need For Stretch”. Yep, it’s my actual activity data and I don’t feel proud of it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |