Update inference multiple-counting (#2019)
* Update inference multiple-counting * update github check
This commit is contained in:
1 parent
85b75d6018
commit
aac33f87ad
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user