stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

FormCheck

  • 17 Devlogs
  • 61 Total hours

This is an Android app that helps you check your form during squats.

Ship #1 Pending review

I built FormCheck, an Android app meant to help you with checking your form when performing squats. This project was initially meant to be useful during a variety of workouts, but due to time constraints and complexity I was only able to make it work with squats. When I started building this project I had some Java knowledge, but was unfamiliar with how to build an Android app. I had to learn that, and during the development of this app I feel like I got much better at Java and also learned new file types like xml’s and apk’s. After I got familiar with this, I found that some things were repetitive so I handed off certain tasks to Codex to help me with the process. To test it, you can head to the GitHub repository and download the apk to try it on your own device/emulator.

Here are some features of this app:
Runs locally, meaning nothing leaves your device
Uses Google’s free and open source model MediaPipe
Provides you with data such as timings and leg angles
Allows you to choose a target for squat lowering timings
The app gives you feedback/comparison on your target vs your actual squat
The app can handle errors such as unsupported camera angles, unreliable detection from the model, clipped videos, and much more.

I put a lot of time and effort into this app, so I hope you like it!

  • 17 devlogs
  • 61h
Try project → See source code →
Open comments for this post

26m 49s logged

Devlog 17:
I completed the apk build and published FormCheck v1.0 on GitHub. I also added a Readme. I tested the apk on my emulator and did all finishing touches. This is my last devlog before I ship this project.

0
0
19
Open comments for this post

1h 57m 4s logged

Devlog 16:
Performed some final checks and implemented some final features. At first I was adding some features, then I noticed everything was repetitive. Because of this I handed some of the tasks to Codex so it could complete the repetitive tasks. It just added some more data to the results screen, a cancel button, and rotation support. I added most of the details on the results page.

0
0
21
Open comments for this post

5h 22m 33s logged

Devlog 15:
I moved the app’s results onto a separate page so everything is cleaner. The new screen displays feedback, if a repetition was detected, and the timestamps. I check both a valid squat and an unsupported video to verify error messages. This took a long time because I had to learn how to use intents, and also how to use scrollable areas. I am finishing up the app, and almost ready to ship.

0
0
9
Open comments for this post

6h 33m 40s logged

Devlog 14:
I started preparing for the feedback. I am planning to mostly give feedback on timing/tempos, so I started adding some functions for that. The first thing I did was correct the scaling of video coordinates before calculating knee angles to ensure higher accuracy. Then I added a lowering-time estimator that looks for sustained movement instead of just angles at timestamps. I ensured to account for rectangular frames, leg switches, observation gaps, and timing integration. All tests passed. The next steps are actually providing feedback from this data, and then connecting this to the UI.

0
0
17
Open comments for this post

3h 35m 46s logged

Devlog 13:
This devlog was mostly some final touches. I did add 3 things, though. The first of which is a frame progress display on the UI. This shows the user of many of the total frames have been processed after they start the analysis. Second, I added some text that was a disclaimer on the limitations of the analysis. The third thing I added was a reset between long gaps. So if the squat takes too long to get to the next state, then the detection resets and it starts looking for another starting squat. The first test I did was that I sampled different repetition intervals to determine which had the most detail but didn’t take too long to process. I landed on sampling frames every 250 Ms. Then I tested all the different UI states on the emulator using different videos. I then added tests for all the new features that I just mentioned to you. The next step is probably going to be actually implementing feedback.

0
0
10
Open comments for this post

8h 16m 55s logged

Devlog 12:
I added some more meaningful upgrades this time. I added functionality so that the app could detect a real squat repetition. This works by combining this with the pose sequence analyzer, which contains poses and their timestamps. By mapping the angle formed by the hip, knee, and ankle at different intervals of the video, the app is able to detect if the angle got gradually lower, then gradually got higher. If these angles pass the thresholds needed to create a straight leg angle and a squatted down angle, then we can conclude that a squat repetition was performed. To accomplish this I added many different smaller functions, then combined them all together to get the final result. This allowed me to test each part individually to ensure they all worked. I also added this to the UI of the app, which you can see in the image. Finally I added real video validation, which basically means that I tested the current state of the app with a real video of a person doing a squat. The app was able to successfully recognize the repetition of the squat.

0
0
30
Open comments for this post

6h 8m 31s logged

Devlog 11:
Now I added a few things. First I added a function that can sample frames at different intervals and stores the MediaPipe result with the timestamp of the frame. I also added hip/knee/ankle extraction for both sides and also confidence-based leg section. Codex wrote a few methods (2-3), and I wrote the rest. I then added timestamped knee angle measurements, and also connected the leg selector to the angle calculator. Finally, I added a sequence analyzer that keeps the valid measurements and skips the unclear frames. I added test for all these functions. There is a little more than this, but this is the gist of what I have been working on right now.

0
0
7
Open comments for this post

6h 55m 1s logged

Devlog 10:
This time was some meaningful upgrades. First of all I added a function to extract a bitmap from a video given a timestamp. Then I added a separate function in order to convert that bitmap into an MPImage. This allows me to access it from anywhere. Finally I created a new class that combines the decoding, conversion, and pose processing tasks into one pipeline. I also added tests for all of these. Currently only one frame processes, but soon I will start to improve this.

0
0
15
Open comments for this post

8h 30m 15s logged

Devlog 09:
Now the app stores the selected video’s Uri in an activity field, meaning it can be accessed for later processing instead of only the status text. Also frame timestamps can now be generated. This means that you can input the video duration as well as the interval that you want the timestamps to be generated, then you will get a set of timestamps for the video. The video metadata can also now be read. It uses Android’s MediaMetadataRetriever to open the video. Currently only the duration of the video can be retrieved, but later you will be able to decode individual frames. Finally I added tests for all of these. For the metadata retriever specifically I uploaded a test video to confirm that I could get an accurate measurement. Also updated the documentation.

0
0
5
Open comments for this post

3h 34m 42s logged

Devlog 08:

I finally added the MediaPipe dependency, as well as a few functions. First of all I also added the Pose Landmarker Full model for it to actually detect poses. Then I created a manager function to initialize and close MediaPipe. I then added a function that could process an already decoded video frame with a timestamp using MediaPipe. I added tests for all of these to ensure they work when the app runs, and updated all the logs.

0
0
5
Open comments for this post

1h 58m 55s logged

Devlog 07:

I changed the emulator from being on device to remote via Firebase. This allows me to test the app cleanly without lagging my computer. The only problem is I get a limited 30 minutes per month, so I have to use them wisely. I also updated the Point2D function to reject non-finite points. This prevents errors on the future. I also added a class that combines all the other functionality into one. It returns an OptionalDouble, which is useful when you don’t know if you are going to get a result. This new function accepts three LandmarkObservations, Then if the result is valid, it returns the angle degrees between the points. If not, it returns nothing.

0
0
8
Open comments for this post

1h 18m 48s logged

Devlog 06:

I added the landmark quality gate, which helps determine whether the visibility and presence of the point meet the minimum requirements. If it does, then it passes. If it doesn’t, then the point fails. From here there are two options, either the app tries to find another point, or the app says it cannot reliably determine your form from that video

I also added the AI use log. I mainly did this because I will be submitting this to the Congressional App Challenge.

0
0
9
Open comments for this post

1h 1m 17s logged

Devlog 05:

Today I added landmark storage and reliability tests. What this is is basically a new object that can store a point, its visibility, and presence. The point is the point itself, the visibility says how well the object can be seen, and the presence determines how much of the object is actually in the video frame. These three factors help determine how well the video can be analyzed. If the video cannot be analyzed well enough, then FormCheck will send a message saying so (This hasn’t been implemented yet, but this is the basic idea of why this is there in the first place).

0
0
3
Open comments for this post

1h 11m 23s logged

Devlog 04:

I added functions for measuring the angle based on three points (the joints). Basically how this works is that it first takes in three points, the first endpoint, a vertex, and a second endpoint. Then it uses the dot product formula with the two vectors to find the angle between the two lines.

0
0
9
Open comments for this post

1h 31m 17s logged

Devlog 03:

I added the file picking dialogue. Now whenever you click the “Select a video” button the android folder picker opens and you can choose a video. I think next is working on the actual pose detection logic.

0
0
11
Open comments for this post

1h 23m 9s logged

Devlog 02:

I added the initial video selection interface. I added some text to describe the app, and a button for the user to be able to select a video to upload. Currently, the button does not do anything. Next I will have to continue working on the button and the actual pose estimation part of this.

0
0
32
Open comments for this post

55m 40s logged

Devlog 01:

This is the first devlog of the FormCheck project, an Android app that helps you check your form during workouts. Currently I just set everything up in Android Studio, connected Hackatime, and set up GitHub.

0
0
11

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…