Inspiration

Millions of people go through physical therapy every year, especially the elderly. They go through in person appointments where the physician walks them through various movements to ensure that their joints are able to go through full ranges of motion. After the pandemic hit, many physical therapists have struggled to stay in business due to the lack of online resources to conduct appointments. According to the American Physical Therapy Association, during April and May 2020, 97% of all physical therapists have noticed a drop in revenue anywhere between 25% to 76%. To alleviate this issue, we’ve designed PTFit, a web application that enables therapists to provide their service remotely.

What it does

The purpose of our project is to be able to conduct physical therapy online. In our project we are able to track the movements of the joints of a person and see if it matches the movements of a therapist. In this way, we can save thousands of hours of commute so that therapy appointments can be done online. Additionally, we can reduce the typical cost for therapy—in consulting expenditures—from about $1500 to $40 by using online systems like Telemedicine has done.

How we built it

We build the project using TypeScript utilizing a pre-trained model from Tensorflow called PoseNet. We modified the original code significantly so that we were able to model the movements of the person and the trainer and graph it over a canvas on a web application. The movements for the trainer and the user were monitored carefully and scaled in real time. When a correct pose has been detected, both the therapist and user are notified and the therapist can continue with their treatment.

Challenges we ran into

While creating the part of the program that compares the joint angles, we noticed that when the subject is closer to the camera, the arm appears to be bigger. This meant that when comparing and displaying the joints, we had to change the size of the arm and make it relative to the user, (as opposed to the trainer). This was a surprisingly difficult task requiring a strong understanding of math and especially various coordinate systems. Ultimately, we solved this problem by dilating the size of each limb relative to their joints.

Accomplishments that we're proud of

We are proud of the project that we have developed as we managed to build on top of a framework provided by Tensorflow and utilize the pre-trained CNN for the usage of our project. Additionally, we are happy to see a working prototype in the form of a scalable web application.

What we learned

We learned how to implement the weights in a pre-trained model provided by Tensorflow. We also also learned how to graph these points and scale them into proportion when comparing the angles of the trainer with those of the patient. A lot of us were also new to TypeScript so we also learned the basics of markdown and how it is different from traditional JS.

What's next for PTFit

We will continue to improve the algorithms behind the scaling and dilating features to make sure they run smoothly; while we have a working model, we think that there is plenty of room for improvement. We would also like to improve the user interface since it’s currently rather simplistic. We would also like to add more features to the display. Currently, it displays the joints in 2D via a JavaScript canvas. In the future, we could display it in augmented reality, so people can easily visualize their trainer’s joints by using any of their AR devices.

Try our project out @ https://github.com/chaitunya/PTFit

Built With

Share this project:

Updates