Edge Impulse logo
Blog Post

Straightening Out Worker Safety Issues

Machine Learning, TinyML, Embedded DevicesThis tinyML-powered wearable device is designed to help manufacturing workers detect and correct poor posture while on the job.

Nick Bild

November 14, 2022

    We have come a long way from the dark, early days of the industrial revolution when workers were often subjected to cramped work areas, exposure to toxic materials, poor ventilation, and a total lack of basic safety procedures. Appropriate protective gear is now provided by employers, equipment is frequently monitored to ensure that it is in a safe operating state, and workers are regularly trained on proper safety procedures.  But that does not mean that there is no further room for improvement. One area that has not received enough attention is body posture. Poor posture leads to repeated, long-term strains, and ultimately injuries.

    Aside from the human cost of injured workers, this also means that employers have to deal with poor employee retention, missed work days, increased worker’s compensation costs, lawsuits, and equipment damage. But good posture is a difficult thing to train someone on — bad habits are hard to break. To be effective, a reminder is needed whenever someone uses bad posture while carrying out their normal tasks, whether that means lifting with bad form or hunching over at their desk. This is not reasonably possible using traditional training methods, but serial inventor Manivannan Sivan took an innovative approach that automates bad posture detection. With a machine learning model developed using Edge Impulse, he built a wearable device that can continually monitor body posture and alert the worker in real-time when a correction is needed.

    The proof of concept 

    For the proof of concept, Sivan chose to focus on two particularly common sources of problems — bad posture while sitting, and bad posture while lifting heavy objects. To make sure the device was virtually transparent to the user, and unobtrusive while going about their work, he decided to build this device into a waist strap. The Silicon Labs Thunderboard Sense 2 development board was selected for the build — it has ample processing power to handle running inferences with a machine learning pipeline created using Edge Impulse, and it also has a number of sensors onboard. In particular, it comes standard with an accelerometer, which Sivan leveraged to collect motion data from the wearer of the device. The Thunderboard Sense 2 also offers wireless communication via Bluetooth Low Energy, which can be used to send alerts to workers.

    To build an intelligent algorithm, sample data was needed to teach it to recognize different body postures. The development board is fully supported by Edge Impulse, so Sivan first downloaded a custom firmware image that allowed him to link the device directly to his Edge Impulse Studio project. With that done, he was free to collect data from the board’s sensors and have it automatically uploaded to his project. He collected a few minutes of accelerometer data for each of the five selected classes — good and bad posture while sitting, good and bad posture while lifting, and walking. After the data was uploaded, it was automatically split into training and test datasets.

    Examining collected data in Edge Impulse Studio

    An impulse was created to process this uploaded data. A preprocessing step first split the stream of accelerometer data into windows, and the data windows were fed into a sequential dense neural network for classification. With the pipeline finished, the training process was initiated with the click of a button. After a short time, a report was displayed showing that the classification accuracy had reached 100%. Such a high level of accuracy always raises concerns about model overfitting, so Sivan next used the model testing tool. This is a more stringent test that classifies a set of samples that were excluded from the training process. This test revealed that an average classification accuracy rate of better than 87% had been achieved. That is more than good enough to prove the concept, but it was noted that improper sitting posture was getting mixed up with improper lifting posture at times. In the future this could be improved by collecting more data, and from a more diverse group of individuals.

    But with the results looking good, it was time to deploy the model to the Thunderboard Sense 2 so that inferences could run directly on the hardware. This limits latency and removes the requirement for wireless connectivity As previously mentioned, this board is fully supported by Edge Impulse, so a custom firmware image that contained the full machine learning classification pipeline was downloaded and flashed to the device.

    Assessing the accuracy of the trained model

    Sivan strapped the completed body posture detector around his waist and put it through its paces. He ran through tests where he sat down or lifted with both good and bad posture. Using his smartphone, he could see the predictions made by the model, and he found the results to be generally very accurate. Not only was this device inexpensive and easy to build, but it also serves an important need in industry. Not a bad accomplishment for an afternoon’s worth of work.

    As always, Sivan has written up a great summary of his work that is well worth the read. After reading up on the details, we recommend that you clone his public Edge Impulse project to give you a headstart in building your own machine learning-powered creations. What big problems can you solve in a free afternoon?

    Want to see Edge Impulse in action? Schedule a demo today. 


    Are you interested in bringing machine learning intelligence to your devices? We're happy to help.

    Subscribe to our newsletter