“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.pswp.cn/news/389239.shtml 繁體地址,請注明出處:http://hk.pswp.cn/news/389239.shtml 英文地址,請注明出處:http://en.pswp.cn/news/389239.shtml
如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!