Hackathon in full swing

Hacking Darts

It’s not only the corporate world that uses SAS software for all things analytics: many sports teams and organizations recognize the added value of analytics to optimize fan experience and athletic performance. For example, the British olympic rowers, the Swedish ice hockey team and the Canadian Olympic Committee use SAS in their journey to gold. In the Netherlands, the Dutch Football association (KNVB) partners with SAS, and Scisports is innovating the game of football with the help of SAS AI solutions. During the last winter Olympics, SAS Netherlands took on the challenge of predicting the winning times for several speed skating distances. And now we’ve taken on a new challenge in a global sport: auto-detecting darts!

The noble game of darts is quite easy to understand: a dartboard with a diameter of 34 centimeter, divided into 62 sections at a center hight of 1.73 m where you throw three darts at from a distance of 2.37 m. The goal is to collect 501 points with the minimal amount of throws, of which the last one needs to be a ‘double’ in the outer ring of the board. For humans it’s easy to see where each dart has landed and how many points are scored, but our challenge was: can a camera assisted with a computer algorithm do this as well?

Hackathon

To answer this question SAS Netherlands and SAS Belgium joined forces and formed a multi-disciplinary team to build a prototype of a computerized dart score counter. We’re entering artificial intelligence territory here where human tasks are supported or even replaced by computer algorithms. As you may already know, algorithms can for instance learn to recognize objects based on examples. For this particular case that meant example images of darts in a board, with the accompanying scores as label. Since there’s no training set for this problem readily available we had to create our own set of labeled data. One approach could have been to place darts in a board, take a picture, and note the score to create the training image set. We took a different approach using an electronic dartboard. Belgian colleague and project initiator Véronique van Vlasselaer was kind enough to prepare one of these by cutting the connection to the built in display and solder the cables to an Arduino board.

By doing this the dartboard becomes a keyboard where every dart thrown results in the correct score being sent to a connected laptop. The next challenge is to collect images. For that task we hooked up a conference webcam and developed a Python script that combines both pieces of input and stores them every time the dartboard is hit by a dart. Then we had to collect training data, and lots of it because we needed multiple examples for each of the 62 possible cases. Which in this case meant, throwing lots of darts.

In parallel we started working on the other parts of the solution: developing the deep learning model using SAS Visual Data Mining & Machine Learning to determine the correct score based on the images, and setting up the realtime video analysis solution with SAS Event Stream Processing. The latter is the proof of the pudding where ultimately the correct scores are being determined in real time. And since a model, once sufficiently trained, can be deployed in a real-time stream with the push of a button, every improvement could be applied to the ‘production’ environment within seconds. This gave us extremely fast turn-around times for model development and deployment.

Results

Two days of working hard in different teams (infra, data capture, analysis, realtime scoring) resulted in a first prototype which could already be used for some test runs. Our initial findings were that recognising the exact position of the darts in the board is rather problematic. One of the main challenges was to apply the model (built using images from an electronic board with white-tipped darts) on an official tournament board with steel-tip darts. Nevertheless, the results so far look very promising so we decided to set up a development and demo environment at both the Dutch and Belgian SAS office. This enables the various teams to improve the solution further. It’s also a great opportunity for both colleagues and visitors to stop by and see how we’re progressing. Plus, we still need more training data. That means: lots of darting!