Answers.Body: <p>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.</p>
  
  <p>The following paper <a href="https://www.researchgate.net/publication/325030263_Soccer_Event_Detection" rel="nofollow noreferrer">Soccer Event Detection</a>, by Abdullah Khan1, Beatrice Lazzerini, Gaetano Calabrese and Luciano Serafini, presents an event detector for "Ball possession" and "Kicking the ball".</p>
  
  <p>A paper entitled <a href="https://arxiv.org/ftp/arxiv/papers/1810/1810.07550.pdf" rel="nofollow noreferrer">The Newton Scheme for Deep Learning</a> 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".</p>
  
  <p><a href="https://i.sstatic.net/CkglF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CkglF.png" alt="enter image description here"></a></p>
  
  <p>Some related articles and papers you might find of interest:</p>
  
  <ul>
  <li><a href="https://squared2020.com/2017/05/07/identifying-player-possession-in-spatio-temporal-data/" rel="nofollow noreferrer">Identifying Player Possession in Spatio-Temporal Data</a></li>
  <li><a href="http://cs231n.stanford.edu/reports/2016/pdfs/273_Report.pdf" rel="nofollow noreferrer">Deep Learning using CNNs for Ball-by-Ball Outcome Classification in Sports</a></li>
  <li><a href="https://arxiv.org/pdf/1511.02917.pdf" rel="nofollow noreferrer">Detecting events and key actors in multi-person videos</a></li>
  <li><a href="https://www.cs.ubc.ca/~murphyk/Papers/weilwun-pami12.pdf" rel="nofollow noreferrer">Learning to Track and Identify Players from Broadcast Sports Videos</a></li>
  <li><a href="http://blog.infinigraph.com/category/deep-learning/" rel="nofollow noreferrer">Video Artificial Intelligence Powers Creation</a></li>
  <li><a href="https://www.engadget.com/2017/03/06/deep-learning-studies-athlete-decisions/" rel="nofollow noreferrer">AI predicts how athletes will react in certain situations</a></li>
  <li><a href="https://adtmag.com/blogs/dev-watch/2017/07/sports-analytics.aspx" rel="nofollow noreferrer">How AI-Based Sports Analytics Is Changing the Game</a></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-26T19:20:52.273Z
Answers.LastActivityDate: 2018-12-26T19:20:52.273Z
Answers.UserDisplayName: Brian O'Donnell
Answers.Body: <p><strong>Requirements Analysis</strong></p>
  
  <p>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.</p>
  
  <p>We can consider the problem of determining ball position <span class="math-container">$(x, y, z)$</span> relative to a coordinate system superimposed onto the field where <span class="math-container">$(0, 0, 0)$</span> is the center point in team A's goal line and <span class="math-container">$(1, 0, 0)$</span> is the center of team B's goal line and  distances in <span class="math-container">$x$</span> are scaled similarly in <span class="math-container">$y$</span> and <span class="math-container">$z$</span>.</p>
  
  <p>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.</p>
  
  <ol>
  <li>Develop an unsupervised system that recognizes round objects in the air based on a model of balls.</li>
  <li>Locate the ball in all frames that have one and assign the ball position as a label for those frames.</li>
  <li>Use face recognition AI to locate eyes and label them.</li>
  <li>Use CNN feature extraction and a deep network to train functional correlation 
  between eye features and ball position</li>
  <li>Use the functional correlation on frames without a ball in the frame to locate it</li>
  </ol>
  
  <p>There are two dimensional challenges in using these techniques </p>
  
  <ul>
  <li>Lack of depth perception</li>
  <li>Orienting players in the field</li>
  </ul>
  
  <p>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: <a href="https://ai.stackexchange.com/search?q=user%3A4302+field+boundary">https://ai.stackexchange.com/search?q=user%3A4302+field+boundary</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-31T14:47:09.633Z
Answers.LastActivityDate: 2018-12-31T14:47:09.633Z
Answers.UserDisplayName: Douglas Daseeco
Body: <p>I am a novice developer in AI. Any help appropriated. </p>
  
  <p>I have a set of images and from that I want to predict position(x,y co-ordinates) of the Ball.<a href="https://i.sstatic.net/bXjN9.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bXjN9.jpg" alt="enter image description here"></a></p>
  
  <p>Thanks in advance.</p>
  
Tags: <machine-learning><computer-vision><tensorflow>
Title: I need to predict ball position from set of Images
UserDisplayName: D.P.
ThreadText: # I need to predict ball position from set of Images
  
  (Asked by: username_0 on 2018-12-26)
  
  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.[![enter image description here](https://i.sstatic.net/bXjN9.jpg)](https://i.sstatic.net/bXjN9.jpg)
  
  Thanks in advance.
  
  **Tags:** machine-learning, computer-vision, tensorflow
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-12-26. Score: 2
  
  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](https://www.researchgate.net/publication/325030263_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](https://arxiv.org/ftp/arxiv/papers/1810/1810.07550.pdf) 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".
  
  [![enter image description here](https://i.sstatic.net/CkglF.png)](https://i.sstatic.net/CkglF.png)
  
  Some related articles and papers you might find of interest:
  
  * [Identifying Player Possession in Spatio-Temporal Data](https://squared2020.com/2017/05/07/identifying-player-possession-in-spatio-temporal-data/)
  * [Deep Learning using CNNs for Ball-by-Ball Outcome Classification in Sports](http://cs231n.stanford.edu/reports/2016/pdfs/273_Report.pdf)
  * [Detecting events and key actors in multi-person videos](https://arxiv.org/pdf/1511.02917.pdf)
  * [Learning to Track and Identify Players from Broadcast Sports Videos](https://www.cs.ubc.ca/~murphyk/Papers/weilwun-pami12.pdf)
  * [Video Artificial Intelligence Powers Creation](http://blog.infinigraph.com/category/deep-learning/)
  * [AI predicts how athletes will react in certain situations](https://www.engadget.com/2017/03/06/deep-learning-studies-athlete-decisions/)
  * [How AI-Based Sports Analytics Is Changing the Game](https://adtmag.com/blogs/dev-watch/2017/07/sports-analytics.aspx)
  
  
  ---
  
  ### Answer by username_2 on 2018-12-31. Score: 0
  
  **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>.
  
  
  ---
  
  