Body: <p>Let's say I'm looking for any item that has a certain shape (outline) in a photo. but I can further classify it only according to particular features, that most of them are expected to be shown only in a smaller area of the the object itself.</p>
  <p>How may I give more weight, in the model, to that particular area, in order to avoid wrong classification issues?</p>
  <p>What is the flow, and are there specific tools that should be used for that purpose?</p>
  <p>Example:</p>
  <p>I want to detect all triangles in the image, and try to classify them like this:
  If triangle has 3 lines in its corner, it's A type. if only two lines, it's B type.</p>
  <p>So the triangles outline composes 100% of the object, but we can see that the area where the red lines are present, is only about 10% of the object area. How may I give more weight and tell the model to carefully look for the details in that area, so it doesn't confuse A with B or vice versa, just because the other 90% of the shape is similar.</p>
  <p>And Of course, I want the certainty level to be as close as possible to 100%, for both A and B, and to be distinguished from the other option.</p>
  <p>So my goal is the get this output:</p>
  <p>Purple Triangle ==&gt; Type A, certainty, 99%. Type B: certainty: 50%</p>
  <p>Green Triangle ==&gt; Type B, certainty, 99%. Type A: certainty: 50%</p>
  <p><a href="https://i.sstatic.net/cSDot.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/cSDot.png" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T19:20:43.457Z
Comments.Text: Well I am new in the computer vision,depending, you could try to train a convolutional neural network:
  you should train classifier for lines and triangles. get the values in the before the las layer, kind of "the probability that with will be triangle and probablity this could be a two lines"
Comments.UserDisplayName: jal j alvarez alvarez
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T19:44:42.640Z
Comments.Text: So I don't know this for sure, but I think you could trains classifier that attempts to increase the classification gradients around these edges.
Comments.UserDisplayName: FourierFlux
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T21:56:12.967Z
Comments.Text: @jaljalvarezalvarez in my real use case there won't be actual lines, the idea is that I want to give more weight to particular elements that are supposed to be found at the base of the triangle, but those elements do not have a particular shape that I can pre-train.
Comments.UserDisplayName: Stackaloo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T22:07:24.967Z
Comments.Text: Its very interesting question..
Comments.UserDisplayName: jal j alvarez alvarez
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-31T22:42:21.227Z
Comments.Text: One of the main strengths of deep neural networks is that they can learn representation of the data. It should be able to figure out on it's own what are the relevant features without you telling it what is relevant. Alternatively, you can try hierarchical approach - First, detect your main object (e.g triangle), extract relevant part of that object and then do classification on that extracted part only.
Comments.UserDisplayName: Brale
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-01T13:10:53.660Z
Comments.Text: @Brale What kind of mechanisms are available to use in order to instruct the tool which part of the triangle is "relevant"?
Comments.UserDisplayName: Stackaloo
Tags: <neural-networks><machine-learning><convolutional-neural-networks><computer-vision>
Title: Computer vision - Can you put more weight on a specific part of the object?
UserDisplayName: Stackaloo
ThreadText: # Computer vision - Can you put more weight on a specific part of the object?
  
  (Asked by: username_0 on 2020-10-13)
  
  Let's say I'm looking for any item that has a certain shape (outline) in a photo. but I can further classify it only according to particular features, that most of them are expected to be shown only in a smaller area of the the object itself.
  
  How may I give more weight, in the model, to that particular area, in order to avoid wrong classification issues?
  
  What is the flow, and are there specific tools that should be used for that purpose?
  
  Example:
  
  I want to detect all triangles in the image, and try to classify them like this:
  If triangle has 3 lines in its corner, it's A type. if only two lines, it's B type.
  
  So the triangles outline composes 100% of the object, but we can see that the area where the red lines are present, is only about 10% of the object area. How may I give more weight and tell the model to carefully look for the details in that area, so it doesn't confuse A with B or vice versa, just because the other 90% of the shape is similar.
  
  And Of course, I want the certainty level to be as close as possible to 100%, for both A and B, and to be distinguished from the other option.
  
  So my goal is the get this output:
  
  Purple Triangle ==> Type A, certainty, 99%. Type B: certainty: 50%
  
  Green Triangle ==> Type B, certainty, 99%. Type A: certainty: 50%
  
  [![enter image description here](https://i.sstatic.net/cSDot.png)](https://i.sstatic.net/cSDot.png)
  
  **Tags:** neural-networks, machine-learning, convolutional-neural-networks, computer-vision
  
  > **Comments:**
  > **username_1**: Well I am new in the computer vision,depending, you could try to train a convolutional neural network: you should train classifier for lines and triangles. get the values in the before the las layer, kind of "the probability that with will be triangle and probablity this could be a two lines"  
  > **username_2**: So I don't know this for sure, but I think you could trains classifier that attempts to increase the classification gradients around these edges.  
  > **username_0**: @username_1 in my real use case there won't be actual lines, the idea is that I want to give more weight to particular elements that are supposed to be found at the base of the triangle, but those elements do not have a particular shape that I can pre-train.  
  > **username_1**: Its very interesting question..  
  > **username_3**: One of the main strengths of deep neural networks is that they can learn representation of the data. It should be able to figure out on it's own what are the relevant features without you telling it what is relevant. Alternatively, you can try hierarchical approach - First, detect your main object (e.g triangle), extract relevant part of that object and then do classification on that extracted part only.  
  > **username_0**: @username_3 What kind of mechanisms are available to use in order to instruct the tool which part of the triangle is "relevant"?  
  
  ---
  
  ## 0 answers
  
  