Quantifying swimming activities using accelerometer signal processing and machine learning: A pilot study
Introduction
Aerobic fitness is essential in both sport performance and health [6], [14], [25]. Swimming is one of the most popular aerobic exercises. Studies showed that swimming not only could improve aerobic capacity [10], but also increase muscle mass and help to lose body fat [4], [12] and increase isokinetic strength [4]. Swimming is also helpful for chronic disease management, e.g., to control blood pressure [16], improve cardiovascular health [26] and assist persons with asthma to exercise safely [3].
Like other aerobic exercises, determining and tracking the proper amount of training is a must to achieve the maximal benefits from the swimming training. While the dose of aerobic exercise has been determined in the 2018 physical activity (PA) guideline [30], tracking PA in free-living conditions has been a challenge. In the past, tracking had been heavily dependent upon the questionnaire-based recall, but its accuracy, due to subjectivity, has often been questionable [7], [28]. Fortunately, that limitation can be overcome by combining objective measures, such as accelerometers, and machine learning developed rapidly during the past several decades.
In fact, extensive studies showed that many on-land aerobic exercises, such as running and walking, could be tracked and classified accurately by accelerometers [2], [29]. Among accelerometers employed, ActiGraph is the most studied accelerometer devices and has been widely used in PA research. Staudenmayer et al. [24] illustrated that estimating PA energy expenditure (PAEE) needs to use more information in addition to ActiGraph counts, an intermediate variable calculated by the corresponding software of ActiGraph. ActiGraph was also used to estimate PAEE and recognize PA types [23]. Plasqui and Westerterp [18] showed ActiGraph has a high validity and reliability in estimating PAEE. Besides ActiGraph, Fitbit, a commercial wrist-worn PA tracking device, has also been shown to have a good validity and reliability on tracking aerobic exercise [8]. Very recently, a greater number of daily total step-counts derived from ActiGraph have been associated with lower all-cause mortality [20].
In addition, accelerometers have been used in physical therapies, e.g., hippotherapy, to quantify the performance of patients. Specifically, hippotherapy is a treatment for people, who are physically challenged on posture control and walking normally. Patients go through horse riding sessions to train muscle reaction, control and strength under the feeling of real walking. Accelerometer was used to measure the posture and movements of a body part, e.g., angle of displacement of head, neck, trunk, etc. Champagne and Dugas [5] did power spectral analysis of accelerometer signal to assess postural control on head and trunk and Pálinkás et al. [17] used accelerometer-acquired data to derive the patterns of reaction of patients while riding horse during the hippotherapy sessions. Accelerometers were also used to measure patients’ gait parameters, including walking speed, cadence, step length, left–right symmetry and horizontal/vertical displacement ratio, under both pre- and post-hippotherapy situation [13], [15].
While the health benefits of swimming exercises, e.g., improved aerobic capacity measured by VO2max, muscle strength, endurance, and mental health, has been well documented [4], [10], [21], quantifying the process of swimming, e.g., swimming style or stroke count, is still unsolved. While studies have been done on stroke characteristics, such as stoke rate, velocity and length [11], [22] and swimming-style pattern-recognition using cameras and image-processing techniques [27], the measures employed are too expensive to be used to track daily free-living PA. So far, swimming style pattern recognition using accelerometers has not been explored.
Machine learning is a set of statistical approaches to predict outcome value by inputting predictors to a statistical model. PA related outcomes can be numeric, i.e., energy expenditure, time of PA, body-fat percentage, or categorical, i.e., type of PA, mastery, pass or not pass. In PA assessments, together withaccelerometers, machine learning has been used to predict METs value and PA type [9], [19]. However, it was rarely used to recognize different techniques within a given activity, e.g., pass or shoot in soccer.
In this study, we focused on recognizing different stroke styles in swimming. Specifically, three classifiers, linear discriminant analysis (LDA), quadratic discriminant analysis (QDA) and support vector machine (SVM) were employed. LDA uses linear functions as cut-off criteria to separate different categories, while QDA uses quadratic functions. SVM can perform both linear and non-linear classifications, which could possibly have more choices on classification.
Acceleration signal contains extensive information of movement. Most studies in tracking PA only focused on the descriptive aspect of acceleration data without processing it as a time-domain signal, which could lead to a loss of information from the signal. The purpose of this study was, by using a combination of accelerometers, signal processing methods and machine-learning algorithms, to develop a set of algorithm to recognize four different swimming styles and to count swimming time and number of strokes in each style.
Section snippets
Participants
A total of 17 college swimming athletes (9 females, 53%) from the swimming team of the Southeast University, China was recruited for the study and their age, height, weight, years of swimming training are summarized in Table 1.
Device
ActiGraph, specifically ActiGraph GT9X IMU, is an accelerometer device, with a size of 3.5 × 3.5 × 1 cm and weight of 14 g (Fig. 1). Participants wore the device on their wrists and the wristband is tight enough to keep the device on the wrist to prevent any meaningful
Theory
Recognizing swimming style by acceleration is theoretically feasible because movement patterns vary by styles; therefore different acceleration signal could be generated. To identify the difference, the signals need to be processed in small time windows. The collected data were processed and analyzed in the following steps:
- 1.
A set of time-series data with a length of two minutes was extracted from the complete time-series data for each stroke of each participant;
- 2.
Separate two-minute time-series
Results
Accuracies of all options in leave-one-out cross-validation are shown in Table 3. Options with SVM classifier and 2 features (i.e., mean and standard deviation) all had more than 99% accuracy; however, 1-second time window could give a better division value than 10- and 5-second windows and x-axis yielded to the highest accuracy. Thus, according to the results of leave-one-out cross-validation, a combination of SVM classifier, 2-feature, 1-second and x-axis was the best option for
Discussion
By taking the strength of signal processing and machine learning on acceleration signals, the purpose of this study was to develop and evaluate an objective way to recognize the swimming style pattern, record swimming time, as well as to count the number of strokes of each style. It provided an objective way to build a type of fitness tracker for teachers and coaches to objectively measure and record their students or athletes’ swimming training. The major finding of this study was that SVM was
Conclusion
With a combination of a validated accelerometer and machine learning algorithms, tracking swimming activities, including swimming style classification, counting swimming time and strokes, becomes accurate and possible.
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgment
This project was partially supported by a gift fund from Lifesense/Transtek Health Inc. to the University of Illinois at Urbana-Champaign, USA.
References (31)
- et al.
Serum cartilage oligomeric matrix protein accumulation decreases significantly after 12weeks of running but not swimming and cycling training - A randomised controlled trial
Knee
(2013) Can moderate intensity aerobic exercise be an effective and valuable therapy in preventing and controlling the pandemic of COVID-19?
Med. Hypotheses
(2020)- et al.
Effects of swimming training on blood pressure and vascular function in adults> 50 years of age
Am. J. Cardiol.
(2012) - et al.
2011 Compendium of Physical Activities: a second update of codes and MET values
Med. Sci. Sports Exerc.
(2011) - et al.
Generalized activity recognition using accelerometer in wearable devices for IoT applications
- et al.
Swimming and asthma
Sports Medicine
(1992) - et al.
Improving gross motor function and postural control with hippotherapy in children with Down syndrome: Case reports
Physiother. Theory Pract.
(2010) - et al.
Comparison of self-reported versus accelerometer-measured physical activity
Med. Sci. Sports Exerc.
(2014) - et al.
Systematic review of the validity and reliability of consumer-wearable activity trackers
Int. J. Behav. Nutrit. Phys. Activ.
(2015) - et al.
Evaluation of artificial neural network algorithms for predicting METs and activity type from accelerometer data: Validation on an independent sample
J. Appl. Physiol.
(2011)
Chronic physiological effects of swim training interventions in non-elite swimmers: A systematic review and meta-analysis
Sports Medicine
Embedded programming and real-time signal processing of swimming strokes
Sports Eng.
Effects of run-training and swim-training at similar absolute intensities on treadmill VO2max
Med. Sci. Sports Exerc.
The effect of a hippotherapy session on spatiotemporal parameters of gait in children with cerebral palsy - pilot study
Ortopedia Traumatologia Rehabilitacja
Health benefits of aerobic exercise
Postgrad. Med.
Cited by (2)
Accelerometer-based prediction of ground reaction force in head-out water exercise with different exercise intensity countermovement jump
2022, BMC Sports Science, Medicine and RehabilitationComplex Human Activity Recognition Using a Local Weighted Approach
2022, IEEE Access