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>
This commit is contained in:
kubade-ashish 2024-06-04 18:08:52 +05:30 committed by GitHub
parent 993ba7a20b
commit 4dac70cad1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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