“It’s Strava for wheelies,” my lockdown project, combining hyper-local exercise with data analytics to track and guide improvement. Practising wheelies is a great way to stay positive; after all, it’s looking up, moving forward.
我的锁定项目“将Strava运用于自行车运动”,将超局部锻炼与数据分析相结合,以跟踪和指导改进。 练习脚踏车是保持积极向上的好方法。 毕竟,它正在向上看。
I’ve been at it for a month now, logged 1,331 attempts, and seen my maximum time improve from two to nearly six seconds. In the process, I’ve generated millions of data points to guide further improvement through machine learning.
我已经花了一个月的时间,记录了1,331次尝试,看到我的最大时间从两秒提高到近六秒。 在此过程中,我已经生成了数百万个数据点,以指导通过机器学习进行进一步的改进。
数据采集装置 (The Data Collection Rig)
It doesn’t get much slicker than this. The hardware comprises:
没有比这更光滑的了。 硬件包括:
- (A) 1 bike (A)1辆自行车
- (B) 1 smartphone (B)1部智能手机
- (C) 1 roll duct tape (C)1卷胶带
Using a generous amount of duct tape (C), affix the phone (B) to the top tube of the bike (A) near the head.
使用大量的胶带(C),将手机(B)固定在靠近头部的自行车(A)的上管上。
The bike in this instance is a Specialized Stumpjumper 2017 XL 29” FSR Comp, and the phone is an iPhone X, running the SensorLog app to collect data (see below for more setup details).
本例中的自行车是Specialized Stumpjumper 2017 XL 29英寸FSR Comp ,手机是iPhone X,运行SensorLog应用来收集数据(有关更多设置详细信息,请参见下文)。
制作自行车训练日记 (Building a Wheelie Training Diary)
Goals are wheelie helpful for directing effort. My wheelie goals are directing what I build in the Training Diary, but I’m also discovering interesting things along the way, when I visualise the data and when I share it with others.
目标对促进努力很有帮助。 我的特技目标是指导我在“培训日记”中建立的内容,但是当我可视化数据以及与他人共享数据时,我还会发现有趣的事情。
What do I want to achieve in lockdown? Two things related to wheelies:
我想在锁定中实现什么? 与特技有关的两件事:
- My longest wheelie exceeds 8 seconds — this benchmark was set based on a friend whose mountain biking in general sets the standard for me, although they have now recorded +11s! 我最长的自行车节拍超过8秒-这个基准是根据一位朋友设定的,尽管他的山地自行车现在为我记录了11秒,但他通常为我设定了标准!
- I can reliably wheelie for 4 seconds — this seems like a reasonable measure of consistency given 8 second target for longest wheelie 我可以可靠地进行4秒钟的自行车特技训练-鉴于最长的自行车特技有8秒的目标,这似乎是合理的一致性度量
After processing session data from the phone, I have a list of every wheelie, with its duration, and a link back to the source for extracting further information, like location, speed, etc.
处理完电话中的会话数据后,我得到了每个自行车的清单及其持续时间,并有一个指向源的链接以提取更多信息,例如位置,速度等。
With these goals in mind and the available data, I’ve built a diary comprising:
考虑到这些目标和可用数据,我编写了一个日记,其中包括:
- Summaries of results and effort 结果和努力总结
- Details of improvement over time 随着时间的推移改进的细节
- Play-by-play replays 逐次播放重播
总结 (Summaries)
The measures for tracking my key goals are:
跟踪我的主要目标的措施是:
- Maximum wheelie duration, for the longest wheelie target 最大的单车持续时间,用于最长的单车目标
- Median wheelie duration, for the consistency target 中性单车持续时间,用于一致性目标
I plot these by “Session”, which is any day with >0 wheelies.
我通过“会话”来绘制这些图,“会话”是有> 0轮的任何一天。
I’m also curious about distance, and I use it in the play-by-plays, so I include that too. By these measures, I feel like I’m on track to achieve my goal in a few weeks to months — great! I don’t know if I’m a fast or slow learner though; 1,331 wheelies seems like a lot…
我也对距离感到好奇,我在逐场比赛中使用它,所以我也将其包括在内。 通过这些措施,我感觉自己有望在几周到几个月内实现自己的目标-太好了! 我不知道我是快还是慢。 1,331轮车似乎很多…
Sharing this project with colleagues, a self-professed sports data nerd asked to see the cumulative effort over time, as they understood skills development was often a matter of time, as well as effort. So I added cumulative effort over time…
一个自称运动数据的书呆子与同事共享这个项目,要求查看一段时间内的累积工作量,因为他们了解技能开发通常既是时间又是工作量。 所以我随时间增加了累积的努力…
… and a breakdown of effort per session. This made me more comfortable reducing the intensity of sessions, as a result, and I think, improved the quality of wheelies.
…以及每节工作的细目分类。 这让我更加自在地减少了强度,因此,我认为可以提高自行车的质量。
随着时间的推移改进 (Improvement Over Time)
The summaries in their current form show improvement over time, but I also wanted to get different and finer-grained views of improvement over time. For this, I’ve found plotting and comparing the distributions of wheelie durations in each session to be really helpful. I can gradually see the distribution moving right, even when I don’t set a new longest duration.
当前形式的摘要显示了随着时间的推移而有所改进,但是我还希望获得随着时间的推移而出现的不同且细粒度的改进意见。 为此,我发现绘制和比较每个会话中的自行车前轮持续时间的分布确实很有帮助。 即使没有设置新的最长持续时间,我也可以逐渐看到分布向右移动。
Visualising the change is great, and it gives insight into how to quantify change. When another colleague asked for video evidence of the wheelies (a perfectly reasonable request, now supplied above), I wondered to myself how I’d go about synthesising this data. Given the “data doping” issues on Zwift, I also thought about how I’d prove the synthesised data was me. Difficult, given that I want to be unrecognisable from the rider I was.
可视化更改非常棒,并且可以深入了解如何量化更改。 当另一位同事要求提供带轮的视频证据(一个完全合理的要求,现在上面已提供)时,我对自己想知道如何合成这些数据。 考虑到Zwift上的“数据掺杂”问题 ,我还考虑了如何证明综合数据就是我。 很难,因为我想被车手认出来。
Any session recognisable as “me” should statistically come from “my” underlying duration distribution. But I don’t know what this is, and it’s changing — by design — as I improve. So now I’m quantifying change with a statistical technique called a two-sample Kolmogorov-Smirnov test, which tells us whether two samples were likely drawn from the same underlying distribution, or not. I want to know when I’ve improved enough from one session to the next that I look like a different rider to the KS test! So here I compare every pair of sessions in a matrix.
在统计上,任何可识别为“我”的会话都应来自“我的”基础持续时间分布。 但是我不知道这是什么,随着我的改进,它正在发生改变(通过设计)。 因此,现在我用一种称为两样本Kolmogorov-Smirnov检验的统计技术来量化变化,它告诉我们两个样本是否可能来自相同的基础分布。 我想知道我何时从一个阶段到下一个阶段都有足够的进步,以至于我看起来像是与KS测试不同的骑手! 所以在这里,我比较矩阵中的每对会话。
If I change sufficiently every session, this matrix should be a diagonal line. If I don’t change at all, it will be a full square. It’s nice to see that, in my latest session, I am a different rider to every other session except my second-latest session. This contrasts with the extended period in the middle where, while the key metrics were going up, I wasn’t looking like a different rider. I’m still trying to find the best way to visualise this to tell the story…
如果我每次会话都进行足够的更改,则此矩阵应为对角线。 如果我完全不更改,那将是一个完整的正方形。 很高兴看到,在我最近的一堂课中,除了第二场最新的课外,我和其他每届都有不同的骑手。 这与中间阶段的延长形成鲜明对比,在中间阶段,虽然关键指标有所提高,但我看起来并没有像其他骑手那样。 我仍在寻找可视化的最佳方式来讲述故事……
播放游戏 (Play-by-Play)
We all love reliving the highlights, and highlights don’t come better than wheelie highlights. For play-by-play review, it’s back to the time series data linked to each wheelie event.
我们都喜欢重新选择高光,并且高光不会比带轮高光更好。 对于逐次播放查看,它返回到链接到每个自行车事件的时间序列数据。
Right now, I trace the pitch (rotation upwards of the front of the bike) against distance covered, with some visualisation of how steady I am using variation in the roll of the device. But in future, I’d also like to add more data visuals to these, like video, or location, speed, etc, to share as little wheelie postcards.
现在,我跟踪了俯仰(自行车前部向上旋转)相对于所覆盖距离的变化,并直观地看到了我使用设备滚动变化的稳定性。 但将来,我也想向其中添加更多数据视觉效果,例如视频或位置,速度等,以共享尽可能少的带轮明信片。
Here’s my longest wheelie so far, at 5.8 s and 22.4 m.
这是我迄今为止最长的自行车,分别为5.8 s和22.4 m。
And here’s a gallery of top wheelies by duration — look at all those different shapes! — prompting the next round of quantifying improvement…
这里是按时长分类的顶级轮车画廊-看看所有这些不同的形状! -推动下一轮量化改进…
数据收集和提取事件 (Data Collection and Extracting Events)
The Training Diary is built on top of a data processing pipeline. Here are some details of how that’s set up.
培训日记建立在数据处理管道的顶部。 以下是有关如何设置的一些详细信息。
In addition to the hardware above, the software comprises:
除上述硬件外,该软件还包括:
SensorLog app for iOS (or consider AndroSensor for Android)
适用于iOS的SensorLog应用程序(或考虑使用适用于Android的AndroSensor)
- Google Drive account and app installed on the phone, for transferring data 手机上安装的Google云端硬盘帐户和应用,用于传输数据
Colaboratory (cloud-hosted Python notebook environment based on Jupyter), for processing sensor data and extracting events
协作 (基于Jupyter的云托管Python笔记本环境),用于处理传感器数据并提取事件
More configuration details are provided in the wheelies resources README.
Wheelies资源README中提供了更多配置详细信息。
The data coming out of the sensor rig is in time series format. For each time that the phone’s sensors were sampled, we have a reading for each of the enabled sensors, as below:
来自传感器装置的数据为时间序列格式。 每次对手机的传感器进行采样时,我们都会读取每个启用的传感器的读数,如下所示:
As the bike rotates upwards into a wheelie, the motionPitch value increases. When it exceeds 0.88 radians, we determine that a wheelie is occurring.
当自行车向上旋转成带轮自行车时, motionPitch值会增加。 当其超过0.88弧度时,我们确定发生了车轮事故。
def wheel_up(pitch): return pitch > 0.88
So in this way we convert a continuous sensor value to a binary true/false label that conveys meaning (and add column wheel_up to the dataframe). Note from the plot below, there is occasional drift in the pitch value unrelated to wheelies (I think when I sharply changed direction 180 degrees), so the labelling is not perfect — it may pick up the occasional false positive — but it’s good enough for now, and I’ll discuss in future how it might be improved.
因此,通过这种方式,我们将连续的传感器值转换为传达含义的二进制true / false标签(并在数据帧中添加wheel_up列)。 请注意,从下图中可以看出,俯仰值中偶尔会出现与飞轮无关的漂移(我认为当我将方向急剧改变180度时),因此标签并不完美-偶尔会出现误报-但对于现在,我将在以后讨论如何对其进行改进。
With run-length encoding, using Python library python-rle, we can now transform the time series data into events, which tell us something meaningful, with some parameters, happened at some time. In this case, a wheelie of a certain duration and distance. The event links back to the time series source to support further analysis.
通过运行长度编码,使用Python库python-rle ,我们现在可以将时间序列数据转换为事件,这些事件告诉我们某些时间有意义的事情,并带有一些参数。 在这种情况下,具有一定持续时间和距离的自行车。 事件链接回到时间序列源以支持进一步分析。
In preparing the event data, we do some further transformations on the source sensor data to:
在准备事件数据时,我们对源传感器数据进行了一些进一步的转换,以:
Fill missing source data related to location, using Pandas interpolate method
使用熊猫插值方法填充与位置相关的缺失源数据
- Converting GPS coordinates to distance with simple approximate formula 使用简单的近似公式将GPS坐标转换为距离
I have shared a notebook for processing the uploaded time series sensor data and extracting events. This processed data feeds the training diary and can feed into further downstream analysis.
我共享了一个笔记本,用于处理上传的时间序列传感器数据和提取事件 。 这些处理后的数据将提供给培训日记,并可用于进一步的下游分析。
未来的计划 (Future Plans)
Of course I plan to use a proper phone mount, but there are many other directions to take this lockdown project.
当然,我计划使用合适的电话机座,但是还有许多其他指导来进行此锁定项目。
I’ll be focussing on adding machine learning in the next stage, to better detect wheelies with noisier data, different bikes, different sensor set-ups, etc, to identify success factors, and maybe to coach the rider. I anticipate trialling custom solutions and MLaaS. I feel that I have the foundations for a virtuous data generation and labelling system through this initial work.
我将在下一阶段集中精力添加机器学习,以更好地检测带有嘈杂数据,不同自行车,不同传感器设置等的自行车,以识别成功因素,并可能指导骑手。 我期望试用定制解决方案和MLaaS。 我觉得通过最初的工作,我为建立良好的数据生成和标记系统奠定了基础。
Other directions this could go:
其他可能的方向:
- Automating more of the data processing pipeline, standardise the tooling 自动化更多的数据处理管道,标准化工具
- Extending and polishing dashboard functionality 扩展和完善仪表板功能
- Real time streaming for collection and sharing for distanced but social training 实时流媒体以进行收集和共享,以进行远程但社交的培训
- Client app development or custom hardware prototyping 客户端应用程序开发或自定义硬件原型
- Video capture and rider pose analysis as another data stream 视频捕获和骑手姿势分析作为另一个数据流
- Find another skill to improve with sensor data 寻找另一项技能来改善传感器数据
Here’s hoping to be back soon with an ML-powered 8 second wheelie!
希望以机器学习动力的8秒自行车鞋很快回来!
翻译自: https://medium.com/the-sports-scientist/the-lockdown-wheelie-project-9a9d8eedd42c
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/389239.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!