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)?

  • $\begingroup$ 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. $\endgroup$ – cantordust Jul 4 '18 at 12:26
  • $\begingroup$ 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 $\endgroup$ – firion Jul 4 '18 at 12:30
  • $\begingroup$ 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. $\endgroup$ – cantordust Jul 4 '18 at 12:37
  • $\begingroup$ 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? $\endgroup$ – cantordust Jul 4 '18 at 12:39
  • $\begingroup$ 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 $\endgroup$ – firion Jul 4 '18 at 13:19

A long shot: these guys 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.