Support online tracking
Related issue
https://github.com/TrackingLaboratory/tracklab/issues/17
Updated 2025-06-11
This MR should be now ready for review.
I have tidied up the code and move the relevant parts to here.
Have it working with soccernet sn-gamestate with some minimal changes: https://github.com/ptgamr/sn-gamestate/commits/online-tracking/ . I added soccernet_online.yaml to have the online tracking pipeline, comment out parts that aren't compatible (ie. those VideoLevelModule). Run it via following cmd:
uv run tracklab -cn soccernet_online
I am unsure how to change the code so that I don't need to change this in sn-gamestate
This is a demo video:
We need to clean the printings and test the PR. Thank you for your contribution.
Sorry @bstandaert , I must have created this PR by mistake some how - it is still very much experimental from my end, not ready to merge yet... I changed it to draft for now...
Also, @bstandaert - how should I test the PR?
I have it kinda working with sn-gamestate challenge.. but I have to commented out these module... perhaps because they're VideoLevelModule and it's not suitable with ONLINE?
# - modules/team: kmeans_embeddings
# - modules/team_side: mean_position
# - modules/tracklet_agg: voting_role_jn
Here is the branch if you're interested: https://github.com/ptgamr/sn-gamestate/commits/online-tracking/ (I've have some difficulty showing some GUI because both open-cv and open-cv-headless both installed, I have to remove open-cv-headless)
Aso, I think I need to move this custom "visualization engine" I wrote to this repo:
https://github.com/ptgamr/sn-gamestate/blob/online-tracking/sn_gamestate/visualization/online_visualization_engine.py
You're right, the VideoLevelModule is not compatible with online tracking. The best thing would probably be to display a clear error to the user when there are VideoLevelModules and you want to do online tracking.
For testing, you should make sure it works with the default video, and the default config (except for using the online engine in place of the offline engine). You can go further by checking everything works with the defaults of sn-gamestate (as you've already done) and CAMELTrack.
@bstandaert @victorjoos I have tidy up the MR and would love to have a review from you guys.
Cheers, Anh
Hi @ptgamr,
I'm sorry this takes so much time, I just started a new job, so don't have too much bandwidth for this right now.
I'll try to look into this on Friday.
@victorjoos I hope you are setting in with your new job. Just want to give this a nudge, as it is still fresh in my mind so I can address thing quickly if needed be.