Skip to content

Commit a8a5b5e

Browse files
authored
[FIX] Fix infer_onnx data loading bug (#2574)
1 parent 2eb0a42 commit a8a5b5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

deploy/python/infer_onnx.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ def _save_imgs(results, imgs_path, save_dir):
5050

5151

5252
def main(args):
53-
img = cv2.imread(args.img_path)
5453
transform = Compose([Normalize()])
55-
input = transform(img)[0]
54+
input = transform({'img': args.img_path})['img']
5655
input = input[np.newaxis, ...]
5756

5857
# 加载ONNX模型

0 commit comments

Comments
 (0)