Hockey players enter rink. [Photo by Spencer Colby]
The Carleton Raven's men's hockey team heading out on the ice on Nov. 4, 2021 [Photo by Spencer Colby].

University of Waterloo researchers are developing an artificial intelligence (AI) system for tracking sports statistics.

The team from Waterloo’s Systems Design Engineering department uses machine learning to track ice hockey players on the rink. 

A new addition to this system is PhD candidate Kanav Vats’s thesis project, which identifies and tracks ice hockey players using multitask learning. Multitask learning is a machine learning method that teaches computers to jointly complete certain tasks. 

Vats, an international student from India, is doing his PhD in machine learning and computer vision. He completed a bachelor’s and master’s in applied mathematics at the Indian Institute of Technology Roorkee. 

He finished his co-op at Waterloo while completing his master’s. During his studies, Vats worked on pose estimation in ice hockey, the process through which a computer understands a player’s orientation. He grew interested in the overall hockey player tracking project, saying that the challenge is what intrigued him.

“As sports analytics is concerned, you can apply a lot, you can learn a lot of things in computer vision because they are simultaneously applied,” Vats said. “You get to learn a lot of problems together.”

He returned to the University of Waterloo’s same lab as a PhD student to work on his player identification project.

The hypothesis for the project is that using multitask learning to identify hockey players can improve computer estimation accuracy.

For this project, the system identifies both a player’s jersey number as a whole and as two digits. Identifying these two numbers helps increase estimation accuracy to 90 per cent. This is two to three per cent more accurate than identifying using just one technique and nearly 10 per cent more accurate than the work done by previous data scientists.

The system then integrates these numbers into the larger system being built by Vats’s lab at Waterloo.

According to Vats, the system is like a pipeline with different sections, each completing a task in the player tracking process. 

“The input to the pipeline is a broadcast,” Vats said. “After that, we track the players using a tracking algorithm, we obtain tracks of each and every individual player who is skating. After that, we identify what team they belong to.”

Next is identifying each skater as a specific player. One of the challenges of identifying players is their similar appearances. Unlike sports such as basketball or soccer, hockey players wear large pads. They all have matching helmets, visors obscuring their faces and equipment covering their arms, hands and legs.

The only distinguishable element of players is the number and name on jerseys. Vats used multitask learning to teach the system to identify each number. 

The AI network was given a data set of tens of thousands of hockey player images. The AI then learned to identify the two-digit number in its entirety and as individual digits. This multitask learning method allows the computer to better estimate the outcome.

This system can also log where each player is on the ice at any time. Player location is important for calculating advanced stats used by analysts, scouts and fans alike. Unlike simple statistics such as shooting percentage, which only accounts for which player took the shot, advanced statistics consider the location of all players involved in a play.

Currently, analysts spend hours manually tracking hockey games and painstakingly logging every player’s location on the ice after each shot. With an AI system, this job can be done in minutes. 

The NHL is in the process of implementing a sensor-based player tracking system. Each player has a sensor embedded in their pads that is tracked by a mix of receivers and cameras. Though the system is accurate and fast, it is also costly.

“The NHL can afford that kind of a system, but it’s really expensive,” Vats said. “There are other leagues which don’t have the financial means to use that kind of a tracking system. A system that purely uses computer vision is a cheaper alternative because all you need is a video.”

Vats’s system unlocks the potential to extract more data from more games and leagues than ever before. Games recorded on video can have advanced statistics extracted at a much lower cost and in less time—an enticing prospect for scouts trying to analyze players from around the globe.

The team has many steps ahead as they continue to improve the system. Vats said the team is exploring ways to improve player identification accuracy. 

“We are investigating whether the location of the players on the ice rink can narrow down our search,” he said. 

Players don’t randomly move around. Since certain players occupy specific areas of the ice, combining knowledge of where players often skate could improve identification accuracy. 

The team has plans to publicize their data set so other researchers can add to their work in the future. They said they believe that the system can be adapted for other sports as well.


Featured image by Spencer Colby.