Answers.Body: <p>A long shot: <a href="http://openaccess.thecvf.com/content_ICCV_2017/papers/Lee_Semantic_Line_Detection_ICCV_2017_paper.pdf" rel="nofollow noreferrer">these guys</a> have worked on a problem that might be relevant. They define "semantic" lines as lines delimiting significant regions or objects in an image. To detect such lines, they use the conv layers from a pre-trained VGG16 net and then add their own layers on top. The cool thing about their approach is that they run both classification <em>and</em> regression in parallel on the same network.</p>
  
  <p>You might be able to adopt a similar technique to determine <em>where</em> the line is, and then run some simple analysis on the extracted line to determine the offset and the orientation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-05T12:18:36.390Z
Answers.LastActivityDate: 2018-07-05T12:18:36.390Z
Answers.UserDisplayName: cantordust
Body: <p>Imagine that a line divides an image in two regions which (slightly) differ in terms of texture and color. It is not a perfect, artificial line but rather a thin transition zone. I want to build a neural network which is able to infer geometrical information on this line (orientation and offset). The image may also contain other elements which are not relevant for the task. Now, would a classical CNN be suitable for this task? How complex should it be in terms of number of convolutions (and number of layers, in general)?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-04T12:26:46.470Z
Comments.Text: Do you have any requirements about the format of the network's output? Perhaps the orientation can be expressed in terms of the sine of the angle relative to the horizontal axis. Also, maybe it would be worth preprocessing the images with an edge detector before feeding them to the net.
Comments.UserDisplayName: cantordust
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-04T12:30:23.330Z
Comments.Text: No, I don't have any requirements. I am not sure about the edge detection because the texture can be useful in distinguishing the two areas
Comments.UserDisplayName: firion
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-04T12:37:44.977Z
Comments.Text: How large are the images? Are they all the same size? Also, your filter size would probably depend on the width of the transition zone.
Comments.UserDisplayName: cantordust
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-04T12:39:05.180Z
Comments.Text: When you say offset, do you mean offset from one of the edges of the image? How should that be measured if the line is slanted?
Comments.UserDisplayName: cantordust
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-04T13:19:13.000Z
Comments.Text: The images are 320x215. By offset I mean the point where the line meets the bottom side of the image, but it can be defined in other ways
Comments.UserDisplayName: firion
Tags: <convolutional-neural-networks>
Title: Neural network architecture for line orientation prediction
UserDisplayName: firion
ThreadText: # Neural network architecture for line orientation prediction
  
  (Asked by: username_0 on 2018-07-03)
  
  Imagine that a line divides an image in two regions which (slightly) differ in terms of texture and color. It is not a perfect, artificial line but rather a thin transition zone. I want to build a neural network which is able to infer geometrical information on this line (orientation and offset). The image may also contain other elements which are not relevant for the task. Now, would a classical CNN be suitable for this task? How complex should it be in terms of number of convolutions (and number of layers, in general)?
  
  **Tags:** convolutional-neural-networks
  
  > **Comments:**
  > **username_1**: Do you have any requirements about the format of the network's output? Perhaps the orientation can be expressed in terms of the sine of the angle relative to the horizontal axis. Also, maybe it would be worth preprocessing the images with an edge detector before feeding them to the net.  
  > **username_0**: No, I don't have any requirements. I am not sure about the edge detection because the texture can be useful in distinguishing the two areas  
  > **username_1**: How large are the images? Are they all the same size? Also, your filter size would probably depend on the width of the transition zone.  
  > **username_1**: When you say offset, do you mean offset from one of the edges of the image? How should that be measured if the line is slanted?  
  > **username_0**: The images are 320x215. By offset I mean the point where the line meets the bottom side of the image, but it can be defined in other ways  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-05. Score: 1
  
  A long shot: [these guys](http://openaccess.thecvf.com/content_ICCV_2017/papers/Lee_Semantic_Line_Detection_ICCV_2017_paper.pdf) have worked on a problem that might be relevant. They define "semantic" lines as lines delimiting significant regions or objects in an image. To detect such lines, they use the conv layers from a pre-trained VGG16 net and then add their own layers on top. The cool thing about their approach is that they run both classification *and* regression in parallel on the same network.
  
  You might be able to adopt a similar technique to determine *where* the line is, and then run some simple analysis on the extracted line to determine the offset and the orientation.
  
  
  ---
  
  