Python Video Object Tracking Script

Job ID: 39743798

Budget: €30 – €250 EUR

I need a clean, well-documented Python script that can detect and track specific objects across a video file from start to finish.

Objects are:
- tennis ball
- player1, player2, player3, player4

Code:
- One-click command line usage: `python track.py`, inside the code set the input.mp4 and the output.mp4
- Input: input.mp4 (the video)
- Outputs:
-- marked.mp4 : video with contours on ball and players and labels on them
-- mask.mp4 : video in black displaying only players and ball

Accuracy expectations:
- The ball's position and direction speed must be estimated at all frames, even when the ball is not present, i.e. there should be always a guess. The estimate must have accuracy of 95% of times is right and guess window should not exceed the size of 1 player.
- The players' individual label must be consistent at all times, i.e. player1 is player1 from start to finish.