Browse Source

Enable `results.print()` when `_verbose=False` (#7558)

Follows implementation of _verbose flag for PyTorch Hub models. Currently these are so silent that result.print() does nothing 😂
modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
be67572279
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      models/common.py

+ 2
- 3
models/common.py View File

@@ -629,7 +629,7 @@ class Detections:

im = Image.fromarray(im.astype(np.uint8)) if isinstance(im, np.ndarray) else im # from np
if pprint:
LOGGER.info(s.rstrip(', '))
print(s.rstrip(', '))
if show:
im.show(self.files[i]) # show
if save:
@@ -646,8 +646,7 @@ class Detections:

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

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

Loading…
Cancel
Save