zhengrongzhang hongywei commited on
Commit
c2b2584
1 Parent(s): 0d99aa0

Update widerface_onnx_evalute.py (#2)

Browse files

- Update widerface_onnx_evalute.py (d66a469eb68d0be579448d73a2b0f6a8389a365b)


Co-authored-by: Hongyang Wei <[email protected]>

Files changed (1) hide show
  1. widerface_onnx_evalute.py +2 -0
widerface_onnx_evalute.py CHANGED
@@ -67,6 +67,8 @@ def Retinaface_evalute(run_ort, args):
67
  img_raw = cv2.imread(image_path, cv2.IMREAD_COLOR)
68
  # preprocess
69
  img, scale, resize = preprocess(img_raw, INPUT_SIZE, DEVICE)
 
 
70
  # forward
71
  outputs = run_ort.run(None, {run_ort.get_inputs()[0].name: img})
72
  # postprocess
 
67
  img_raw = cv2.imread(image_path, cv2.IMREAD_COLOR)
68
  # preprocess
69
  img, scale, resize = preprocess(img_raw, INPUT_SIZE, DEVICE)
70
+ # to NHWC
71
+ img = np.transpose(img, (0, 2, 3, 1))
72
  # forward
73
  outputs = run_ort.run(None, {run_ort.get_inputs()[0].name: img})
74
  # postprocess