# I need to predict ball position from set of Images

I am a novice developer in AI. Any help appropriated.

I have a set of images and from that I want to predict position(x,y co-ordinates) of the Ball.

• my guess is you'd need a decent sample to really narrow down where the players are looking (presumably at the ball) from many angles (to gauge actual spacial location.) This seems highly complex. – DukeZhou Dec 27 '18 at 21:24
• @DukeZhou yes exactly what I want. – D.P. Dec 31 '18 at 11:37

There are so many challenges here for a novice or even a very seasoned AI developer! There hasn't been a lot of development in this area. I assume you are working with broadcast video. Your biggest challenges will involve occlusions of the ball and changes in the view as broadcasters constantly switch cameras which have very different positions on the field or around the stadium. You will need to track the ball and the players that take action on the ball. The ball can be in motion from a player heading, kicking, or throwing the ball. The ball can also be in motion from a bounce off a player or the ground. To get started I recommend building off some work that at least can track the players and the ball and can identify certain actions such as a kick. If you start there you can build some type of ball trajectory predictor.

The following paper Soccer Event Detection, by Abdullah Khan1, Beatrice Lazzerini, Gaetano Calabrese and Luciano Serafini, presents an event detector for "Ball possession" and "Kicking the ball".

A paper entitled The Newton Scheme for Deep Learning by Junqing Qiu, Guoren Zhong, Yihua Lu, Kun Xin, Huihuan Qian, and Xi Zhu, addresses predicting the trajectory of a ball in sports. They address the complexities of a ball in motion. They address situations where "the ball is flying with a self-spinning, resulting in a Magnus force on it, which makes it difficult to predict the position by traditional methods".

Some related articles and papers you might find of interest:

• First, the image posted here with the ball trajectory is the same like in the paper “The newton scheme for deep learning”. Secondly, the idea described in the paper is wrong. There is a neural network given which can do what? This isn't explained. The overall workflow consists of two steps. At first, the forward simulation which is equal to a physics engine. And in reaction to the simulation, an agent has to be controlled which has to kick the ball. Prediction in the classical sense means only to build a prediction engine, which is a physics engine. A neural network is not needed in this step. – Manuel Rodriguez Dec 26 '18 at 21:52
• Thanks for your comments here.I just want to develop algorithm to predict ball position from images. – D.P. Dec 27 '18 at 6:48

Requirements Analysis

The term prediction has a temporal element, but the other text in comments indicates that the position of the ball relative to the field of play and goals at the time the image is taken is desired. Predicting where the ball is likely to be in some number of seconds is a much more difficult problem.

We can consider the problem of determining ball position $$(x, y, z)$$ relative to a coordinate system superimposed onto the field where $$(0, 0, 0)$$ is the center point in team A's goal line and $$(1, 0, 0)$$ is the center of team B's goal line and distances in $$x$$ are scaled similarly in $$y$$ and $$z$$.

Since some of the images may have the ball in the field of view, the beginnings of a solution may be available. The number of images would need to be large. If a sufficiently large set of images, some of which have the ball in view, were available, this process would likely produce a viable solution with satisfactory accuracy and reliability characteristics.

1. Develop an unsupervised system that recognizes round objects in the air based on a model of balls.
2. Locate the ball in all frames that have one and assign the ball position as a label for those frames.
3. Use face recognition AI to locate eyes and label them.
4. Use CNN feature extraction and a deep network to train functional correlation between eye features and ball position
5. Use the functional correlation on frames without a ball in the frame to locate it

There are two dimensional challenges in using these techniques

• Lack of depth perception
• Orienting players in the field

It is possible to train the trigonometric relations as part of item 4, however orienting players in the field may be untenable, rendering the entire project infeasible. The solution of this problem is dependent upon the solution of this one: https://ai.stackexchange.com/search?q=user%3A4302+field+boundary.