Update inference multiple-counting (#2019)

* Update inference multiple-counting

* update github check
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-01-22 15:39:08 -08:00
1 parent 85b75d6018
commit aac33f87ad
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -248,7 +248,7 @@ class Detections:
if pred is not None:
for c in pred[:, -1].unique():
n = (pred[:, -1] == c).sum() # detections per class
str += f'{n} {self.names[int(c)]}s, ' # add to string
str += f"{n} {self.names[int(c)]}{'s' * (n > 1)}, " # add to string
if show or save or render:
img = Image.fromarray(img.astype(np.uint8)) if isinstance(img, np.ndarray) else img # from np
for *box, conf, cls in pred: # xyxy, confidence, class