In this post, I will show how I detect and track players using Yolov3, Opencv and SORT from video clip, and turn the detections to the bird’s-eye view as shown above.
In order to have a stable tracking and perspective transform, I need a video clip without camera moving around. I downloaded the video from IPL Ball Detection Datasets. Please be noted that the ball is not tracked in this project, it was already tracked (green bounding box) from the source.
Video input for this project (downloaded from here)
The first step is to load the video and detect the players.
I used the pre-trained Yolov3 weight and used Opencv’s dnn module and only selected detections classified as ‘person’.
I drew bounding boxes for detected players and their tails for previous ten frames.
Player tracking using Yolov3 and Opencv
Looks like the pre-trained model is doing quite okay.
Next I want to track the player and assign unique IDs to them. I used Alex Bewley’s SORT algorithm(simple online and realtime tracking), which I applied to my previous work.
#machine-learning #deep-learning #sports #soccer #artificial-intelligence #deep learning