Enchancment Course of
- Prototyping with Figma
The very very first thing to do is to create a high-fidelity prototype of the app using Figma. For the preliminary mannequin of the app, it’s going to encompass academic views, practice picker, preview of the exercises, rep picker, the rep counter that may be the view to current options on particular person’s rep tempo, and summary of the set being accomplished (what variety of reps are too fast and what variety of are well-timed). The whole hyperlink to the figma prototype might be accessed proper right here.
- Getting ready the dataset
There are two datasets that can possible be used to create the train classification Model:
MM-Match dataset is a dataset that consists of the readings of sensors from a variety of devices from doing a variety of exercises. for smartwatch, the dataset makes use of Mobvoi TicWatch Skilled to report the accelerometer, gyroscope, and coronary coronary heart cost sensors. In the midst of the recording of the dataset, each recording will embody the subject doing a variety of exercises in a single recording, and each recording might have sensors finding out when the watch is used on the appropriate hand and used on the left hand. The dataset provides data regarding timeframe for explicit exercises inside certain recordings. So, in case you want to solely accumulate bicep curl datapoints as an illustration, it is a should to hold out an data cleaning by solely taking the timeframe of the subject doing bicep curls in each recordings.
Whereas making a classification model, a unfavourable label is required, which is a label the place every actions goes previous the exact movement labels. The purpose is that when the particular person should not be doing one thing, the model will be taught it as unfavourable samples instead of an exact label. Whereas in my evaluation, i didn’t uncover any dataset of unfavourable samples recorded on Good Watch that are potential for my perform on this enterprise, i in any case found this Motionsense Dataset that was recorded on fellow Apple Merchandise; iPhone 6. It accommodates sensor of the subject doing train equal to sitting, strolling, and so forth.
- Creating the Model with CreateML
For starters, Bicep Curl can be the solely exercises used for the early phases of the app. From the MM-Match dataset, 58 models of timesets for bicep curls had been gathered, with each timesets consisting of 10 reps of bicep curls. The dataset is then manually minimize up into teaching models and validation models with ratio of 70:30 (validation models is routinely minimize up from teaching models by CreateML).
Then, proper right here is the outcomes of the model:
- Tech Stacks
To make sure that the app to satisfy it’s goals on encouraging particular person to control their rep tempo, a variety of Swift Frameworks had been used in the midst of the development of the App:
- SwiftUI for creating the front-end views.
- CoreML for configuring the model created by CreateML
- CoreMotion for implementing the utilization of Apple Watch’s sensors (accelerometer and gyrometer).
- WatchKit for utilizing Apple Watch’s {{hardware}} for the code, like potential to scroll the picker with digital crown as an illustration.
- App Enchancment using Xcode
Essential part of the code might be the half the place the app live-records the Watch’s sensors after which makes use of the data components gathered as enter to the model for predicting the exercises being accomplished in the mean time. Large due to Turi Create Github documentation for the unbelievable insights on implementing CoreMotion for train classification. The whole code might be accessed in GymFix’s Github repo.
- Current Stage
As a lot as the current mannequin of the app, listed beneath are the problems that had been effectively carried out inside the app:
- Triggering haptics.
- Familiarizing myself on learn the way to create model using CreateML
- Using the digital crown to scroll the picker.
- Calling the coreMotion’s CoreManager to report the system’s sensors.
- Implementing the model inside the Xcode Mission.
And listed beneath are the problems that are not work however:
- The counter doesn’t go up when the bicep curl is carried out.
- As a result of the counter couldn’t go up, the haptic options has not been examined however.
- The logic to seek out out whether or not or not the particular person’s rep tempo is just too fast or well-timed is however to be determined.
- Subsequent Steps
Listed below are the current hypotesis with a objective to treatment points that are not work however:
- 58 datasets won’t sufficient ample, which might be seen with the testing and validation score of 100%, which might presumably be sign of overfitting. Perhaps together with my very personal dataset might presumably be accomplished with a objective to current additional robusts datasets.
- Perhaps the utilization of iPhone sensors as unfavourable samples doesn’t translate successfully for apple Watch use case. Perhaps additional thorough evaluation on discovering applicable datasets or creating my very personal datasets might be accomplished with a objective to current applicable unfavourable samples.
- I seen that in app demonstration, the watch show turned off when hand is in idle place (when along with the subject’s physique as an illustration), possibly it’s value exploring one of the simplest ways to keep up the system on in the midst of the rep counter view.
In addition to, listed beneath are points that could be added to the app to current additional full experiences:
- Together with additional exercises to the app.
- Implementing construction equal to ViewModel to the code.
- Implementing coding most interesting practices to the code (avoiding nested ifs, concistency in file/variable naming, and so forth.)