Answers.Body: <p>It's straightforward in theory, although in practice might depend on your codebase. There is a classification head or network that takes the bounding boxes and gives you class probabilities (e.g. see <a href="https://github.com/WongKinYiu/yolov7/blob/3b41c2cc709628a8c1966931e696b14c11d6db0c/utils/general.py#L876" rel="nofollow noreferrer">here</a>). What you do is to keep the bounding boxes with high class probability on the class you're interested in. If you want to detect cups, you need to find what's the cups class and then filter according to that class (e.g. <code>pred_cls2 == 5</code> if <code>5</code> is the &quot;cups&quot; index).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-07T19:51:16.110Z
Answers.LastActivityDate: 2023-04-07T19:51:16.110Z
Answers.UserDisplayName: Franco Marchesoni
Body: <p>So Yolov7/v8 are able to classify numerous distinct objects. One of those objects is cups for example. If I wanted to only look of cups how would I change my setup without having to do custom object identification?</p>
  
Tags: <object-detection><object-recognition><object-tracking>
Title: How can I limit the number of things Yolov7 can Identify?
UserDisplayName: Drew Patton
ThreadText: # How can I limit the number of things Yolov7 can Identify?
  
  (Asked by: username_0 on 2023-04-07)
  
  So Yolov7/v8 are able to classify numerous distinct objects. One of those objects is cups for example. If I wanted to only look of cups how would I change my setup without having to do custom object identification?
  
  **Tags:** object-detection, object-recognition, object-tracking
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-04-07. Score: 0 | Accepted answer
  
  It's straightforward in theory, although in practice might depend on your codebase. There is a classification head or network that takes the bounding boxes and gives you class probabilities (e.g. see [here](https://github.com/WongKinYiu/yolov7/blob/3b41c2cc709628a8c1966931e696b14c11d6db0c/utils/general.py#L876)). What you do is to keep the bounding boxes with high class probability on the class you're interested in. If you want to detect cups, you need to find what's the cups class and then filter according to that class (e.g. `pred_cls2 == 5` if `5` is the "cups" index).
  
  
  ---
  
  