Detecting ATWs (Around the world soccer trick) more reliable
Hello guys,
I have been struggling with a precise counter for AWTs. You basically circle your foot around the ball while the ball is not touching the ground.
The pipeline that ended up "working":
Detect ball + both ankles per frame.
Ball "coast" through dropouts. The ball's detection collapses to ~0% confidence exactly during the trick — it's small, motion-blurred, and half-hidden behind the leg at the worst moment. Fix: when confidence drops, predict the ball's position from its last velocity (constant-velocity coast) instead of trusting the garbage detection.
Track the active foot (the big one). The nastiest bug: if you just pick "the more confident ankle," the marker jumps to the planted (standing) foot — because the trick foot is raised/blurred/low-confidence while the planted foot sits there at high confidence. Fix: track the ankle nearest the ball = the foot actually doing the trick.
De-jitter the foot. Reject physically-impossible teleports (a foot can't move half the frame in one frame) and coast through them with velocity.
Count = ball vertical tosses. Each ATW tosses the ball up once, so I count the peaks in ball height (local maxima of the ball going up), with a prominence threshold + minimum time separation to avoid double-counts.
As you can see not every atw was counted though, especially when the ball is not visible clearly. Any tips how I can improve this? Thanks