This commit is contained in:
Glenn Jocher 2019-06-24 14:13:16 +02:00
parent c56516ec11
commit 1827b79647
1 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ class LoadImages: # for inference
print('image %g/%g %s: ' % (self.count, self.nF, path), end='') print('image %g/%g %s: ' % (self.count, self.nF, path), end='')
# Padded resize # Padded resize
img, _, _, _ = letterbox(img0, new_shape=self.height) img, *_ = letterbox(img0, new_shape=self.height)
# Normalize RGB # Normalize RGB
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB
@ -116,7 +116,7 @@ class LoadWebcam: # for inference
print('webcam %g: ' % self.count, end='') print('webcam %g: ' % self.count, end='')
# Padded resize # Padded resize
img, _, _, _ = letterbox(img0, new_shape=self.height) img, *_ = letterbox(img0, new_shape=self.height)
# Normalize RGB # Normalize RGB
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB