YOLO-BS Hockey Player Tracking System

October 2022 - April 2023

In a group of 5 other Integrated Engineering (IGEN) students, we worked on capstone project as part of our IGEN 230 course at UBC. We utilized 3 different software methods to track hockey players in pre-recorded games of the UBC Men's Ice Hockey team.

Using homography, background subtracting, and object detection methods to track hockey players (and other objects in the video clip), we can further the tracking analyses with physical trackers such as accelerometers. 

Hockey Player Tracking System
YOLO-BS IGEN 230 Poster
Figure 1. The Poster we used for our presentation at UBC's Design and Innovation Day 2023.
Figure 2. A single phototransistor connected on a breadboard according to Figure 1.
Figure 3. Testing the motor connection to the h-bridge.
Figure 4. Drawings of my sensor bracket with dimensional specifications.
Figure 5. The four track challenges the robot faced.
Figure 6. Right view of the final product
Figure 7. Bottom view of the final product.
Figure 8. Final product in action! (Screen captured from a video)
YOLO-BS IGEN 230 Poster

YOLO-BS IGEN 230 Poster

Design Tests

Shortly after beginning this project, we realised that building the entire player tracking and data collection system was too ambitious of a challenge to complete by Design and Innovation Day. Our revised goal was to develop a computer vision system that could recognize five Thunderbirds’ players and five opposing players as they competed against each other in one of the offensive or defensive zones, using game footage from a single perspective. The system should enclose each player in a bounding box and label each box to identify the player as playing for UBC or the opponent. This would be a proof of concept for a larger project that could track player positioning along the entire ice rink. Accomplishing this goal would be a big step towards putting the UBC Thunderbirds on the forefront of innovation in university hockey and give UBC an advantage over its competitors in its pursuit of national glory. 

Challenge: Speed Factor

The main challenge I faced with this project was the setting the motors at an appropriate speed. There were instances when the speed would decrease inadvertently due to the lack of power supplied from the batteries. This required me to constantly replace the batteries while keeping the other components intact as the phototransistor sensors were easily detached. Moreover I found that the robot required different speeds depending on the track it ran through because of the track features, such as 90 degree turns, hairpins, and breaks in the line.

My solution to this speed issue was to troubleshoot and change the motor speed using the Arduino app whenever required, as well as implementing delay functions to slow down the sensor reading times.

Result

Since my professor wanted us to all create different looking robots, he insisted us to incorporate decorative pieces. In Figure 8, my robot is shown with a red 3D printed box (intended to look like a gift box car) with a cardboard Christmas tree and LED lights lining the tree.

My robot was able to successfully complete tracks one through three but not the fourth track prior to the deadline. My code can be found on my GitHub account here.