So far I’ve been unable to get tracking to work. I’d really appreciate if anyone could give me some insights into how you’ve been able to make it work for you.
I’m running into two main issues so far:
The play is out of frame the majority of the time
The “camera” sporadically snaps away for a single frame
I’ve uploaded 30 seconds of footage so you can see examples of the above:
Based on my testing I suspect that the model can’t locate the ball a majority of the time (am I supposed to be using something other than yolo26n.onnx?). Perhaps it’s an issue with my footage? I exported the AI debug events .jsonl and am trying to figure out how to use visualize_detections.py at the moment.
I’ve tried with and without ROI as well as 20 different combinations of AI tracking settings including field and ball tracking, detection every 1 to every 30 frames, the ‘broadcast’, ‘action’ and ‘frame_all’ presets, ‘action’ and ‘frame_all’ framing, horizontal pitch lock, lookahead between 0 and 2.2s (ran out of VRAM above 2.2), and a bunch of different ball weights, dead-zones, and FOVs. None of it has produced usable footage so far.
I believe the video above was exported with the following:
Tracking mode: field
Detect every N frames: 3
Style preset: broadcast
Framing: action
Lock: off
Lookahead: 0.5s
Cluster mode: density
Ball weight: 0.2
Cluster bandwidth: 0.3 rad
Dead-zone: 0.2 rad
FOVs
Tight: 22, Default: 40, Wide: 58
And I used the following ROI for one of the cameras (is this too restrictive?):
A little update on this - I ran the detection visualiser on a snippet of the game footage. This has confirmed that the model really is struggling to identify the ball even in situations where to my human eye it’s very clear where it is (example below). Most of the time the ball isn’t detected, and when it is, the confidence is low and the detection is brief and sporadic.
I’m a complete novice to all this but I guess my next step will be to see if I can train the model on my footage. No idea how feasible this is or how I would even begin so if anyone wants to save me some time, please feel free share some knowledge on the topic.
iam working on a data friendly solution which separates the modelling from the data so that everyone just shares the improvement and participates from the improvement of others. Hopefully it will work till Friday the 28th. So if you are not in a hurry I might have a cool proposal
To be honest, if I knew, I would have published the solution. I did train many models locally, some of them which are really convincing. But they do not meet the quality I am hoping for, yet. So until I come up with something good, I am not legitimate to give advice on this.
But the models I trained will surely pickup the ball in your example. But I am keeping in mind many other variables such as inference speed, model size, copyrights over the data, etc…
I am confident we will soon resolve that issue, and start hopefully looking at analytics : ) (by “we”, I mean the community)
It might give great results if you train it on your own data. On my end, I am trying to have a model that works well for a wider range of footage: indoor, outdoor, night time, etc… which makes the task harder.
Thanks for the link Mohamed - I trained a YOLOs model on my footage and the ball detection has improved measurably but this hasn’t addressed the camera jumping issue which is even more debilitating than imperfect ball tracking.
I initially assumed this was caused by brief false positive ball detections causing the camera to focus on them before snapping back to the real ball. After analysing my footage this doesn’t appear to be the case.
In the frames below you can see that there is one consistent ball detection for 4 subsequent frames (frame 6452 is missing - I’m not sure why but it happens often), and yet the virtual camera makes a massive jump at frame 6450 to focus on seemingly nothing in particular before snapping back quickly.
Have you seen this before? I assume it’s something to do with how the panners and trackers function but I just can’t understand it yet.
I generated the screenshots below with lookahead off based on the assumption that this way any camera jumps should be caused by detection events occurring on the same frame but I’m not sure if this is right.
I have released the Alpha of a local training approach. Please feel free to test it. Next step is the model comparison. It works well on my Mac and I have included versions for windows and linux and docker but they lack GPU support.