This commit is contained in:
Glenn Jocher
2019-02-09 19:24:51 +01:00
parent a0936a4eac
commit a701374014
4 changed files with 18 additions and 25 deletions
+2 -1
View File
@@ -41,7 +41,8 @@ class load_images(): # for inference
assert img0 is not None, 'Failed to load ' + img_path
# Padded resize
img, _, _, _ = letterbox(img0, height=self.height, color=(127.5, 127.5, 127.5))
img, ratio, padw, padh = letterbox(img0, height=self.height, color=(127.5, 127.5, 127.5))
print(ratio, padw, padh)
# Normalize RGB
img = img[:, :, ::-1].transpose(2, 0, 1)