Football Pitch View Transformation Software
Budget: $30 – $40 USD
We need to apply view transformation to football pitch footage (from the sideline to be used to extract player positions like a top view), with which we can transform the positions of the players on the field to (x, y) positions that can be used to create an accurate 2d map of player movements, all the requests will have the same exact view from our custom camera, at the start of each request the exact pitch size (e.g. 105 m * 65 m) is provided alongside the footage and a csv file containing the (x, y) positions of these 7 points (example of the points’ location is provided on a sample footage, a csv file also with the points that will always have the same ordering are found in the attachments).
we need to use points 1 and 2 with the corner points (3 and 7) to find the middle point in the bottom half that is hidden, then we need to use the final 6 points with their correponding standard locations based on the provided pitch size to create a function that takes (x, y) positions of player feet (extracted by a computer vision model) and returns their (x, y) position on the pitch.
A margin of error No more than 3% of the pitch size is allowed, also no returns should be out of the actual pitch size so make sure of that, the function should adapt to inputs that are out of the pitch by approximating them to the most close point on the edge of the pitch, also take another input to the function that specifies whether it's a penalty, corner kick, throw-in or a normal point.
If it is a normal point continue with the normal approach, if it’s a penalty or a corner kick, the position returned should be the position of the closest corner flag / penalty spot, if it’s a throw-in the position returned should be approximated to the closest point on the edge of the pitch.
Finally, the python project source code to be handed, all we need is a function that can do that with the required accuracy and can adjust itself from a match to another.
we need to use points 1 and 2 with the corner points (3 and 7) to find the middle point in the bottom half that is hidden, then we need to use the final 6 points with their correponding standard locations based on the provided pitch size to create a function that takes (x, y) positions of player feet (extracted by a computer vision model) and returns their (x, y) position on the pitch.
A margin of error No more than 3% of the pitch size is allowed, also no returns should be out of the actual pitch size so make sure of that, the function should adapt to inputs that are out of the pitch by approximating them to the most close point on the edge of the pitch, also take another input to the function that specifies whether it's a penalty, corner kick, throw-in or a normal point.
If it is a normal point continue with the normal approach, if it’s a penalty or a corner kick, the position returned should be the position of the closest corner flag / penalty spot, if it’s a throw-in the position returned should be approximated to the closest point on the edge of the pitch.
Finally, the python project source code to be handed, all we need is a function that can do that with the required accuracy and can adjust itself from a match to another.