Answers.Body: <p>As you ask, &quot;in general...&quot;, I will answer generally, however this changes a lot from model to model and the way they handle close objects.</p>
  <p>In general, yes, they would do a poor job detecting very close objects, switch to segmentation models for that (for class or better, instance segmentation).</p>
  <p>In general, objects detectors learn to tell an object from other based in 2 criterion:</p>
  <ul>
  <li>Intersection over union: for object of the same class</li>
  <li>Class probability: for objects of different class</li>
  </ul>
  <p>So, if two objects of the same class are very close, the 2 detected bounding boxes will be highly overlapping, then, the Non Maximal Suppression filter will remove one of them. This is where objects detector, in general, perform worse.</p>
  <p>Similarly, if two objects belong to different classes the 2 detected bounding boxes will be highly overlapping but the NMS filter won't remove them (again, in general, NMS is set only for same class objects). However when 2 objects are very close, there is a high chance they are partially occluded. Objects detectors, in general, don't handle occlusions very well.</p>
  <p>So, in conclusion, objects detectors will perform better detecting far-away objects.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-08-02T11:47:42.740Z
Answers.LastActivityDate: 2020-08-02T11:47:42.740Z
Answers.UserDisplayName: JVGD
Body: <p>Suppose we have an object detector that is trained to detect <span class="math-container">$20$</span> products. If two objects are too close to each other, in general, would an object detector do a poor job of correctly classifying them? If they were far apart in the scene, would the object detector to a better job of correctly classifying them? </p>
  
Tags: <computer-vision><object-detection>
Title: If two objects are too close to each other, would an object detector do a poor job of correctly classifying them?
UserDisplayName: guest232323
ThreadText: # If two objects are too close to each other, would an object detector do a poor job of correctly classifying them?
  
  (Asked by: username_0 on 2020-04-27)
  
  Suppose we have an object detector that is trained to detect $20$ products. If two objects are too close to each other, in general, would an object detector do a poor job of correctly classifying them? If they were far apart in the scene, would the object detector to a better job of correctly classifying them?
  
  **Tags:** computer-vision, object-detection
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-08-02. Score: 1
  
  As you ask, "in general...", I will answer generally, however this changes a lot from model to model and the way they handle close objects.
  
  In general, yes, they would do a poor job detecting very close objects, switch to segmentation models for that (for class or better, instance segmentation).
  
  In general, objects detectors learn to tell an object from other based in 2 criterion:
  
  * Intersection over union: for object of the same class
  * Class probability: for objects of different class
  
  So, if two objects of the same class are very close, the 2 detected bounding boxes will be highly overlapping, then, the Non Maximal Suppression filter will remove one of them. This is where objects detector, in general, perform worse.
  
  Similarly, if two objects belong to different classes the 2 detected bounding boxes will be highly overlapping but the NMS filter won't remove them (again, in general, NMS is set only for same class objects). However when 2 objects are very close, there is a high chance they are partially occluded. Objects detectors, in general, don't handle occlusions very well.
  
  So, in conclusion, objects detectors will perform better detecting far-away objects.
  
  
  ---
  
  