Add ops.py comment for `nm` = number of masks (#13353)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/13324/head^2
kubade-ashish 5 months ago committed by GitHub
parent 993ba7a20b
commit 4dac70cad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/utils/ops.py

@ -215,7 +215,7 @@ def non_max_suppression(
bs = prediction.shape[0] # batch size
nc = nc or (prediction.shape[1] - 4) # number of classes
nm = prediction.shape[1] - nc - 4
nm = prediction.shape[1] - nc - 4 # number of masks
mi = 4 + nc # mask start index
xc = prediction[:, 4:mi].amax(1) > conf_thres # candidates

Loading…
Cancel
Save