Answers.Body: <p>I always like to think that <em>Theoretically</em>, if there exists some function <span class="math-container">$f:R \rightarrow B$</span> that maps the set of points <span class="math-container">$R$</span> which represent your reference object to the set of points <span class="math-container">$B$</span> which represent your target object, then there should be a network <span class="math-container">$N_\theta$</span> that approximates <span class="math-container">$f$</span> with arbitrarily small precision. Sadly for us, it may be very difficult to find <span class="math-container">$N_\theta$</span>, but hey let's try anyway!</p>
  <p>In terms of the algorithmic approach, your suggestion seems likely. Another possibility would be to try and formulate a basic CNN that takes in normalized images of the reference object and outputs a <span class="math-container">$(x,y)$</span> that will represent the center of your target object. For that, of course, you will have to create data that consists only of images of rotated + scaled version of your initial reference object and labels that are the center points <span class="math-container">$\{(x_i,y_i)\}$</span> of the target object.</p>
  <p>It might also be reasonable to consider transfer-learning using some pre-trained ImageNet-based network, as those were shown to improve results even for very different datasets (compared to ImageNet)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-03T15:29:01.263Z
Answers.Text: Thanks for your reply, it's very interesting. Could you give me an example of how you would proceed? to me it is not clear how with an object detection problem a CNN would predict something which is not there. I was considering reinforcement learning just as an example since it is used to "predict" next moves like in games and so on. So I was interested in this concept. Thanks!
Answers.UserDisplayName: Diauro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-30T19:03:22.813Z
Answers.LastActivityDate: 2022-09-30T19:03:22.813Z
Answers.UserDisplayName: Hadar Sharvit
Body: <p>I know that the title might be redundant but I'm trying to understand if there is way to predict where a specific object will be if I provide a certain object as a reference.</p>
  <p>See as an example the image <a href="https://i.sstatic.net/k1LOJ.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/k1LOJ.jpg" alt="image example" /></a>. The red object (which can be provided as a set of coordinates) in always present as a feature. The blue object is the  one to be predicted. In general the red polygon can vary (more elongated, larger or smaller) and the blue object change its position wrt the red one.</p>
  <p>I am thinking, if possible, about a system where in a first training phase I provide both the objects with the blue object been the target of my training.</p>
  <p>In a test phase I would provide only the red object and let the system try to guess where the blue object will be.</p>
  <p>The underlying relation between the two objects relative position is not well understood in general so my idea was trying to understand if out there is something that could generalize and approach this problem.</p>
  <p>It might be a conceptual question for the moment, in case more details are needed I would be happy to discuss them.</p>
  <p>Thanks!</p>
  
Tags: <convolutional-neural-networks><object-detection>
Title: Detecting object position given the relative position of another object
UserDisplayName: Diauro
ThreadText: # Detecting object position given the relative position of another object
  
  (Asked by: username_0 on 2022-09-29)
  
  I know that the title might be redundant but I'm trying to understand if there is way to predict where a specific object will be if I provide a certain object as a reference.
  
  See as an example the image [![image example](https://i.sstatic.net/k1LOJ.jpg)](https://i.sstatic.net/k1LOJ.jpg). The red object (which can be provided as a set of coordinates) in always present as a feature. The blue object is the one to be predicted. In general the red polygon can vary (more elongated, larger or smaller) and the blue object change its position wrt the red one.
  
  I am thinking, if possible, about a system where in a first training phase I provide both the objects with the blue object been the target of my training.
  
  In a test phase I would provide only the red object and let the system try to guess where the blue object will be.
  
  The underlying relation between the two objects relative position is not well understood in general so my idea was trying to understand if out there is something that could generalize and approach this problem.
  
  It might be a conceptual question for the moment, in case more details are needed I would be happy to discuss them.
  
  Thanks!
  
  **Tags:** convolutional-neural-networks, object-detection
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-09-30. Score: 1
  
  I always like to think that *Theoretically*, if there exists some function $f:R \rightarrow B$ that maps the set of points $R$ which represent your reference object to the set of points $B$ which represent your target object, then there should be a network $N\_\theta$ that approximates $f$ with arbitrarily small precision. Sadly for us, it may be very difficult to find $N\_\theta$, but hey let's try anyway!
  
  In terms of the algorithmic approach, your suggestion seems likely. Another possibility would be to try and formulate a basic CNN that takes in normalized images of the reference object and outputs a $(x,y)$ that will represent the center of your target object. For that, of course, you will have to create data that consists only of images of rotated + scaled version of your initial reference object and labels that are the center points $\{(x\_i,y\_i)\}$ of the target object.
  
  It might also be reasonable to consider transfer-learning using some pre-trained ImageNet-based network, as those were shown to improve results even for very different datasets (compared to ImageNet)
  
  > **Comments:**
  > **username_0**: Thanks for your reply, it's very interesting. Could you give me an example of how you would proceed? to me it is not clear how with an object detection problem a CNN would predict something which is not there. I was considering reinforcement learning just as an example since it is used to "predict" next moves like in games and so on. So I was interested in this concept. Thanks!  
  
  ---
  
  