Skip to content

Commit 47f6bf3

Browse files
committed
fix bgr order in display function
1 parent 8f45451 commit 47f6bf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def aspectaware_resize_padding(image, width, height, interpolation=None, means=N
6666

6767

6868
def preprocess(*image_path, max_size=512, mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)):
69-
ori_imgs = [cv2.imread(img_path)[..., ::-1] for img_path in image_path]
70-
normalized_imgs = [(img / 255 - mean) / std for img in ori_imgs]
69+
ori_imgs = [cv2.imread(img_path) for img_path in image_path]
70+
normalized_imgs = [(img[..., ::-1] / 255 - mean) / std for img in ori_imgs]
7171
imgs_meta = [aspectaware_resize_padding(img, max_size, max_size,
7272
means=None) for img in normalized_imgs]
7373
framed_imgs = [img_meta[0] for img_meta in imgs_meta]

0 commit comments

Comments
 (0)