Riding shotgun with the world’s best in women’s cycling

By Michelle Okyere

The Women’s Tour of Scotland -start of the second stage from Glasgow city centre

“These cones should have been moved. They might cause a crash if we don’t move them! I’m going to need your help, Dan”.

Dan was riding in the race director’s car during the final stage of the Women’s Tour of Scotland, when race director Chris needed a hand. The peloton had endured three days of tough cycle racing in an array of extreme weather conditions and was approaching the final sprint in front of a packed crowd in Holyrood Park, Edinburgh. But some stray cones were putting the final kilometre of the race in jeopardy…

So how did Dan, a consultant at Deloitte end up here? Well, he’s a member of our xLab Studio team in Deloitte Digital and we had been invited to join the Women’s Tour of Scotland by the organisers. They asked us to help experiment with ways of improving the fan experience at cycling events and beyond, using the ‘Internet of Things’ (fortunately not as competitors!).

So, what has the Internet of Things got to do with women’s cycling?

The Deloitte xLab Studio team specialise in crafting engaging and innovative digital and physical experiences. We do this by designing, building and deploying prototypes, that test novel experiences in the real world with real people. In this instance, this meant following a four-hour cycling race through Scotland.

As part of Deloitte’s sponsorship of the first ever Women’s Tour of Scotland cycling race, our team was brought in to help explore the following objectives:

  • Raise the profile of women’s cycling​
  • Increase the popularity of cycling in Scotland​
  • Explore the use of digital technology in professional cycling

What did we actually do to help?

We took the objectives outlined above and aligned them with the following strategies:

1.“Bring fans closer to the action”

We wanted to give the fans a chance to follow the race as closely as possible, without actually having to be physically present.

We decided to deploy a 360-degree livestream camera on the back of the lead race vehicle to explore this further. The setup consisted of a Garmin VIRB 360-degree camera connected via the local Wi-Fi network which then emits to an iPhone inside the vehicle. That iPhone then used 4G to stream the 360-degree video stream via YouTube, allowing the footage to be available to fans. The 360-degree format gave them an element of control that we thought would help them feel like they were riding alongside the pros, in real-time.

2.“Encourage fans to feel emotionally invested”

We wanted to track the stage two, Deloitte-sponsored best young rider around the final stage of the route using GPS. This was done so that fans could track her progress along every twist and turn of the race.

GPS Tracking device solution:

We needed a GPS tracker that could stream the GPS coordinates (longitude, latitude and altitude), providing the rider’s position at any given time. While GPS tracking is not a new area of technology, it was a challenge to find an asset-tracking solution that allowed data to be retrieved and used in our own dashboard. The issue was that many came with a pre-built application.

The obvious solution would have been to collect the data from the rider’s phone. However, in this scenario keeping the weight of any physical devices to a minimum was critical in order to ensure that the rider remained as streamlined as possible. In the end the chosen device was the Pickway GPS tracker by myWakes, as per the architecture diagram below. This solution allowed us to return data from the device via a REST API endpoint.

Front-end application (left) and backend architecture (right)

The Dashboard:

As shown in the architecture diagram above, the backend solution makes use of various AWS services, as well as the myWakes API. An AWS Lambda function periodically sends a GET request to the myWakes endpoint, and then passes the returned values to a DynamoDB table for storage. The values are then retrieved and transformed by another Lambda function that extracts the latest values (timeStamp, longitude, latitude, altitude), which are returned when the front-end application calls the API Gateway.

The front-end application was built as a React JS app with two screens. The first screen used the data returned from the API Gateway to dynamically update an illustration of the rider’s route along the race. This was illustrated on top of the static route map, allowing users to view the rider’s position with respect to the overall race.

This solution was also an opportunity to discuss with the organisers and fans about other desirable features that could be developed in future. Examples included dummy data used to demonstrate an elevation map, calories burnt and current heartbeat. Including this data in a real environment would require integration with another device, such as a Garmin or an Apple watch. However, given the time constraints and objectives, such integration was not possible.

Scree 2 of the front-end application with live feed (left) and Twitter widget (right)

The second screen (above) included a live feed of the race . We embedded the link of the footage from YouTube of the live streamed 360° camera into the React app. There was also a social media feed, in which a Twitter widget was embedded into the application as well. The tweets loaded were filtered to only display those sent by the @womenstourscot account.

3.“Assess fan turnout along the route”

We wanted to measure the density of crowds along the race route. We decided to use a combination of GoPro cameras fixed to the front of the race vehicle and an AI algorithm to count the number of fans present.

Screenshot of Kamera’s video footage analysis

Crowd Density Analysis:

A bespoke solution was designed, loosely named after the developer who created it, Kaloyan Pashov. “Kamera” is a repeatable framework for us to analyse video footage to detect human gaze and attention. It is flexible and operates as a video pipeline in a manner like GStreamer and other popular video processing libraries. It relies heavily on OpenCV for capturing data from sources and GStreamer for doing basic image analysis.

The architecture of Kamera is comprised of multiple components making use of Python libraries. Some key components required for this application include:

  • Capture Thread: this thread captures new images from the camera stream, generates a timestamp at the time of capture, and stores them in a buffer.
  • Background Subtractor: this removes the background from the images and stores the resulting changed areas.
  • Face detector: this function gets new images from the background subtractor output queue and looks for faces in the changed areas.


We came across challenges at each twist and turn of this project, much like the riders in the race! Some we were able to fix, and others we just had to live with. Here are some things we learned:

  1. Live-streaming is hard. Especially when you’re relying on a 4G mobile connection, coverage of which is lacking in rural Scotland. Still, our viewers were able to experience the race in a way that no other spectator could. Albeit whilst sheltering from the rain in the Deloitte hospitality tent at the finish line.
  2. Weight and aerodynamics are really important in professional cycling. Working with the team directors and the riders, we tried various configurations of GPS trackers and mounting options. At the last minute, we settled on an iPhone in the rider’s jersey pocket, which worked best for everyone.
  3. GPS tracking devices are far less reliable than we thought. The myWakes device struggled to maintain a GSM connection, which made it impossible to retrieve location data as often as desired. The myWakes mobile app was used instead to make use of the iPhone’s ability to stay connected to the internet.
  4. Automatically counting faces is very hard. Limitations arose due to the collection of the footage and the pipeline itself; such as the neural network used, as well as Python’s computational capabilities. Going into detail on this would require another blog entry!
  5. Three hours of driving in the rain and cameras don’t mix well. Despite our best efforts to waterproof the equipment, the rain won the battle halfway through the final stage, spelling the end for one of our GoPros. Fortunately, we had a full day of footage from day two, which we could use as our case study.

Thoughts coming into the finish…

Throughout the event, we were reminded that the key to experimenting with new technology is to be adaptable. Just as the riders had to adapt to the changing events of the race, we adapted as new challenges presented themselves. Additionally, it is vital to have a clearly defined, common mission or objective. We were always striving to improve the fan and rider experience and learnt a huge amount in pursuit of this goal.

…which brings us back to the last kilometre of the final stage. With the peloton closing in behind, Dan and Chris pulled up hard, jumped out of the car and threw the offending cones off the road. Back in the car, they managed to pull away before the peloton caught up. A minute later the riders sprinted for the line and the race is over. A thrilling conclusion to an incredible three days of racing.

To find out more about our work, get in touch with the Deloitte xLab team at xlab@deloitte.co.uk




Get an insight into the latest technologies being explored and developed by the enthusiasts and experts at Deloitte UK

Recommended from Medium

Umbro takes you back to the ’90s with its stunning preppy soccer jerseys — Input

NBA News: Dwyane Wade Son Zaire creates jump in the G-League — Lance Stephenson launches comeback

We’re Back!!

So… What is Happening In These Conference Finals?

The Ten Best Times of the Year to be a Sports Fan

Sweet 16 Preview


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Deloitte UK

Deloitte UK

Insights from experts and enthusiasts at Deloitte UK

More from Medium

A Q&A With Mighty Mike — BadVR’s Newest Sales Pro!

Future of Agriculture lies in Smart AgriFood Solutions

Chatbot Design: 10 Things to Keep in Mind

OISL Can Become a Game-Changer in Disaster Management. Report of Satellite 2022