8000 Enable `results.print()` when `_verbose=False` (#7558) · brinkqiang2python/yolov5@be67572 · GitHub
[go: up one dir, main page]

Skip to content

Commit be67572

Browse files
authored
Enable results.print() when _verbose=False (ultralytics#7558)
Follows implementation of _verbose flag for PyTorch Hub models. Currently these are so silent that result.print() does nothing 😂
1 parent 7043872 commit be67572

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

models/common.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def display(self, pprint=False, show=False, save=False, crop=False, render=False
629629

630630
im = Image.fromarray(im.astype(np.uint8)) if isinstance(im, np.ndarray) else im # from np
631631
if pprint:
632-
LOGGER.info(s.rstrip(', '))
632+
print(s.rstrip(', '))
633633
if show:
634634
im.show(self.files[i]) # show
635635
if save:
@@ -646,8 +646,7 @@ def display(self, pprint=False, show=False, save=False, crop=False, render=False
646646

647647
def print(self):
648648
self.display(pprint=True) # print results
649-
LOGGER.info(f'Speed: %.1fms pre-process, %.1fms inference, %.1fms NMS per image at shape {tuple(self.s)}' %
650-
self.t)
649+
print(f'Speed: %.1fms pre-process, %.1fms inference, %.1fms NMS per image at shape {tuple(self.s)}' % self.t)
651650

652651
def show(self, labels=True):
653652
self.display(show=True, labels=labels) # show results

0 commit comments

Comments
 (0)
0