Body: <p>I am computing true positives, false positives, and false negatives in order to calculate my model's precision and recall. I am using YOLOv5.</p>
  <p>According to <a href="https://towardsdatascience.com/evaluating-performance-of-an-object-detection-model-137a349c517b" rel="nofollow noreferrer">this source</a> and <a href="https://link.springer.com/chapter/10.1007/978-3-319-54193-8_13" rel="nofollow noreferrer">this one</a>, an IoU overlap between the predicted and ground truth bounding box greater than 50% is a true positive detection (we are assuming we set the IoU threshold at 0.5), and an overlap less than 50% is considered to be a false positive.</p>
  <p>Let's say you have multiple objects in your image that you are detecting. You label one object as &quot;class A&quot;, but the model predicts it as &quot;class B.&quot; Am I correct that this is also a false positive? As I understand it, there are two ways of getting a false positive: Achieving an IoU overlap of less than 50% of the correctly-predicted class, and identifying any overlap of an incorrect class?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-24T20:50:15.887Z
Comments.Text: Rather than saying "Question about", just put your **specific question** in the title. thanks.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-25T17:30:09.510Z
Comments.Text: AFAIK, talking about false/true positive/negatives makes sense in the context of binary classification. I guess you're considering the multi-class classification problem. If A is your "positive" class, then if the model predicts B, then this is a false negative. If B was the "positive" class and the model predicted B and the actual class of the object was A (i.e. negative), then it would be a false positive. Is this your question?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-25T22:54:54.503Z
Comments.Text: @nbro More along the lines of a two-class object detector being trained to identify two objects. If I drew a bounding box and labeled a "car" during training, and the algorithm identifies a "truck." Would that be a false positive prediction? It is saying that something is there in the bounding box, but the algorithm is just incorrect in its prediction.
Comments.UserDisplayName: sneeze_shiny
Tags: <deep-learning><convolutional-neural-networks><object-detection>
Title: Question about true positive and false positive detections in object detection
UserDisplayName: sneeze_shiny
ThreadText: # Question about true positive and false positive detections in object detection
  
  (Asked by: username_0 on 2022-02-24)
  
  I am computing true positives, false positives, and false negatives in order to calculate my model's precision and recall. I am using YOLOv5.
  
  According to [this source](https://towardsdatascience.com/evaluating-performance-of-an-object-detection-model-137a349c517b) and [this one](https://link.springer.com/chapter/10.1007/978-3-319-54193-8_13), an IoU overlap between the predicted and ground truth bounding box greater than 50% is a true positive detection (we are assuming we set the IoU threshold at 0.5), and an overlap less than 50% is considered to be a false positive.
  
  Let's say you have multiple objects in your image that you are detecting. You label one object as "class A", but the model predicts it as "class B." Am I correct that this is also a false positive? As I understand it, there are two ways of getting a false positive: Achieving an IoU overlap of less than 50% of the correctly-predicted class, and identifying any overlap of an incorrect class?
  
  **Tags:** deep-learning, convolutional-neural-networks, object-detection
  
  > **Comments:**
  > **username_1**: Rather than saying "Question about", just put your **specific question** in the title. thanks.  
  > **username_1**: AFAIK, talking about false/true positive/negatives makes sense in the context of binary classification. I guess you're considering the multi-class classification problem. If A is your "positive" class, then if the model predicts B, then this is a false negative. If B was the "positive" class and the model predicted B and the actual class of the object was A (i.e. negative), then it would be a false positive. Is this your question?  
  > **username_0**: @username_1 More along the lines of a two-class object detector being trained to identify two objects. If I drew a bounding box and labeled a "car" during training, and the algorithm identifies a "truck." Would that be a false positive prediction? It is saying that something is there in the bounding box, but the algorithm is just incorrect in its prediction.  
  
  ---
  
  ## 0 answers
  
  